Alternative to rtph264depay byte-stream=false

Umar Qureshey umar at janteq.com
Wed Nov 6 16:47:31 PST 2013


> -----Original Message-----
> From: gstreamer-devel-bounces+umar=janteq.com at lists.freedesktop.org
> [mailto:gstreamer-devel-bounces+umar=janteq.com at lists.freedesktop.org]
> On Behalf Of Jan Schmidt
> Sent: Tuesday, November 05, 2013 5:44 PM
> To: Discussion of the development of and with GStreamer
> Subject: Re: Alternative to rtph264depay byte-stream=false
> 
> On Wed, 2013-11-06 at 00:56 +0000, Umar Qureshey wrote:
> > Hello,
> >
> > I just got gstreamer 1.2.0 cross compiled for my embedded system (boy,
> that was a PITA).

[snip]

> >
> > Question is how do I use capsfilter (or any other method) to mimic the
> effects of "byte-stream=false" ??
> 
> Like this:
> gst-launch-1.0 rtspsrc
> location=rtsp://192.168.1.214/axis-media/media.amp?streamprofile=Quality
> ! rtph264depay ! video/x-h264,stream-format=avc ! h264parse config-
> interval=2  ! mpegtsmux ! rtpmp2tpay pt=33 perfect-rtptime=true ! udpsink
> host=192.168.20.30 port=1234 sync=false
> 
> 
> However, that seems silly, since mpegtsmux requires h264 in byte-stream
> format, so h264parse will just end up changing it back to byte-stream
> packets. I'd just leave it out, and lt pipeline negotiation figure it
> out:
> 
> gst-launch-1.0 rtspsrc
> location=rtsp://192.168.1.214/axis-media/media.amp?streamprofile=Quality
> ! rtph264depay ! h264parse config-interval=2 ! mpegtsmux ! rtpmp2tpay
> pt=33 perfect-rtptime=true ! udpsink host=192.168.20.30 port=1234
> sync=false

There is a subtle difference between the two pipelines.  In the second pipeline, there is an initial SPS/PPS sent with the initial H.264 IDR frame.  
After that there are no more SPS/PPS with IDR frames.  This is ok for files but for live streaming where the decoder can pick up the stream from any arbitrary 
point, it is problematic because if it missed the initial IDR with SPS/PPS then it cannot decode.  The first pipeline mentioned above solves this issue by 
sending PPS/SPS with every IDR frame so a decoder only has to wait a few moments to get an IDR frame with SPS/PPS and then it starts decoding fine.



More information about the gstreamer-devel mailing list