[Libav-user] How to corretly setting container and stream information when using an external encoder and using libavformat to pack the movie container

Carl Eugen Hoyos ceffmpeg at gmail.com
Sat Oct 26 15:37:24 EEST 2019

Am Sa., 26. Okt. 2019 um 14:14 Uhr schrieb Ingmar Rieger <dev at irieger.net>:

> On 26.10.19 10:59, Carl Eugen Hoyos wrote:
> > That's at least a surprising argumentation given the number of encoders
> > included in FFmpeg.
> Did I miss something? For me the relevant codecs I know for intermediate
> work are ProRes, DNxHR and Cineform with the later being seldomly used
> but the only open standard and as I recently found out supported in
> Resolve for some time now so as my main target is Resolve it seems worth
> giving it a try. ProRes and DNxHR are both proprietary with only reverse
> engineered codecs available.

FFmpeg contains encoders for both ProRes and DNxHR.
(Note that Cineform being an open standard is a joke, it is exactly as
proprietary as the others.)


> So basically I have an input like frame_rate (in integer for simplicity,
> don't care about the crazy 23.98 and other strange rates), a frame
> number from 0 to NUM_FRAMES-1 and ideally a start time input -> How to
> set the correct time base/rates and calculate the frame dts/pts?

As said, you cannot set the time base (you can but you don't have to) but
you have to read the time base used by the muxer, then calculate timestamps
using this time base, should be possible with av_rescale_q().

Carl Eugen

More information about the Libav-user mailing list