[FFmpeg-devel] [RFC] Frame rate emulation
Ramiro Ribeiro Polla
Wed Jun 6 20:31:03 CEST 2007
x11grab provides its own frame rate emulation inside its read_frame
function. Many other grab formats will need it (GDI, VFW...), so it
would be best to make a format level frame rate emulation in FFmpeg, and
not each demuxer (also I believe they don't belong in the demuxers
FFmpeg already provides a frame rate emulation (added for DV), but it
works depending on a codec's demand, and not at a format level, like
* Frame rate emulation. If not zero, the lower layer (i.e. format
* has to read frames at native frame rate.
* - encoding: Set by user.
* - decoding: unused
It's in Fabrice's TODO "suppress rate_emu from AVCodecContext".
I don't know DV's needs for rate emulation, but couldn't it be passed to
ffmpeg.c's AVOutputStream instead of AVCodecContext? It would depend on
the format then, and not the codec.
Also, I plan to add that to AVInputStream, right before av_read_frame,
where it will be useful for grabbing demuxers.
Can there be 2 places where rate emulation occurs (reading from the
format, and writing to the codec)?
Is it ok for DV for the rate emulation to occur at writing to the output
format, so it's checked in AVOutputStream?
More information about the ffmpeg-devel