Android 视频直播延迟

发布于 2024-11-01 01:45:45 字数 279 浏览 0 评论 0原文

我正在尝试在 HTC Desire HD 上的 VideoView 中通过 rtsp 播放轴视频流。目前,当我在 HTC Desire HD 上播放视频时,视频有 7 秒的延迟。

有没有办法减少这种延迟?

我尝试使用 vlc 在我的计算机上播放视频流,它的延迟为 0.5 秒。当我降低帧率、比特率和分辨率时,延迟仍然保持在 7 秒。我尝试过prepareasync 和seekto 等功能,但无法让它们工作。

有没有人使用 VideoView 包装器或 MediaPlayer 进行实时视频处理?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

紙鸢 2024-11-08 01:45:45

据我所知,通过查看实现 MediaPlayer(VideoView 所基于的)的 Gingerbread(Android 2.3.3)源代码,无法更改缓冲区设置。 MediaPlayer 似乎本质上是为播放而设计的,必须不惜一切代价避免间隙和错误。对于视频聊天等实时流媒体,低延迟比间隙和错误更重要。

目前正在努力将 GStreamer 移植到 Android,这应该会提供用于低延迟视频流的工具。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文