Setting frame size on v4l2src

Keith Lawson keith at nowhere.ca
Tue Sep 2 15:07:30 PDT 2014


On Tue, Sep 02, 2014 at 09:09:08AM -0400, Nicolas Dufresne wrote:
> 
> Le 2014-09-01 15:55, Keith Lawson a écrit :
> >gst-launch -v v4l2src device=/dev/video0  !
> >'video/x-raw-yuv,width=640,height=480,framerate=30/1' !
> >xvimagesink
> 
> I see two possible way this could fail. Framerate=30 might not be
> supported by the HW, just remove that field, v4l2 code will pick the
> best it can. The second, there might be colorspace incompatibility
> with your XV driver, add videoconvert (ffmpeg colorspace on 2+ years
> old GStreamer you are using).
> 

So today things get even more strange. I went to try removing the framerate and that failed so as a test I removed the cap filter entirely and I get this now: 

$ gst-launch -v v4l2src device=/dev/video0  ! xvimagesink
Setting pipeline to PAUSED ...
ERROR: Pipeline doesn't want to pause.
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Device '/dev/video0' cannot capture at 605x576
Additional debug info:
gstv4l2object.c(2207): gst_v4l2_object_set_format (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
Tried to capture at 605x576, but device returned size 606x576
Setting pipeline to NULL ...
Freeing pipeline ...
$

I can fix this by using mplayer to view video from the capture card first and then my gst-launch pipeline will work but I'm back to not being able to use the 640x480 filter cap. 

> Any reason to use GStreamer 0.10 rather then latest statble 1.0 ?
> 0.10 branch of GStreamer has been maintained for more then 2 years
> now.
> 

I'm on Debian testing and they package some gstreamer1.x packages but gstreamer-tools that gives me gst-launch is only 0.10. I'll try building from source to see if that makes a difference. 


> Nicolas
> 
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


More information about the gstreamer-devel mailing list