Controlling cache or buffer length in RTSP H.264 live stream?

Sebastian Dröge sebastian at centricular.com
Sat Jan 25 21:29:24 PST 2014


On Sa, 2014-01-25 at 14:41 -0500, Ricky Houghton wrote:
> On Sat, Jan 25, 2014 at 11:56 AM, Sebastian Dröge <sebastian at centricular.com
> > wrote:
> 
> > On Fr, 2014-01-24 at 11:36 -0500, Ricky Houghton wrote:
> > > As a follow up, I have determined that the program, Tutorial #4,l thinks
> > > that the stream is "NOT LIVE", however it never hits the buffering_cb
> > > function in tutorial-4.c, so this function is not responsible for the
> > delay.
> >
> > Buffering only happens if the stream is not considered live, and for
> > RTSP streams only if the complete duration is known. What's the case
> > here?
> >
> 
> The duration is unknown so I would assume there is no buffering - but there
> is some somewhere.
> (N.B. the function Tutorial 4 function buffering_cb is never called, so
> there is no buffering happening here.)
> 
> The RTSP stream is coming from a hardware encoder running the TI DaVinci
> 8168. The particular
> encoder is here: http://www.neyasystems.com/products/uxstreamer - they have
> demonstrated 100ms
> video to network in the past. (These guys are my friends.) Network latency
> is single digit millisecond as the units are sitting
> on an isolated AP, encoder hardwired, Nexus 7 is only wireless device.
> 
> I have continued playing/exploring and I stumbled upon
> 
> g_object_get (data->pipeline, "buffer-duration", &bufdur,NULL);
> g_object_get(data->pipeline, "buffer-size", &bufsize,NULL);
> 
> Are these two values relevant, even if local buffering (in Tutorial 4) is
> not being used?

They are not used in this case, no.

> Can you point me to how I can control the rtspsrc buffer? I am using
> Tutorial 4 and have access to the
> pipeline etc, but not exactly clear how to access the rtspsrc filter and
> how I might set the parameters for the buffering?

playbin has the source-setup signal, which will be emitted when the
source element is created (rtspsrc in your case). You could connect to
that and then set the "latency" property of rtspsrc to a lower value.
You can also set different protocol value there, by default it will use
TCP if possible and falls back to UDP.

-- 
Sebastian Dröge, Centricular Ltd - http://www.centricular.com
Expertise, Straight from the Source
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 949 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/gstreamer-android/attachments/20140126/d4249b49/attachment.pgp>


More information about the gstreamer-android mailing list