大型视频的videoview [英] videoview for large video
问题描述
VideoView vv = (VideoView)this.findViewById(R.id.screen_video);
Uri uri = Uri.parse(URL);
vv.setVideoURI(uri);
vv.start();
我使用上面的代码播放视频文件. 我成功播放了一个小视频. 但是当我尝试播放大型视频时. 这是失败. 该文件可以用我的手机播放. 如何使用videoview播放大视频文件? 还是videoview有什么局限性?
我在logcat中没有看到任何错误. 但是它也没有显示缓冲百分比.
我不知道(而且我也找不到)明确的videoview规范来播放特定大小的视频. 但是对我来说,这取决于设备和所使用的编解码器. 例如,无论视频大小如何,我的设备都能成功播放使用MPEG4(ASP)编码的视频,但是如果视频使用H264(MPEG4 AVC)编码,则如果视频大于屏幕大小,则无法正常工作.>
希望对您有帮助!
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.
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!
这篇关于大型视频的videoview的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!