Recherche avancée

Médias (0)

Mot : - Tags -/metadatas

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (35)

  • Contribute to a better visual interface

    13 avril 2011

    MediaSPIP is based on a system of themes and templates. Templates define the placement of information on the page, and can be adapted to a wide range of uses. Themes define the overall graphic appearance of the site.
    Anyone can submit a new graphic theme or template and make it available to the MediaSPIP community.

  • Supporting all media types

    13 avril 2011, par

    Unlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)

  • Soumettre bugs et patchs

    10 avril 2011

    Un logiciel n’est malheureusement jamais parfait...
    Si vous pensez avoir mis la main sur un bug, reportez le dans notre système de tickets en prenant bien soin de nous remonter certaines informations pertinentes : le type de navigateur et sa version exacte avec lequel vous avez l’anomalie ; une explication la plus précise possible du problème rencontré ; si possibles les étapes pour reproduire le problème ; un lien vers le site / la page en question ;
    Si vous pensez avoir résolu vous même le bug (...)

Sur d’autres sites (5472)

  • Right way to use vmaf with ffmpeg

    20 mai 2021, par dravit

    I am trying to calculate the VMAF score of a processed video wrt the original file.

    


    Command I have used :

    


    ffmpeg -y -loglevel info -stats -i original.mp4 -i processed.mp4 -lavfi "[0]null[refdeint];[refdeint]scale=1920:1080:flags=neighbor[ref];[1]setpts=PTS+0.0/TB[b];[b]scale=1920:1080:flags=neighbor[c];[c][ref]libvmaf=log_fmt=json:phone_model=1:model_path={model_path_here}/vmaf_v0.6.1.json:n_subsample=1:log_path=log.json" -f null -


    


    Now as per the official documentation of vmaf with ffmpeg found here, it says source/reference file followed by the encoded/distorted/processed file.

    


    But almost all of the blogs I came across, they are using the other way round order of the args, i.e. processed file followed by the original file.

    


    Few examples :

    


      

    1. https://medium.com/@eyevinntechnology/keep-an-eye-on-the-video-quality-b9bcb58dd5a1 : search for "Using VMAF within FFMPEG" in it.

      


    2. 


    3. https://websites.fraunhofer.de/video-dev/calculating-vmaf-and-psnr-with-ffmpeg/ : search for "Metric Calculation with FFmpeg" in it.

      


    4. 


    


    EDIT

    


    NOTE : Changing the order does change the VMAF score.

    


  • FFmpeg decode OGG Vorbis audio as float, how to get float data from decoder

    19 novembre 2020, par cs guy

    I am trying to decode a OGG Vorbis audio file with the following :

    


    // if opening input failed
    if (avformat_open_input(&pFormatContext, filePath.c_str(), av_find_input_format("ogg"),
                            nullptr) != 0) {
        
        LOGE("FFmpegExtractor can not open the file! %s", filePath.c_str());
        return FAILED_TO_LOAD;
    }

    durationInMillis = pFormatContext->duration / AV_TIME_BASE * secondsToMilli;
    LOGD("FFmpegExtractor opened the file, Duration: %llu", durationInMillis);

    avformat_find_stream_info(pFormatContext, nullptr);

    LOGD("pFormatContext streams num: %ui", pFormatContext->nb_streams);

    int sendPacketResult = 0;
    int receiveFrameResult = 0;

    for (int i = 0; i < pFormatContext->nb_streams; i++) {
        AVCodecParameters *pLocalCodecParameters = pFormatContext->streams[i]->codecpar;

        if (pLocalCodecParameters->codec_type == AVMEDIA_TYPE_AUDIO) {
            avCodecContext = avcodec_alloc_context3(avCodec);
            if (!avCodecContext) {
                
                LOGE("FFmpegExtractor avcodec_alloc_context3 failed!");
                return FAILED_TO_LOAD;
            }

            if (avcodec_parameters_to_context(avCodecContext, pLocalCodecParameters) < 0) {
                
                LOGE("FFmpegExtractor avcodec_parameters_to_context failed!");
                return FAILED_TO_LOAD;
            }

            if (avcodec_open2(avCodecContext, avCodec, nullptr) < 0) {
                
                LOGE("FFmpegExtractor avcodec_open2 failed!");
                return FAILED_TO_LOAD;
            }
        }

        while (av_read_frame(pFormatContext, avPacket) >= 0) {
            
            sendPacketResult = avcodec_send_packet(avCodecContext, avPacket);

            
            receiveFrameResult = avcodec_receive_frame(avCodecContext, avFrame);

            // TODO: Get frames PCM data from the decoder, 
        }
    }


    


    I am stuck on the last part. I want to get the decoded data of the current frame as a float between -1 to +1 for all the channels the audio has but I have no idea how to. I looked at the official documents but I could not understand them. How can I get the data from the decoder on the line

    


    


    // TODO : Get frames PCM data from the decoder,

    


    


  • Concatenate multiple video php ffmpeg

    3 mai 2017, par Angus Simons

    I have multiple files that are already been encoded (they have the same format and size) I would like to concatenate on a single video (that already exist and has to be overwritten).

    Following the official FAQ Documentation I should use demuxer

    FFmpeg has a concat demuxer which you can use when you want to avoid a
    re-encode and your format doesn’t support file level concatenation.

    The problem is that I should use a .txt file with a list of files using this command line

    ffmpeg -f concat -safe 0 -i mylist.txt -c copy output

    where mylist.txt should be :

    file '/path/to/file1'
    file '/path/to/file2'
    file '/path/to/file3'

    How can I do with PHP ?


    Also tried with concat protocol

    I tried using also the concat protocol that re-encode videos with these lines of code :

    $cli = FFMPEG.' -y -i \'concat:';

    foreach ($data as $key => $media) {
     $tmpFilename = $media['id'];
     $tmpPath = $storePath.'/tmp/'.$tmpFilename.'.mp4';

     if ($key != ($dataLenght - 1)) {
       $cli .= $tmpPath.'|';
     } else {
       $cli .= $tmpPath.'\'';
     }
    }

    $cli .= ' -c copy '.$export;
    exec($cli);

    that generate this command line :

    /usr/local/bin/ffmpeg -i 'concat:/USER/storage/app/public/video/sessions/590916f0d122b/tmp/1493768472144.mp4|/USER/storage/app/public/video/sessions/590916f0d122b/tmp/1493767926114.mp4|/USER/storage/app/public/video/sessions/590916f0d122b/tmp/1493771107551.mp4|/USER/storage/app/public/video/sessions/590916f0d122b/tmp/1493771114598.mp4' -c:v libx264  /USER/storage/app/public/video/sessions/590916f0d122b/tmp_video_session.mp4

    but I got this error :

    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fc8aa800000] Found duplicated MOOV Atom. Skipped it