For the past 4 days, I have been trying to get gstreamer1.0 to work with the v4l2 driver for the Raspberry Pi camera, but without success.
I am launching the latest Raspbian image (from 09.19.2014.), With raspicam enabled. The Raspicam bcm2835_v4l2 driver was launched by the modprobe command and was successfully tested both with the qv4l2 gui interface (the preview works fine) and with the dd command directly from the device:
dd if=/dev/video0 of=test.jpeg count=1 bs=11M
Gstreamer also works great with the main "Hello world" command:
gst-launch-1.0 videotestsrc ! ximagesink
However, I just can't figure out how to successfully show a video preview (using some kind of base shell like ximagesink or autovideosink) from the v4l2 raspicam source with Gstreamer.
None of the following handsets work (sorry, if some of them are completely stupid, I'm new to gstreamer):
The format of v4l2-ctl pixels is set to H264 (which returns the command "v4l2-ctl -V") I tried:
gst-launch-1.0 v4l2src device=/dev/video0 ! 'video/x-h264,width=640,height=480,framerate=25/1' ! h264parse ! omxh264dec ! videoconvert ! ximagesink
gst-launch-1.0 v4l2src device=/dev/video0 ! 'video/x-h264,width=640,height=480,framerate=25/1' ! h264parse ! omxh264dec ! videoconvert ! autovideosink
The v4l2-ctl pixel format is set to YU12 (4: 2: 0, packed by YUV) I tried:
gst-launch-1.0 v4l2src device=/dev/video0 ! autovideosink
gst-launch-1.0 v4l2src device=/dev/video0 ! ximagesink
Thus, none of the above commands work, the camera LED does not turn on and gstream returns:
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GetSystemClock
glGetError 0x505
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data flow error
Additional debug info:
gstbasesrc.c(2865): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming task paused, reason error (-5)
Execution ended after 0:00:16.843337147
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
Please show me the right direction to get a preview through Gstreamer.
My ultimate goal is to get raspicam / gstreamer to work with Python / Pyside / Phonon
EDIT: The “xvinfo” command tells me that “there are no adapters” and xvimagesink is not working from the very beginning. I am not sure if this is due to a problem. Raspbian launches version X.Org 1.12.4