播放视频时我在 logcat 上收到这些错误
Logcat:
E/VDO_LOG(132): [Err] ? un-support type of NAL
E/OMXCodec(132): [OMX.MTK.VIDEO.DECODER.AVC] No more output data in fillOutputBuffer, mFilledBuffers size=17
E/FlvExtractor(132): [ERROR]:Not an FLV file!!!
它不会使程序崩溃,但有时我会在视频中看到一些错误
视频播放器代码:
String fileName = "android.resource://" + getPackageName() + "/" + R.raw.myVideo;
vv = (VideoView) this.findViewById(R.id.surface);
vv.setVideoURI(Uri.parse(fileName));
vv.setOnCompletionListener(this);
vv.start();
视频文件信息:
length : 8 seconds
width : 720 px
height : 1280 px
total data rate : 5403 kbits / s
fps : 25 images / s
type : MP4
codec : H264 - MPEG-4 AVC (part10) (avc1)
可能出现什么问题,如何解决?
最佳答案
H264 - MPEG-4 AVC(第 10 部分)是问题所在。大多数 Android 设备无法播放它。你的代码没有问题。 检查此链接以了解有效方法。您需要 MPEG-4 基线流。 http://developer.android.com/guide/appendix/media-formats.html#recommendations
关于java - Android播放视频Logcat报错[OMX.MTK.VIDEO.DECODER.AVC] fillOutputBuffer中没有更多输出数据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22239135/