[FFmpeg-devel] [RFC] v4l2 frame rates

Luca Abeni lucabe72
Mon Jan 5 15:55:42 CET 2009


Hi all,

the current v4l2 input format requires that the user specifies a
frame rate for the input. Such frame rate, which can be completely
wrong, is used for initialising the input codec time base and is
stored in the video_data structure, but is never actually used...

So, I think this "feature" should be removed, as in the attached
patch. After applying the patch, if the user does not specify a
frame rate the standard "1 us" time base is used (and the input
codec is considered as variable frame rate).
But it is still possible to specify a frame rate for the input, to
avoid the av_find_stream_info() delay (in case of variable frame rate,
this function always tries to read some packets... The results in a
2.5s delay when opening the input).

I am still unsure if this is the best solution (I think it is an
improvement respect to the current behaviour, but maybe we can do
something better...), hence the RFC (yes, I already considered the idea
of querying the video standard to obtain the correct frame rate... But
this does not work for some webcams).


				Thanks,
					Luca
-------------- next part --------------
A non-text attachment was scrubbed...
Name: v4l2-rate.diff
Type: text/x-diff
Size: 1753 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090105/5204b3ba/attachment.diff>



More information about the ffmpeg-devel mailing list