RTSP Latency

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

RTSP Latency

cowprod
HI all,

I'm new to the list.

I'm trying to play RTSP video stream (NO AUDIO needed) from an Auvidea E110-W encoding board with optional wifi board:


to an iOs device (iPad Pro is the target of the project) using gstreamer 1.7.91, I made my tests with the help of 


I reduced latency by setting it to 0 and I have a 200ms/300ms in the real life with

static void source_setup(GstElement *playbin, GstElement *source, gpointer user_data)

{

    g_object_set(source,"latency", 0, NULL);

}

we also tested this iOs App (Auvidea advice):

https://itunes.apple.com/fr/app/rb-ultra/id906668027?mt=8

in the same conditions (same board, same iOs device) and we have 150ms of latency.

Any idea to get the same latency result (or better) ?


Regards


Emmanuel



_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: RTSP Latency

cowprod
no "visible" change for latency with gst_player_set_audio_track_enabled to false, we are still about 200ms of latency .

Some tests have been done this morning in the lab with the same encoding board but without the optional wifi board (with a standard access point)

Sorry original email from the lab is in french

premier test ce matin :
 
with GstPlay : latency : 300 250 300 230 270
with RB ultra (from the appstrore), internal latency parameter :100 ms  : latency :  160 150 160

the difference is visible on screens

Changing encoding parameter (on auvidea board) from 2000  to 6000 give best quality with the same latency

Any idea to reduce gstPlay latency ? any decoding parameters  ?



 
Reply | Threaded
Open this post in threaded view
|

Re: RTSP Latency

Tim Müller
On Wed, 2016-03-30 at 06:45 -0700, cowprod wrote:

Hi,

In addition to the rtpjitterbuffer the audiosink will also contribute
to latency, and you may want to set properties on it to configure it
for low latency.

Cheers
 -Tim

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


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: RTSP Latency

Sebastian Dröge-3
On Mi, 2016-03-30 at 21:27 +0100, Tim Müller wrote:
> On Wed, 2016-03-30 at 06:45 -0700, cowprod wrote:
>
> Hi,
>
> In addition to the rtpjitterbuffer the audiosink will also contribute
> to latency, and you may want to set properties on it to configure it
> for low latency.

Also check which video decoder is used, which h264 profile is used and
if you really don't have any audio elements left in the pipeline when
using gst_player_set_audio_track_enabled(player, FALSE).

Also how exactly are you measuring the latency?

--
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 (968 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: RTSP Latency

cowprod
Hi,

I use default settings from gstPlay.
I'm going to search how decoder is set.

I don't understand the last point, you mean "check if you really don't have any audio elements left " ?
Reply | Threaded
Open this post in threaded view
|

Re: RTSP Latency

cowprod
In reply to this post by Tim Müller
Hi Tim,

Is it not enough to set gst_player_set_audio_track_enabled(player, FALSE) ?

regards

Emmanuel
Reply | Threaded
Open this post in threaded view
|

Re: RTSP Latency

Tim Müller
On Thu, 2016-03-31 at 03:49 -0700, cowprod wrote:

> Is it not enough to set gst_player_set_audio_track_enabled(player,
> FALSE) ?

Yes, sorry, I misremembered the original message and thought it was
just audio, not just video. If there's no audio then there's no latency
from the audio sink of course.

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


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: RTSP Latency

cowprod
In reply to this post by cowprod
Hi Sebastian,

I'm trying to retrieve information about the decoder use to play the current RTSP stream.

Are gst_registry_get() and then gst_registry_get_feature_list () the good directions ?

It seems some page of the documentation are missing on the server (404)

https://gstreamer.freedesktop.org/usr/share/gtk-doc/html/glibglib-Doubly-Linked-Lists.html#GList
https://gstreamer.freedesktop.org/usr/share/gtk-doc/html/gobjectgobject-Type-Information.html#GType
(404)

cheers
Reply | Threaded
Open this post in threaded view
|

Re: RTSP Latency

Sebastian Dröge-3
On Fr, 2016-04-01 at 07:08 -0700, cowprod wrote:
> Hi Sebastian,
>
> I'm trying to retrieve information about the decoder use to play the current
> RTSP stream.

The easiest would be to just take a look at the debug logs. The second
easiest would be to use the GstBin API to iterate through playbin once
it started playback, i.e. gst_bin_iterate() and
gst_bin_iterate_recurse() could be useful here.

Basically, if there is no audio in your pipeline anymore, the only
latency you will observe from GStreamer is a) the video decoder latency
and b) the rtpjitterbuffer latency.

