大视频的视频视图

发布于 12-20 22:44 字数 304 浏览 2 评论 0原文

VideoView vv = (VideoView)this.findViewById(R.id.screen_video);
Uri uri = Uri.parse(URL);
vv.setVideoURI(uri);
vv.start();

我使用上面的代码来播放视频文件。 我成功播放了一个小视频。 但是当我尝试播放大视频时。 这是失败。 该文件可以通过我的手机播放。 如何使用videoview播放大视频文件? 或者说videoview有什么限制?

我在 logcat 中没有看到任何错误。 但它也没有显示缓冲百分比。

VideoView vv = (VideoView)this.findViewById(R.id.screen_video);
Uri uri = Uri.parse(URL);
vv.setVideoURI(uri);
vv.start();

I use above code to play video file.
I play a small video successly.
But when I try to play a large video.
It was Failure.
The file is can be play by my phone.
How to play a large video file with videoview?
Or what limitation of videoview has?

I didn't see any error in logcat.
But it also didn't show the buffering percentage.

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

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

发布评论

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

评论(1

为你鎻心2024-12-27 22:44:48

我不知道(也找不到)视频视图播放特定大小的视频的明确规范。
但对我来说,这取决于设备和使用的编解码器。
例如,无论视频大小如何,我的设备都能成功播放使用 MPEG4 (ASP) 编码的视频,但如果视频使用 H264 (MPEG4 AVC) 编码,并且视频大于屏幕尺寸,则该视频将无法正常工作。

我希望它有帮助!

I don't know (and I could not find) clear specifications for videoview to play a video of a certain size.
But to me it depends on the device and on the codecs used.
For instance my device plays video encoded with MPEG4 (ASP) successfully whatever the size of the video is but if the video is encoded with H264 (MPEG4 AVC) that does not work if the video is larger than the size of the screen.

I hope it helps!

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