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

Ricky Houghton ricky.houghton at gmail.com
Thu Jan 23 18:15:46 PST 2014


I was able to successfully compile and run the tutorials on my Nexus 7
device. (Thanks to all who made this possible.)

I modified the code for Android Tutorial #4 slightly to serve up a live
stream from a H.264 device serving up a RTSP stream. The video displays
correctly and everything works nicely. I've left it running for more than
an hour with no issue.

However there is a constant delay of about 4 to 5 seconds on the video
stream. I've used Bing and Google to search for an answer, but can't seem
to find which buffer/cache variable might contribute to the delay. (The
code appears to ignore buffering if the stream is live, but there is
clearly some buffering underneath that is creating this delay)

Please note, the delay is constant over the hour, so I'm pretty sure the
decoder is able to keep up - and the latency/delay doesn't increase which
lends me to believe there is a buffer/cache value that is set rather high.

Thanks,

Ricky

btw, when the application starts, I do receive a few messages similar to
this one, however they quickly disappear once the video stream synchronizes
and stabilizes. It normally takes about 3 or 4 seconds for this, then
everything is fine. I do not see this message again, no matter how long I
run the encoder.

 01-23 21:10:54.550: W/GStreamer+amcvideodec(2319): 0:00:28.046864000
0x69d96860
gstamcvideodec.c:1025:gst_amc_video_dec_loop:<amcvideodec-omxnvidiah264decode0>
Frame is too late, dropping (deadline 0:00:00.194772226)

.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-android/attachments/20140123/a7fc7b6f/attachment.html>


More information about the gstreamer-android mailing list