1. 为什么要用Main Profile & High Profile
在Android上硬编码视频码率远远高于软编码,原因是Android只支持H264 Baseline。MP(Main Profile )& HP(High Profile)可以大幅减少视频的码率。关于H264 Profile参见:H264 Profile。
2. Android平台对MP & HP的支持情况
2.1 Android
Google声称在Android 6.0就已经支持MP,但是6.0的源代码中还是强制使用Baseline:
if (h264type.eProfile != OMX_VIDEO_AVCProfileBaseline) {
ALOGW("Use baseline profile instead of %d for AVC recording",
h264type.eProfile);
h264type.eProfile = OMX_VIDEO_AVCProfileBasel