Android: cannot play mp4 video

血红的双手。 提交于 2019-12-01 05:48:17

The problem might be with the video encoding. Android FROYO and Gingerbread doesn't support H264 formats other than "Baseline" H264. So if your video is Mp4 & H264 encoded make sure its "AVC baseline" encoded. Use some tools like "Media info" in windows/Linux and check your video encoding.

Some Froyo devices (e.g., Samsung Galaxy Tab) use the OpenCore mediaframework while others use Stagefright. From gingerbread all devices to my knowledge use Stagefright. So this could maybe explain your experience.

When playing over HTTP or RSTP there are additional constraints for the video container.

from the developer docs:

For 3GPP and MPEG-4 containers, the moov atom must precede any mdat atoms, but must succeed the ftyp atom.

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