videoview for large video

为君一笑 提交于 2019-12-02 17:23:31

问题


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.


回答1:


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!



来源:https://stackoverflow.com/questions/8485413/videoview-for-large-video

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!