[FFmpeg-devel] [RFC] v4l2 frame rates

Luca Abeni lucabe72
Tue Jan 6 13:21:35 CET 2009

Stefano Sabatini wrote:
>> 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

Basically, with some webcams the ioctl() for getting the list of 
supported video standards fails... And this (AFAIK) makes it impossible 
to know the video frame rate (the only way I know to get this 
information is to read it in the structure describing the video standard).

> is it a bug of the module/hardware?

I do not know... Maybe v4l2 allows the driver to fail on some ioctl()s 
if they are not supported? Anyway, I did not check.

> Is it possible to detect somehow when they don't work correctly?

Well, detecting this problem is easy, as the ioctl() fails. But the v4l2 
input must work even if we cannot get the list of supported video 

Anyway, support for automatically detecting the frame rate should come 
in a different patch.


More information about the ffmpeg-devel mailing list