a) is most likely using vtdec here, Apple VideoToolbox based decoder.
Unfortunately that API does not provide proper latency information so
we're doing guesses here, and those guesses are better if you use
baseline profile.
You could alternatively try the libav software decoder, avdec_h264.

b) is what you configure on rtspsrc.

--
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 (968 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: RTSP Latency

cowprod
May I post here gst-player debug  ? or a link to the debug ?

2016-04-04 9:27 GMT+02:00 Sebastian Dröge-3 [via GStreamer-devel] <[hidden email]>:
On Fr, 2016-04-01 at 07:08 -0700, cowprod wrote:
> Hi Sebastian,
>
> I'm trying to retrieve information about the decoder use to play the current
> RTSP stream.

The easiest would be to just take a look at the debug logs. The second
easiest would be to use the GstBin API to iterate through playbin once
it started playback, i.e. gst_bin_iterate() and
gst_bin_iterate_recurse() could be useful here.

Basically, if there is no audio in your pipeline anymore, the only
latency you will observe from GStreamer is a) the video decoder latency
and b) the rtpjitterbuffer latency.

a) is most likely using vtdec here, Apple VideoToolbox based decoder.
Unfortunately that API does not provide proper latency information so
we're doing guesses here, and those guesses are better if you use
baseline profile.
You could alternatively try the libav software decoder, avdec_h264.

b) is what you configure on rtspsrc.

--
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 (968 bytes) Download Attachment



If you reply to this email, your message will be added to the discussion below:
http://gstreamer-devel.966125.n4.nabble.com/RTSP-Latency-tp4676606p4676722.html
To unsubscribe from RTSP Latency, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: RTSP Latency

Sebastian Dröge-3
On Do, 2016-04-07 at 06:49 -0700, cowprod wrote:
> May I post here gst-player debug  ? or a link to the debug ?

Attach to a mail if it's small enough, otherwise something like dropbox
will do.

