[Libav-user] PRORES decoding using AVCODEC and ffmpeg 3.3.3

Francesco, Cuzzocrea francesco at bltitalia.com
Mon Nov 6 19:11:23 EET 2017


On 06/11/2017 17.47, Philippe Gorley wrote:
> On 2017-11-06 11:40 AM, Francesco, Cuzzocrea wrote:
>> Hi to all
>>
>> I found that ffmpeg can decode PRORES, while it seems that avcodec 
>> doesn't.
>>
>> If I issue:
>>
>> ffmpeg.exe -i test_prores.mov test.mp4
>>
>> it convert the mov prores file correctly, whilst using libavcodec 
>> doesn't.  Here is the snippet of code:
>>
>>   vd_codec = avcodec_find_decoder(AV_CODEC_ID_PRORES);
>>
>>   pCodecCtxFF = avcodec_alloc_context3(vd_codec);
>>
>>   glob_frm = av_frame_alloc();   // allocate and init a re-usable frame
>>
>>   avcodec_open2(pCodecCtxFF, vd_codec,NULL);
>>
>>     av_init_packet(&thpkt);
>>
>> // Read a single PRORES FRAME and put it into tempBuff
>>    fileSize = PutFileIntoBuffer(srcFile.c_str(),tempBuff);
>>
>>
>>    thpkt.size =  fileSize;    thpkt.data = tempBuff;
>>
>>    conv_res = avcodec_send_packet(pCodecCtxFF, &thpkt);
>>    if(conv_res<0)
>>    {
>>       if(av_strerror(conv_res, errbuf, 512)==0) stre.printf("Error 
>> sending packet : %s",errbuf);
>>        else  stre.printf("Error %x returned from avcodec_send_packet 
>> : %s",errbuf);
>>       goto __exit_pres;
>>    }
>>
>>
>> result is the message "Error sending packet : Not yet implemented in 
>> FFmpeg, patches welcome".
>>
>> I attempt to compile with and without --enable-version3 in the 
>> configure but nothing changes.
>>
>> Anyone experienced decoding of PRORES frame ?
>>
>> Regards
>>
>>
>
> Are you registering the codec? IE: are you calling av_register_all() 
> before using libav* code?
>

Of course. At start of program:

     avcodec_register_all();
     av_register_all();

-- 
/*******************************************************************\
*    Ing. Francesco  Cuzzocrea
\*******************************************************************/



More information about the Libav-user mailing list