Trying to stream H264 over RTP

Michael Gruner michael.gruner at ridgerun.com
Tue Apr 15 14:46:57 PDT 2014


Hi Craig

You'll need to specify the full set caps from the payloader, just the 
mimetype isn't enough. For example:

gst-launch videotestsrc ! x264enc ! rtph264pay ! udpsink port=5000 -v

...

/GstPipeline:pipeline0/GstRtpH264Pay:rtph264pay0: seqnum = 33460

/GstPipeline:pipeline0/GstUDPSink:udpsink0.GstPad:sink: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264,
sprop-parameter-sets=(string)\"Z01AFeygoP2AiAAAAwALuaygAHixbLA\\=\\,aOvssg\\=\\=\", payload=(int)96, ssrc=(uint)2406338994, clock-base=(uint)156724985, seqnum-base=(uint)33460

...

The -v printed out the caps.

I can successfully receive it by running:

gst-launch udpsrc port=5000 ! "application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264,
sprop-parameter-sets=(string)\"Z01AFeygoP2AiAAAAwALuaygAHixbLA\\=\\,aOvssg\\=\\=\", payload=(int)96, ssrc=(uint)2406338994,
clock-base=(uint)156724985, seqnum-base=(uint)33460" ! rtph264depay ! ffdec_h264 ! fpsdisplaysink sync=false

And yes, this means that the receiver pipeline is fixed to the sender 
pipeline's resolution and characteristics. Changing something on the 
sender will require a new pipeline on the receiver. If this is a problem 
for you, you might want to try using mpegtsmux or a smarter protocol 
like RTSP.

Michael


On 04/15/2014 01:36 PM, Chuck Crisler wrote:
> To start debugging...simplify. Take out the jitter buffer. Specify the 
> host in addition to the port for both pipelines. It might force IPv4 
> vs. IPv6 (there have been issues). Set higher logging levels and/or 
> get a packet capture to see if the problem(s) is in the transmit or 
> receive.
>
>
> On Tue, Apr 15, 2014 at 3:19 PM, Craig Routledge 
> <web at craigroutledge.com <mailto:web at craigroutledge.com>> wrote:
>
>     Hello everyone,
>
>     I'd like to send a video stream created by a Logitech HD ProWebcam
>     C920
>     to another computer.  The camera generates its own H264 stream.  There
>     have been similar posts on the mailing list before, but I couldn't
>     find
>     anything that seemed to work.
>
>     I started by testing gstreamer's ability to parse and display the
>     stream.
>
>       gst-launch-1.0 v4l2src !
>     video/x-h264,width=640,height=480,framerate=30/1
>         ! h264parse ! avdec_h264 ! xvimagesink sync=false
>
>     which works fine.
>
>
>     I then tried to stream over a network using RTP, sending and
>     receiving on
>     the same computer,
>
>       gst-launch-1.0 v4l2src !
>     video/x-h264,width=640,height=480,framerate=30/1
>         ! rtph264pay ! udpsink port=8554
>
>     and, in another terminal window,
>
>       gst-launch-1.0 udpsrc port=8554 ! application/x-rtp !
>     rtpjitterbuffer
>         ! rtph264depay ! h264parse ! avdec_h264 ! xvimagesink sync=false
>
>     This doesn't generate any errors, but doesn't display anything either.
>     Here is the standard output for both commands,
>
>         Setting pipeline to PAUSED ...
>         Pipeline is live and does not need PREROLL ...
>         Setting pipeline to PLAYING ...
>         New clock: GstSystemClock
>
>     So, what am I doing wrong?
>     _______________________________________________
>     gstreamer-devel mailing list
>     gstreamer-devel at lists.freedesktop.org
>     <mailto:gstreamer-devel at lists.freedesktop.org>
>     http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
>
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20140415/723e1578/attachment-0001.html>


More information about the gstreamer-devel mailing list