简体   繁体   中英

Android live video streaming delay

I'm trying to play an axis video stream over rtsp in a VideoView on my HTC Desire HD. Currently there is a delay of 7 seconds on the video when I play it on the HTC Desire HD.

Is there a way to reduce this delay?

I have tried to play the video stream on my computer with vlc and it works with a delay of 0,5 seconds. When I reduced the framerate, bitrate and resolution the delay still stays at 7 seconds. I have tried functions as prepareasync and seekto but I could not get them to work.

Has anyone got live video working with the VideoView wrapper or the MediaPlayer?

As far as I can tell from looking through the Gingerbread (Android 2.3.3) source code implementing MediaPlayer (which VideoView is based on), there is no way to change the buffer settings. MediaPlayer seems inherently designed for playback, where gaps and errors must be avoided at all costs. For live streaming like video chat, low latency is more important than gaps and errors.

There is currently an effort to port GStreamer to Android, which should provide tools for doing low-latency video streaming.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM