mpegts latency

Nicolas Dufresne nicolas at ndufresne.ca
Tue Sep 10 13:53:30 UTC 2019


Le mer. 31 juill. 2019 08 h 25, TheGiamig <thegiamig at gmail.com> a écrit :

> Hi all,
> I'm facing a latency problem using mpegtsmux and tsdemux elements
> (windows7,
> gstreamer 1.15.1).
>

Please,don't use odd versions of GStreamer, these are delopment version.
Use the release version instead, this way you are less likely to hit
unknown bugs that only existed for a short period of time during
development.


> I have to stream some h264 video content but my problem occurs also without
> actually stream through UDP.
>
> If I launch the following pipeline I can see the captured video without
> latency problems (few ms):
>
> gst-launch-1.0.exe dx9screencapsrc x=0 y=0 width=100 height=100 !
> videoconvert ! queue ! x264enc tune=zerolatency speed-preset=ultrafast
> byte-stream=true ! queue ! h264parse ! avdec_h264 ! videoconvert !
> autovideosink
>
> But if I add mpegtsmux and tsdemux elements the video latency will be
> around
> 1sec:
>

tsdemux contributes 700ms of latency to the pipeline. We have added
recently a latency property element to configure this. The latency depends
on the PCR distance as configured in mpegtsmux. You need 2 PCR to start
streaming, so the minimum possible latency is twice the period. Note that
the configuration of mpegtsmux is based on a 9 kHz clock, so the value is N
/ 90000 second. Default is 3600, which means 40ms (so 80ms minimum latency).



> gst-launch-1.0.exe dx9screencapsrc x=0 y=0 width=100 height=100 !
> videoconvert ! queue ! x264enc tune=zerolatency speed-preset=ultrafast
> byte-stream=true ! mpegtsmux ! queue ! tsdemux ! h264parse ! avdec_h264 !
> videoconvert ! autovideosink
>
> Any idea about this latency increment?
>
> Thank you
>
>
>
>
> --
> Sent from: http://gstreamer-devel.966125.n4.nabble.com/
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20190910/926697a6/attachment.html>


More information about the gstreamer-devel mailing list