[FFmpeg-devel] libavformat/idroqenc.c: put the target fps into the header?

u-owvm at aetey.se u-owvm at aetey.se
Thu Jan 30 09:16:42 CET 2014

On Wed, Jan 29, 2014 at 04:53:46PM +0000, Carl Eugen Hoyos wrote:
>  <u-owvm <at> aetey.se> writes:
> >   roq_write_header(struct AVFormatContext *s)
> > 
> > How can it learn the target fps via its argument?
> Without looking at the actual code, the 
> AVFormatContext contains streams as AVCodecContext, 
> they contain several (in)dependent fields with 
> information about average frame rate, timebase and 
> similar.
> See for example "time_base" in movenc.c and avienc.c

Thanks Carl Eugen,

I see.

It looks like I should use


(for RoQ the fps will be just the value of

which is reflecting the fact that ffmpeg does
  codec->time_base = av_inv_q(ost->frame_rate)
in transcode_init().


More information about the ffmpeg-devel mailing list