Raspberry Pi camera and 1.4.5

Tim Müller tim at centricular.com
Mon Feb 23 13:52:27 PST 2015


On Mon, 2015-02-23 at 22:11 +0100, Arnaud Loonstra wrote:
> Using a fdsrc works but talking directly to it through v4l2src does 
> nothing. Not a bit is send out through the network. It seems the 
> pipeline doesn't flow....
> 
> Using latest Raspbian and a compiled 1.4.5


I'd recommend

https://github.com/thaytan/gst-rpicamsrc

which provides a GStreamer source element that does the same as
raspivid, but sets proper timestamps and is generally more natural to
use.

 Cheers
  -Tim
 
> $ raspivid -t 0 -w 1080 -h 720 -fps 25 -hf -b 2000000 -o - | gst-la
> unch-1.0 -v fdsrc ! h264parse ! rtph264pay config-interval=1 pt=96 ! 
> udpsink host=192.168.1.1 port=5000
> Setting pipeline to PAUSED ...
> Pipeline is PREROLLING ...
> /GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:src: caps = 
> "video/x-h264\,\ width\=\(int\)1080\,\
> height\=\(int\)720\,\ framerate\=\(fraction\)0/1\,\ 
> parsed\=\(boolean\)true\,\ stream-format\=\(string\)a
> vc\,\ alignment\=\(string\)au\,\ level\=\(string\)4\,\ 
> profile\=\(string\)high\,\ codec_data\=\(buffer\)0
> 1640028ffe1000f27640028ac2b402202df2f00f1226a01000528ee025cb0"
> /GstPipeline:pipeline0/GstRtpH264Pay:rtph264pay0.GstPad:src: caps = 
> "application/x-rtp\,\ media\=\(string
> \)video\,\ clock-rate\=\(int\)90000\,\ encoding-name\=\(string\)H264\,\ 
> sprop-parameter-sets\=\(string\)\
> "J2QAKKwrQCIC3y8A8SJq\\\,KO4CXLA\\\=\"\,\ payload\=\(int\)96\,\ 
> ssrc\=\(uint\)473859634\,\ timestamp-offs
> et\=\(uint\)1501147395\,\ seqnum-offset\=\(uint\)23019"
> /GstPipeline:pipeline0/GstUDPSink:udpsink0.GstPad:sink: caps = 
> "application/x-rtp\,\ media\=\(string\)vid
> eo\,\ clock-rate\=\(int\)90000\,\ encoding-name\=\(string\)H264\,\ 
> sprop-parameter-sets\=\(string\)\"J2QA
> KKwrQCIC3y8A8SJq\\\,KO4CXLA\\\=\"\,\ payload\=\(int\)96\,\ 
> ssrc\=\(uint\)473859634\,\ timestamp-offset\=\
> (uint\)1501147395\,\ seqnum-offset\=\(uint\)23019"
> /GstPipeline:pipeline0/GstRtpH264Pay:rtph264pay0.GstPad:sink: caps = 
> "video/x-h264\,\ width\=\(int\)1080\
> ,\ height\=\(int\)720\,\ framerate\=\(fraction\)0/1\,\ 
> parsed\=\(boolean\)true\,\ stream-format\=\(string
> \)avc\,\ alignment\=\(string\)au\,\ level\=\(string\)4\,\ 
> profile\=\(string\)high\,\ codec_data\=\(buffer
> \)01640028ffe1000f27640028ac2b402202df2f00f1226a01000528ee025cb0"
> /GstPipeline:pipeline0/GstRtpH264Pay:rtph264pay0: timestamp = 1501147395
> /GstPipeline:pipeline0/GstRtpH264Pay:rtph264pay0: seqnum = 23019
> Pipeline is PREROLLED ...
> Setting pipeline to PLAYING ...
> New clock: GstSystemClock
> 
> ^Cmmal: Aborting program
> 
> handling interrupt.
> Interrupt: Stopping pipeline ...
> Execution ended after 0:00:10.363012001
> Setting pipeline to PAUSED ...
> Setting pipeline to READY ...
> Setting pipeline to NULL ...
> Freeing pipeline ...
> 
> 
> 
> $ gst-launch-1.0 -v v4l2src do-timestamp=true ! 
> video/x-h264,width=640,height=480,framerate=30/1 ! h264parse ! 
> rtph264pay ! udpsink host=192.168.1.1 port=5000 sync=false Setting 
> pipeline to PAUSED ...
> Pipeline is live and does not need PREROLL ...
> Setting pipeline to PLAYING ...
> New clock: GstSystemClock
> /GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = 
> "video/x-h264\,\ stream-format\=\(string\)byte-stream\,\ 
> alignment\=\(string\)au\,\ framerate\=\(fraction\)30/1\,\ 
> width\=\(int\)640\,\ height\=\(int\)480\,\ 
> pixel-aspect-ratio\=\(fraction\)1/1"
> /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = 
> "video/x-h264\,\ stream-format\=\(string\)byte-stream\,\ 
> alignment\=\(string\)au\,\ framerate\=\(fraction\)30/1\,\ 
> width\=\(int\)640\,\ height\=\(int\)480\,\ 
> pixel-aspect-ratio\=\(fraction\)1/1"
> /GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:sink: caps = 
> "video/x-h264\,\ stream-format\=\(string\)byte-stream\,\ 
> alignment\=\(string\)au\,\ framerate\=\(fraction\)30/1\,\ 
> width\=\(int\)640\,\ height\=\(int\)480\,\ 
> pixel-aspect-ratio\=\(fraction\)1/1"
> /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = 
> "video/x-h264\,\ stream-format\=\(string\)byte-stream\,\ 
> alignment\=\(string\)au\,\ framerate\=\(fraction\)30/1\,\ 
> width\=\(int\)640\,\ height\=\(int\)480\,\ 
> pixel-aspect-ratio\=\(fraction\)1/1"
> ^Chandling interrupt.
> Interrupt: Stopping pipeline ...
> Execution ended after 0:01:16.673993691
> Setting pipeline to PAUSED ...
> Setting pipeline to READY ...
> Setting pipeline to NULL ...
> Freeing pipeline ...
> 
> 
> Just noticed some kernel errors as well:
> [ 9638.442183] Linux video capture interface: v2.00
> [ 9638.485342] bcm2835-v4l2: scene mode selected 0, was 0
> [ 9638.485580] bcm2835-v4l2: Work-around for gstreamer issue is active.
> [ 9638.492510] bcm2835-v4l2: V4L2 device registered as video0 - stills 
> mode > 1280x720
> [ 9638.498031] bcm2835-v4l2: Broadcom 2835 MMAL video capture ver 0.0.2 
> loaded.
> [ 9661.282377] bcm2835-v4l2: error 0 waiting for frame completion
> [ 9934.824835] bcm2835-v4l2: error 0 waiting for frame completion
> [ 9969.360650] ------------[ cut here ]------------
> [ 9969.360774] WARNING: CPU: 0 PID: 4036 at 
> drivers/media/v4l2-core/videobuf2-core.c:2135 
> __vb2_queue_cancel+0xf4/0x160 [videobuf2_core]()
> [ 9969.360793] Modules linked in: bcm2835_v4l2 videobuf2_vmalloc 
> videobuf2_memops videobuf2_core v4l2_common videodev media snd_bcm2835 
> snd_pcm snd_seq snd_seq_device snd_timer snd joydev evdev 
> uio_pdrv_genirq uio [last unloaded: videobuf2_memops]
> [ 9969.360892] CPU: 0 PID: 4036 Comm: gst-launch-1.0 Not tainted 3.18.7+ 
> #755
> [ 9969.360964] [<c00151fc>] (unwind_backtrace) from [<c0012710>] 
> (show_stack+0x20/0x24)
> [ 9969.361006] [<c0012710>] (show_stack) from [<c0555b30>] 
> (dump_stack+0x20/0x28)
> [ 9969.361052] [<c0555b30>] (dump_stack) from [<c0022ef4>] 
> (warn_slowpath_common+0x7c/0x9c)
> [ 9969.361085] [<c0022ef4>] (warn_slowpath_common) from [<c0022fd0>] 
> (warn_slowpath_null+0x2c/0x34)
> [ 9969.361144] [<c0022fd0>] (warn_slowpath_null) from [<bf13aa1c>] 
> (__vb2_queue_cancel+0xf4/0x160 [videobuf2_core])
> [ 9969.361229] [<bf13aa1c>] (__vb2_queue_cancel [videobuf2_core]) from 
> [<bf13c7f8>] (vb2_queue_release+0x28/0x48 [videobuf2_core])
> [ 9969.361300] [<bf13c7f8>] (vb2_queue_release [videobuf2_core]) from 
> [<bf13c874>] (_vb2_fop_release+0x5c/0x84 [videobuf2_core])
> [ 9969.361366] [<bf13c874>] (_vb2_fop_release [videobuf2_core]) from 
> [<bf13c8d0>] (vb2_fop_release+0x34/0x38 [videobuf2_core])
> [ 9969.361561] [<bf13c8d0>] (vb2_fop_release [videobuf2_core]) from 
> [<bf0fd460>] (v4l2_release+0x48/0x88 [videodev])
> [ 9969.361687] [<bf0fd460>] (v4l2_release [videodev]) from [<c013b920>] 
> (__fput+0x90/0x20c)
> [ 9969.361723] [<c013b920>] (__fput) from [<c013bb04>] (____fput+0x18/0x1c)
> [ 9969.361759] [<c013bb04>] (____fput) from [<c003d498>] 
> (task_work_run+0x9c/0xcc)
> [ 9969.361797] [<c003d498>] (task_work_run) from [<c00250a8>] 
> (do_exit+0x2ec/0xa58)
> [ 9969.361829] [<c00250a8>] (do_exit) from [<c00258b0>] 
> (do_group_exit+0x50/0xf0)
> [ 9969.361858] [<c00258b0>] (do_group_exit) from [<c0025970>] 
> (__wake_up_parent+0x0/0x30)
> [ 9969.361892] [<c0025970>] (__wake_up_parent) from [<c000e8c0>] 
> (ret_fast_syscall+0x0/0x48)
> [ 9969.361909] ---[ end trace 73848e747642fe10 ]---
> [10169.845176] bcm2835-v4l2: error 0 waiting for frame completion
> [10409.715748] bcm2835-v4l2: error 0 waiting for frame completion
> [10411.325881] bcm2835-v4l2: error 0 waiting for frame completion
> [10759.471245] bcm2835-v4l2: error 0 waiting for frame completion
> [10761.161298] bcm2835-v4l2: error 0 waiting for frame completion
> [11200.460611] bcm2835-v4l2: error 0 waiting for frame completion
> [11824.398182] bcm2835-v4l2: error 0 waiting for frame completion
> 
> 
> 

-- 
Tim Müller, Centricular Ltd - http://www.centricular.com



More information about the gstreamer-devel mailing list