[gst-devel] Re: [patch] gstreamer v4l2 source frame rate detection
Edgard Lima
edgard.lima at indt.org.br
Mon May 8 10:31:03 CEST 2006
currently v4l2src is not looking the caps and try to set the framerate
in the driver. Now if you want another framerate use 'videorate' element.
btw: thanks again for the fourcc patch, I ll commit today.
BR,
Edgard Lima - alima
edgard.lima at indt.org.br
ext Martin Rubli wrote:
> Hey Edgard,
>
> I've tested the current CVS version and it seems to work fine, both
> with gst-launch and v4l2src-test.
>
> There remains a (purely optical) problem with the debug output of
> fourcc codes. The attached patch fixes those. GST_FOURCC_FORMAT lacks
> the initial '%'. This is why the current version would always display
> strings like "cABC" instead of "ABCD".
>
> Also, I've tried to reproduce the problems I had with
> use-fixed-fps=false but I wasn't able to do it. I think I may have
> confused this and it probably always worked.
>
> Talking about the use-fixed-fps property. Maybe it's because I haven't
> had much sleep last night but does it actually do something useful?
> If you set it to true and v4l2src is unable to read out the frame
> rate, it fails, ok. But does it actually drop/insert frames like its
> description claims?
>
>
> Finally, for the sake of illustration (parts of it might be useful
> for inclusion in the README):
>
> I have a webcam (Logitech QuickCam for Notebooks Pro) that is detected
> by the Linux UVC driver as follows:
>
> uvcvideo: Probing generic UVC device 2
> uvcvideo: Found format MJPEG.
> uvcvideo: - 160x120 (30.0 fps)
> uvcvideo: - 176x144 (30.0 fps)
> uvcvideo: - 320x240 (15.0 fps)
> uvcvideo: - 352x288 (30.0 fps)
> uvcvideo: - 432x240 (30.0 fps)
> uvcvideo: - 480x360 (30.0 fps)
> uvcvideo: - 512x288 (30.0 fps)
> uvcvideo: - 640x360 (30.0 fps)
> uvcvideo: - 640x480 (15.0 fps)
> uvcvideo: - 704x576 (15.0 fps)
> uvcvideo: - 864x480 (15.0 fps)
> uvcvideo: - 960x720 (15.0 fps)
> uvcvideo: Found format Uncompressed.
> uvcvideo: - 1024x576 (10.0 fps)
> uvcvideo: - 1280x960 (7.5 fps)
>
> Note that the frame rates in parenthesis are just the default ones
> and lower frame rates are also supported. By default, v4l2src always
> picks the highest resolution for a given format.
>
> A couple of example pipelines:
>
> gst-launch v4l2src ! xvimagesink
> # captures in 1280x960 at 7.5 with YUY2
>
> gst-launch v4l2src ! video/x-raw-yuv,width=1024,height=576 ! xvimagesink
> # captures in 1024x576 at 10 with YUY2
>
> gst-launch v4l2src ! jpegdec ! xvimagesink
> # captures in 960x720 at 15 with MJPEG
>
> gst-launch v4l2src ! image/jpeg,width=640,height=360 ! jpegdec !
> xvimagesink
> # captures in 640x360 at 30 with MJPEG
>
>
> I can't control the capture frame rate yet, e.g. by
> "image/jpeg,width=640,height=360,framerate=25/1". Does anyone see a
> reason why that wouldn't work? If not I'll try to investigate that
> next week.
>
> Cheers,
> Martin
>
>
>
> On Fri, 05 May 2006 13:17:37 -0700, Edgard Lima
> <edgard.lima at indt.org.br> wrote:
>
>>
>> Ok, Martin and Fredrik, thanks
>>
>> Ive just commited to v4l2src.
>>
>> It has some improvements proposed by wingo in bug #338818 and the
>> patch Martin sent me to fix framerate detection.
>>
>> Could you please try it?
>>
>> Could you please try tests/icles/v4l2src-test with your webcam
>>
>> BR,
>> Edgard Lima - alima
>> edgard.lima at indt.org.br
>>
More information about the gstreamer-devel
mailing list