[Libav-user] Encode video: Pro Res 422

Info || Non-Lethal Applications info at non-lethal-applications.com
Mon May 19 00:07:36 CEST 2014


On 17 May 2014, at 23:43, Gonzalo Garramuno <ggarra13 at gmail.com> wrote:
> On 16/05/14 17:02, Info || Non-Lethal Applications wrote:
>> On 16 May 2014, at 19:02, Gonzalo Garramuno <ggarra13 at gmail.com> wrote:
>> 
>>> On 16/05/14 10:27, Info || Non-Lethal Applications wrote:
>>>> Hey there,
>>>> 
>>>> I’m trying to encode a sequence of images into Pro Res 422 in the MOV container.
>>>> I already had a look at the example: muxing.c and it looks promising.
>>>> 
>>>> However, I can’t figure out how to tell the encoder to use ProRes instead of H.264 for MOV.
>>>> Here’s what I’ve tried (mostly unaltered sample …):
>>>> 
>>>> AVOutputFormat* pOutputFmt;
>>>> AVFormatContext* pFormatCtx;
>>>> AVStream* pVideoStream;
>>>> AVCodec* pVideoCodec;
>>>> 
>>>> /* Initialize libavcodec, and register all codecs and formats. */
>>>> av_register_all();
>>>> 
>>>> /* allocate the output media context */
>>>> avformat_alloc_output_context2(&pFormatCtx, NULL, "mov", filename.c_str());
>>>> 
>>> Try after that:
>>> 
>>> pOutputFmt = pFormatCtx->oformat;
>>> pOutputFmt->video_codec = AV_CODEC_ID_PRORES;
>>> 
>>> (add stream and open codec here).
>> Ok, got it. That works perfectly.
>> And how would I go about defining the different Pro Res flavors? Like Proxy/LT/Standard/HQ?
> My guess is that you need to modify the AVCodecContext* or pass some opts with set_opts.  You will need to read the source code of prores I am afraid.

Thanks for getting back to me.
Ok, I guess that’s what I need to do then ...

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://ffmpeg.org/pipermail/libav-user/attachments/20140519/f8bd6081/attachment.html>


More information about the Libav-user mailing list