[FFmpeg-devel] mpeg fixed frame rates (ffmpeg faq 1.14) or code

Stefano Sabatini stefano.sabatini-lala
Mon Jun 25 12:45:07 CEST 2007


On date Monday 2007-06-25 11:48:33 +0300, Makc encoded:
> Hello.
> 
> In ffmpeg faq it sais:
> 
> "Some codecs, like MPEG-1/2, only allow a small number of fixed framerates"
> 
> I would like to know (the place where I can find) the list of these
> frame rates for these "some" codecs.
> 
> Or, it would be nice if you would pin the place in ffmpeg code that
> deals with this situation, so I could learn thing from there on my
> own.

libavcodec/mpeg12.c:encode_init and the definition of the field
supported_framerates in the mpeg{1,2}video_encoder definition.

They are (but the first one) (see mpeg12data.h):
const AVRational ff_frame_rate_tab[] = {
    {    0,    0},
    {24000, 1001},
    {   24,    1},
    {   25,    1},
    {30000, 1001},
    {   30,    1},
    {   50,    1},
    {60000, 1001},
    {   60,    1},
  // Xing's 15fps: (9)
    {   15,    1},
  // libmpeg3's "Unofficial economy rates": (10-13)
    {    5,    1},
    {   10,    1},
    {   12,    1},
    {   15,    1},
    {    0,    0},
};

but only the first 8 are "official" (and the first is invalid of
course).

BTW this is more an ffmpeg-user question than an ffmpeg-devel one.

It would also be very useful to have some way to ask ffmpeg "Which
parameters can I use with this codec?" and for the format "Which codecs
can I use with this format?".

Cheers
-- 
Stefano Sabatini
Linux user number 337176 (see http://counter.li.org)




More information about the ffmpeg-devel mailing list