Huge delay while streaming the first video over IP in gstreamer

Michael Gruner michael.gruner at ridgerun.com
Tue Jan 23 18:39:53 UTC 2018


Hi Mohammad

I can think of several reasons for this to occur. 

- You might be losing the first key frame, and the next one doesn’t show up until 5 seconds later.
  * Do you see this if you start the receiver first and then the sender?
  * Does the video start from the beginning after the initial delay? Or is it already started?
  
- It may be a timestamping problem.
  * Have you tried setting sync=TRUE in the receiver? This will allow the pipeline to drop frames if needed in order to keep up with the stream time, instead of trying to display everything regardless of the lateness.
  * Have you tried using the jitter buffer <https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-good/html/gst-plugins-good-plugins-rtpjitterbuffer.html>?

- H264 profile may induce latency
  * As per the standard, H264 decoders must ensure there is enough data buffered to allow appropriate decoding. Depending on the profile used during the encoding phase, forward and backward predicted frames may required more data to be buffered, hence increasing latency. Some encoders have a “low latency” configuration, in which compression level is reduced in favor of lower latency.
  * You need to identify if the latency is being accounted to the decoder.

In any case, latency is always a hard issue to tackle. At RidgeRun we developed GstShark <https://developer.ridgerun.com/wiki/index.php?title=GstShark>, a set of open source GStreamer tracers that may help you debug this issue. Please take a look at the Interlatency tracer <https://developer.ridgerun.com/wiki/index.php?title=GstShark_-_InterLatency_tracer>  which may help you identify latency and processing bottlenecks in your pipeline. If the decoder is queueing this data, for example, the tracers should expose this. 

—
Michael Gruner <michael.gruner at ridgerun.com <mailto:michael.gruner at ridgerun.com>>
Embedded Linux and GStreamer solutions
RidgeRun Engineering
Contact Us - http://www.ridgerun.com/#!contact/c3vn <http://www.ridgerun.com/#!contact/c3vn>

> On Jan 22, 2018, at 03:34, Mohammad, Jamal M <MohammadJamal.Mohiuddin at ncr.com> wrote:
> 
> Hi Guys,
>  
> We are using gstreamer for Video streaming over IP.
>  
> On the receiver end I am using the following pipeline:
>  
> gst-launch-1.0 -vvv udpsrc port=5004 ! application/x-rtp, payload=96 ! rtph2 64depay ! h264parse ! imxvpudec ! imxipuvideosink sync=false
>  
> On the sender end we are using the following pipeline:
> C:\gstreamer\1.0\x86_64\bin\gst-launch-1.0.exe -v filesrc location=C:\\gstreamer\\1.0\\x86_64\\bin\\hash.h264 ! h264parse ! rtph264pay ! udpsink host=<IPAddress> port=5004 sync=true
>  
> When I am playing the first video, it takes a long time to start playing, more than 5 seconds.
>  
> But from the next video, it just starts playing without any delay.
>  
> Is there a way so the first video also plays instantly without any delay
>  
>  
> Mohammad Jamal Mohiuddin
> Software Engineer, Retail Hosp/HW
> NCR Corporation India Pvt Ltd.
> MohammadJamal.Mohiuddin at ncr.com <mailto:MohammadJamal.Mohiuddin at ncr.com> | www.ncr.com <http://www.ncr.com/>
> <Picture (Device Independent Bitmap) 1.jpg>
>  
>  
>  
> _______________________________________________
> gstreamer-embedded mailing list
> gstreamer-embedded at lists.freedesktop.org <mailto:gstreamer-embedded at lists.freedesktop.org>
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-embedded <https://lists.freedesktop.org/mailman/listinfo/gstreamer-embedded>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-embedded/attachments/20180123/6fe41e42/attachment.html>


More information about the gstreamer-embedded mailing list