[FFmpeg-devel] [RFC] v4l2 frame rates

Stefano Sabatini stefano.sabatini-lala
Tue Jan 6 00:16:32 CET 2009

On date Monday 2009-01-05 15:55:42 +0100, Luca Abeni encoded:
> 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).

Can you elaborate on this, what does it mean that it doesn't work, is
it a bug of the module/hardware?  Is it possible to detect somehow
when they don't work correctly?

Thanks, regards.
FFmpeg = Freak and Fundamental Most Peaceful Erotic Gospel

More information about the ffmpeg-devel mailing list