Video sent with RTP only when closing a pipeline

Monyz Wacon monyz.ww at gmail.com
Mon Feb 29 21:37:36 UTC 2016


Hello,
I'm trying to send video data from Raspberry Pi 2 to PC. This method works
ok:

PC:

gst-launch-1.0 udpsrc port=7000 ! application/x-rtp,payload=96 !
rtph264depay ! decodebin ! xvimagesink

Raspberry Pi:

gst-launch-1.0 videotestsrc ! x264enc ! rtph264pay ! udpsink
host=192.168.0.5 port=7000

A window appears on PC with a test stream.

Then I am trying to send video from the camera connected to RPi (this
should work, because it works with raspivid tool and I loaded the module
bcm2835-v4l2):

gst-launch-1.0 -e -v v4l2src device=/dev/video0 !
'video/x-h264,width=320,height=200,framerate=30/1' ! h264parse ! rtph264pay
! udpsink host=192.168.0.5 port=7000

The thing is that something seems to be stuck. I can see that the camera
turns on, this is printed on RPi's console:

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\,\ width\=\(int\)320\,\ height\=\(int\)200\,\
pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)30/1"
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps =
"video/x-h264\,\ stream-format\=\(string\)byte-stream\,\
alignment\=\(string\)au\,\ width\=\(int\)320\,\ height\=\(int\)200\,\
pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)30/1"
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:sink: caps =
"video/x-h264\,\ stream-format\=\(string\)byte-stream\,\
alignment\=\(string\)au\,\ width\=\(int\)320\,\ height\=\(int\)200\,\
pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)30/1"
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps =
"video/x-h264\,\ stream-format\=\(string\)byte-stream\,\
alignment\=\(string\)au\,\ width\=\(int\)320\,\ height\=\(int\)200\,\
pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)30/1"

But there is no video on the PC side, nothing seems to be received. However
when I close the pipeline by ctrl-c on RPi's side, then new caps are
negotiated, some data is sent to PC and a single image from the camera is
displayed.

How to make the pipeline on RPi to stream video right after it is created,
not just send some data right before it is being closed?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20160229/bdc3eda9/attachment.html>


More information about the gstreamer-devel mailing list