--
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 (968 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: RTSP Latency

cowprod
Hi,

Here is the gst-player log 


I do not find the information about the decoder used, may be a log level to change ?

Emmanuel

2016-04-07 18:42 GMT+02:00 Sebastian Dröge-3 [via GStreamer-devel] <[hidden email]>:
On Do, 2016-04-07 at 06:49 -0700, cowprod wrote:
> May I post here gst-player debug  ? or a link to the debug ?

Attach to a mail if it's small enough, otherwise something like dropbox
will do.

--
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 (968 bytes) Download Attachment



If you reply to this email, your message will be added to the discussion below:
http://gstreamer-devel.966125.n4.nabble.com/RTSP-Latency-tp4676606p4676797.html
To unsubscribe from RTSP Latency, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: RTSP Latency

Sebastian Dröge-3
On Fr, 2016-04-08 at 04:34 -0700, cowprod wrote:
> Hi,
>
> Here is the gst-player log 
>
> https://drive.google.com/open?id=0B43kTniIx1jNNDliWkZyM18zOEU
>
> I do not find the information about the decoder used, may be a log
> level to change ?

Yes, try using log level 6 for everything. This now only contains the
GstPlayer specific log output, which is rather uninteresting for your
case.

--
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 (968 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: RTSP Latency

cowprod
Hi Sebastian,

I used

    gst_debug_set_default_threshold(GST_LEVEL_LOG ); //6

instead of 

    gst_debug_set_threshold_for_name("gst-player", GST_LEVEL_TRACE);

and the result is really really big :) I tried to find witch decoder is used by default but without success (I certainly missed it !)

can I filter with gst_debug_set_threshold_for_name ? on witch name ?

If you have a moment to look at the following log file you may find what we are looking for


regards

Emmanuel

2016-04-12 8:35 GMT+02:00 Sebastian Dröge-3 [via GStreamer-devel] <[hidden email]>:
On Fr, 2016-04-08 at 04:34 -0700, cowprod wrote:
> Hi,
>
> Here is the gst-player log 
>
> https://drive.google.com/open?id=0B43kTniIx1jNNDliWkZyM18zOEU
>
> I do not find the information about the decoder used, may be a log
> level to change ?

Yes, try using log level 6 for everything. This now only contains the
GstPlayer specific log output, which is rather uninteresting for your
case.

--
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 (968 bytes) Download Attachment



If you reply to this email, your message will be added to the discussion below:
http://gstreamer-devel.966125.n4.nabble.com/RTSP-Latency-tp4676606p4676850.html
To unsubscribe from RTSP Latency, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: RTSP Latency

Sebastian Dröge-3
On Do, 2016-04-14 at 08:26 -0700, cowprod wrote:

> Hi Sebastian,
>
> I used
>     gst_debug_set_default_threshold(GST_LEVEL_LOG ); //6
> instead of 
>     gst_debug_set_threshold_for_name("gst-player", GST_LEVEL_TRACE);
> and the result is really really big :) I tried to find witch decoder is used by default but without success (I certainly missed it !)
>
> can I filter with gst_debug_set_threshold_for_name ? on witch name ?
>
> If you have a moment to look at the following log file you may find what we are looking for
It uses vtdec, which is not perfect and not really controllable about
latency. (Also don't set a latency of 0 on rtpsrc/rtpjitterbufer!)

Your pipeline is also configured with a latency of 0, so in theory
there shouldn't be any latency and nothing should work at all as 0 is
clearly wrong for anything going over the network.

--
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 (968 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: RTSP Latency

cowprod
For my information where do you see the use of vtdec in the log file ?

I'm going to make ne logs with for exemple 200ms and try to understand if there is an impact on real latency or not.

2016-04-18 8:34 GMT+02:00 Sebastian Dröge-3 [via GStreamer-devel] <[hidden email]>:
On Do, 2016-04-14 at 08:26 -0700, cowprod wrote:

> Hi Sebastian,
>
> I used
>     gst_debug_set_default_threshold(GST_LEVEL_LOG ); //6
> instead of 
>     gst_debug_set_threshold_for_name("gst-player", GST_LEVEL_TRACE);
> and the result is really really big :) I tried to find witch decoder is used by default but without success (I certainly missed it !)
>
> can I filter with gst_debug_set_threshold_for_name ? on witch name ?
>
> If you have a moment to look at the following log file you may find what we are looking for
It uses vtdec, which is not perfect and not really controllable about
latency. (Also don't set a latency of 0 on rtpsrc/rtpjitterbufer!)

Your pipeline is also configured with a latency of 0, so in theory
there shouldn't be any latency and nothing should work at all as 0 is
clearly wrong for anything going over the network.

--
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 (968 bytes) Download Attachment



If you reply to this email, your message will be added to the discussion below:
http://gstreamer-devel.966125.n4.nabble.com/RTSP-Latency-tp4676606p4676955.html
To unsubscribe from RTSP Latency, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: RTSP Latency

Sebastian Dröge-3
On Mo, 2016-04-18 at 00:51 -0700, cowprod wrote:
> For my information where do you see the use of vtdec in the log file
> ?

Just search for the string "vtdec" :)

> I'm going to make ne logs with for exemple 200ms and try to
> understand if there is an impact on real latency or not.

Basically check the logs for the word "latency". Somewhere the pipeline
is doing a latency query and then collecting the latencies of each
branch of the pipeline and then configuring a latency with the latency
event.
That's the part you'll have to look at, you can see how much latency
each part of the pipeline claims to introduce there.

--
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 (968 bytes) Download Attachment