Android - 使用 VideoView 缓冲延迟

发布于 2024-09-03 17:23:20 字数 167 浏览 1 评论 0原文

我正在使用 VideoView 在我的应用程序中显示视频。问题是,一旦创建了布局,视频开始播放之前就会有近 10-30 秒的延迟。我可以在 LogCat 中看到视频在延迟期间正在缓冲。

有没有办法可以最大限度地减少这种延迟,或者告诉 MediaPlayer 更快地播放视频?

谢谢 克里斯

I am using VideoView to display a video in my app. The problem is that, once the layout gets created there is lag of almost 10-30 seconds before which the video starts to play. I can see in LogCat that the video is buffering during the lag.

Is there a way I can minimize this lag, or tell MediaPlayer to play the video sooner?

Thanks
Chris

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

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

发布评论

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

评论(1

攒眉千度 2024-09-10 17:23:20

如果您使用 RTSP 流媒体,缓冲是您获得更无缝播放的原因。
如果您正在播放音频/视频文件,请降低文件的比特率编码。

if you are using RTSP Streaming, buffering is the reason of what you have more seamless playback.
if you are playing an Audio/Video file reduce the bit rate encoding of your files.

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