[FFmpeg-devel] [PATCH] Set frame rate on v4l2 devices

José Miguel Gonçalves jose.goncalves
Wed Sep 22 17:11:33 CEST 2010

On 09/22/2010 03:28 PM, Luca Abeni wrote:
> Hi,
> On 09/17/2010 12:06 PM, Jos? Miguel Gon?alves wrote:
>> jose.goncalves at inov.pt  writes:
>>> Using ffmpeg to stream a webcam MJPEG feed, I found that it can't set
>>> the webcam frame rate. For that we must use the VIDIOC_S_PARM
>>> ioctl. Please check the attached patch that fixes this.
>> Was this patch forgotten? New attempt...
> This patch seems to assume that after calling the VIDIOC_S_PARM
> ioctl, the v4l2_streamparm structure is updated by the driver with
> the parameters that have actually been set...
> However, my tests with a logitech webcam seem to show that this
> is not the case. I think you should call VIDIOC_G_PARM after
> VIDIOC_S_PARM, to check which parameters have actually been set.

I've also used a Logitech webcam (the QuickCam Sphere AF) with uvcvideo 
driver, and it works without the VIDIOC_G_PARM call. When I try to set a 
rate different from the supported ones, the VIDIOC_S_PARM call already 
returns the modified value.
But if the get call is needed for some other devices and/or drivers, 
let's put it.

Jos? Gon?alves
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffmpeg-svn-r25157-v4l2_set_frame_rate.patch
Type: text/x-patch
Size: 1617 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100922/b19978fe/attachment.bin>

More information about the ffmpeg-devel mailing list