Received wrong frame data with ExtractMpegFramesTest in Android?

时光毁灭记忆、已成空白 提交于 2019-12-13 18:25:26

问题


I'm trying to get frames by using MediaCodec and found ExtractMpegFramesTest.java example from this site http://bigflake.com/mediacodec/ . I could save the frames but it looks a little weird. I don't really know what was wrong with it. Maybe color space?

Here is the frame: https://drive.google.com/file/d/0BxhKRYTBr4adMGJ1aWhHNjdHUDg/edit?usp=sharing

Many thanks in advance.

Edit:

Things worked well if the video resolution is 480x360 with Gadmei tablet. If it's bigger, I will get similar results as above (green screen with part of the frame). Is this the limitation of MediaCodec or the example that I was working on?

Edit 2:

It worked fine with big resolution 1920x1080 on Nexus 7. Maybe it is the problem of the device.


回答1:


what resolution produces bad output on what device?

you can look at: Android: MediaCodec: bad video generated on Nexus for 480x480 while 640x640 works well

may be you have the same issue



来源:https://stackoverflow.com/questions/25356314/received-wrong-frame-data-with-extractmpegframestest-in-android

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