rtsp-server has high latency

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

rtsp-server has high latency

jlancaster
I am on an embedded system with a built in camera streaming through v4l2. If I set my stream using:

gst-launch-1.0  -v imxv4l2videosrc ! video/x-raw, framerate=30/1, width=640, height=480 ! imxvpuenc_h264 bitrate=500 ! rtph264pay ! udpsink host=192.168.0.100 port=5000 sync=false

I can stream it to my desktop with very low latency. This mean all my components, especially the encoder, is running low latency using:

gst-launch-0.10  -v udpsrc port=5000 caps="application/x-rtp, media=(string)video" ! rtph264depay ! h264parse ! ffdec_h264 ! ffmpegcolorspace ! videoscale ! ximagesink


If I use the gstreamer-1.0 rtsp-server:

./test-launch "( imxv4l2videosrc ! imxvpuenc_h264 bitrate=500 ! rtph264pay name=pay0 pt=96 )" &

and stream to my own display:

gst-launch-1.0 -v rtspsrc location=rtsp://localhost:5000/test ! rtph264depay ! h264parse ! imxvpudec ! imxipuvideosink

My latency is 2+ seconds.

Any thoughts?

Jeff Lancaster
Reply | Threaded
Open this post in threaded view
|

Re: rtsp-server has high latency

jlancaster
Do:

gst-launch-1.0 -v rtspsrc location=rtsp://localhost:5000/test ! rtph264depay ! h264parse ! imxvpudec ! imxipuvideosink sync=false
Jeff Lancaster
Reply | Threaded
Open this post in threaded view
|

Re: rtsp-server has high latency

Sebastian Dröge-3
In reply to this post by jlancaster
On Tue, 2016-09-27 at 15:54 -0700, jlancaster wrote:


> and stream to my own display:
>
> gst-launch-1.0 -v rtspsrc location=rtsp://localhost:5000/test !
> rtph264depay
> ! h264parse ! imxvpudec ! imxipuvideosink
>
> My latency is 2+ seconds.
>
> Any thoughts?
rtspsrc by default introduces exactly 2s latency. You can control this
with the "latency" property on it, which has to be set according to
your network situation.

--
Sebastian Dröge, Centricular Ltd · http://www.centricular.com
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (949 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: rtsp-server has high latency

Tim Müller
In reply to this post by jlancaster
On Tue, 2016-09-27 at 15:54 -0700, jlancaster wrote:

Hi Jeff,

> I am on an embedded system with a built in camera streaming through
> v4l2. If I set my stream using (snip pipeline) I can stream it to my
> desktop with very low latency. 
>
> If I use the gstreamer-1.0 rtsp-server (snip pipeline) and stream to
> my own display:
>
> gst-launch-1.0 -v rtspsrc location=rtsp://localhost:5000/test !
> rtph264depay ! h264parse ! imxvpudec ! imxipuvideosink
>
> My latency is 2+ seconds.
>
> Any thoughts?

It's not gst-rtsp-server that has high latency, it's rtspsrc which
contains an rtp jitterbuffer that defaults to 2 seconds latency
(2000ms). Try with e.g. rtspsrc latency=200 or whatever.

Cheers
 -Tim

--
Tim Müller, Centricular Ltd - http://www.centricular.com

Join us at the GStreamer Conference!
10-11 October 2016 in Berlin,
Germany
http://gstreamer.freedesktop.org/conference/

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel