Doing x264enc tune=zerolatency made the video quite pixelated but really didn't affect the latency.<div><br></div><div>A brief explanation of what I am doing:</div><div><br></div><div>I am using AppSrc from gstreamer-java to grab rgb buffers from a large java app and putting them out as x264enc / rtph264pay / udpsink. That is the stream I am picking up with the test-launch pipeline I am working on. I can attach a gst-launch pipeline to the AppSrc output and display with very low latency so the delay is in the test-launch pipeline. I just reduced the size of the captured buffers in the AppSrc interface from 640x480 to 320x240 with improved latency so it appears that the amount of data in the pipeline is important. I have checked cpu usage everwhere with nothing showing over about 3 -5 % usage. All the involved computers are connected by gigabit connections.</div>
<div><br></div><div>Morris<br><br><div class="gmail_quote">On Tue, Mar 1, 2011 at 9:00 AM, Tim-Philipp Müller <span dir="ltr"><<a href="mailto:t.i.m@zen.co.uk">t.i.m@zen.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
On Tue, 2011-03-01 at 08:43 -0500, Morris Ford wrote:<br>
> This morning I cranked up my test and I was seeing about 10 second<br>
> latency. After rebooting all the systems involved I am still seeing<br>
> about 7 - 8 second latency. This is really strange.<br>
><br>
> Any insight?<br>
<br>
Try: x264enc tune=zerolatency<br>
<br>
Cheers<br>
-Tim<br>
><br>
> Morris<br>
><br>
> On Tue, Mar 1, 2011 at 8:24 AM, Morris Ford <<a href="mailto:morrishford@gmail.com">morrishford@gmail.com</a>><br>
> wrote:<br>
> I get:<br>
> (lt-test-launch:21084): GStreamer-CRITICAL **:<br>
> gst_poll_set_flushing: assertion `set != NULL' failed<br>
><br>
><br>
> Morris<br>
><br>
><br>
> On Tue, Mar 1, 2011 at 3:11 AM, Marco Ballesio<br>
> <<a href="mailto:gibrovacco@gmail.com">gibrovacco@gmail.com</a>> wrote:<br>
> Hi,<br>
><br>
> On Mon, Feb 28, 2011 at 6:14 PM, Morris Ford<br>
> <<a href="mailto:morrishford@gmail.com">morrishford@gmail.com</a>> wrote:<br>
> > Thanks a lot for your help. That was the key to<br>
> getting it to run. I now<br>
> > have a working rtsp-server pipe thus:<br>
> > ./test-launch "( udpsrc port=5000 caps=<br>
> \"application/x-rtp,<br>
> > media=\(string\)video, clock-rate=\(int\)90000,<br>
> > encoding-name=\(string\)H264, payload=\(int\)96,<br>
> ssrc=\(guint\)2396357661,<br>
> > clock-base=\(guint\)2297066863, seqnum-base=\(guint<br>
> \)49439\" ! rtph264depay<br>
> > ! ffdec_h264 ! ffmpegcolorspace ! videoscale !<br>
> x264enc ! rtph264pay<br>
> > name=pay0 pt=96 sync=false )"<br>
> > Problem now is that there is a 3 - 4 second latency<br>
> when playing using that<br>
> > pipeline and playing the resulting video through vlc<br>
> or quicktime.<br>
> > My question: How do I find what is causing the delay<br>
> and what can I do to<br>
> > reduce the delay?<br>
><br>
><br>
> what if you don't explicitly set clock-base and<br>
> seqnum-base?<br>
><br>
> Regards<br>
><br>
><br>
> > Thanks<br>
> > Morris<br>
> ><br>
> > On Mon, Feb 28, 2011 at 2:33 AM, Marco Ballesio<br>
> <<a href="mailto:gibrovacco@gmail.com">gibrovacco@gmail.com</a>><br>
> > wrote:<br>
> >><br>
> >> Hi,<br>
> >><br>
> >> On Mon, Feb 28, 2011 at 3:05 AM, Morris Ford<br>
> <<a href="mailto:morrishford@gmail.com">morrishford@gmail.com</a>><br>
> >> wrote:<br>
> >> > I am working on receiving an udpsrc stream and<br>
> publishing it as an rtsp<br>
> >> > stream. This gst-launch string works just fine to<br>
> receive the stream:<br>
> >> > gst-launch-0.10 -v udpsrc port=5000<br>
> caps="application/x-rtp,<br>
> >> > media=\(string\)video, clock-rate=\(int\)90000,<br>
> >> > encoding-name=\(string\)H264, payload=\(int\)96,<br>
> >> > ssrc=\(guint\)2396357661,<br>
> >> > clock-base=\(guint\)2297066863, seqnum-base=<br>
> \(guint\)49439" !<br>
> >> > rtph264depay !<br>
> >> > decodebin ! ffmpegcolorspace ! videoscale !<br>
> xvimagesink sync=false<br>
> >> > but when I try to take that pipeline and put it<br>
> into a test-launch, I<br>
> >> > get<br>
> >> > complaints about not being able to set the caps<br>
> on udpsrc to<br>
> >> > application/x-rtp.<br>
> >> > Like this:<br>
> >> > ./test-launch "( udpsrc port=5000<br>
> caps="application/x-rtp,<br>
> >> > media=\(string\)video, clock-rate=\(int\)90000,<br>
> >><br>
> >> It's just about bash syntax. The way you're using<br>
> the " make bash<br>
> >> thinking you're passing test-launch a first<br>
> argument like this:<br>
> >><br>
> >> ( udpsrc port=5000 caps=<br>
> >><br>
> >> concatenated to:<br>
> >><br>
> >> application/x-rtp,<br>
> >><br>
> >> and a second argument like:<br>
> >><br>
> >> media=\(string\)video,<br>
> >><br>
> >> useless to say this is not what you should pass to<br>
> the test-launch<br>
> >> command. I suggest you to try replacing the outmost<br>
> pair of " with '<br>
> >> or the innermost ones with \"<br>
> >><br>
> >> Regards<br>
> >><br>
> >> > encoding-name=\(string\)H264, payload=\(int\)96,<br>
> >> > ssrc=\(guint\)2396357661,<br>
> >> > clock-base=\(guint\)2297066863, seqnum-base=<br>
> \(guint\)49439" !<br>
> >> > rtph264depay !<br>
> >> > decodebin ! ffmpegcolorspace ! videoscale !<br>
> x264enc ! rtph264pay<br>
> >> > name-pay0<br>
> >> > pt=96 )"<br>
> >> > ** (lt-test-launch:20772): CRITICAL **: could not<br>
> parse launch syntax ((<br>
> >> > udpsrc port=5000 caps=application/x-rtp,): could<br>
> not set property "caps"<br>
> >> > in<br>
> >> > element "udpsrc0" to "application/x-rtp,"<br>
> >> > ** (lt-test-launch:20772): CRITICAL **: could not<br>
> create element<br>
> >> > I could not find any examples of udpsrc in a<br>
> test-launch line or udpsrc<br>
> >> > in a<br>
> >> > gst-rtsp-server 'c' program so I am not at all<br>
> sure if what I am trying<br>
> >> > to<br>
> >> > do is valid.<br>
> >> > Morris<br>
> >> > _______________________________________________<br>
> >> > gstreamer-devel mailing list<br>
> >> > <a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>
> >> ><br>
> <a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
> >> ><br>
> >> ><br>
> >> _______________________________________________<br>
> >> gstreamer-devel mailing list<br>
> >> <a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>
> >><br>
> <a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
> ><br>
> ><br>
> > _______________________________________________<br>
> > gstreamer-devel mailing list<br>
> > <a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>
> ><br>
> <a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
> ><br>
> ><br>
> _______________________________________________<br>
> gstreamer-devel mailing list<br>
> <a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>
> <a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
><br>
><br>
><br>
><br>
><br>
> _______________________________________________<br>
> gstreamer-devel mailing list<br>
> <a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>
> <a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
<br>
<br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
</blockquote></div><br></div>