这几天在研究苹果ProRes422编码,查了很多资料居然都没有,经过几天的研究。
ffmpeg 新版本现在是可以支持封装格式MOV,编码格式PRORES422编码的。
其视频编码子类型
//ProRes422视频编码子类型
enum enumProRes422VideoEncodeSubType
{
eWXProRes422_Proxy = 0, // apco
eWXProRes422_LT = 1, // apcs
eWXProRes422 = 2, // apcn
eWXProRes422_HQ = 3, // apch
};
在AVCodecContext的设置即可。
if (pCodecCtx->codec_id == AV_CODEC_ID_PRORES)
{
pCodecCtx->gop_size = 1;
if (m_EncodeParam.vParam.nVideoEncodeSubType == (unsigned int)eWXProRes422_Proxy)
pCodecCtx->profile = 0;
else if (m_EncodeParam.vParam.nVideoEncodeSubType == (unsigned int)eWXProRes422_LT)
pCodecCtx->profile = 1;
else if (m_EncodeParam.vParam.nVideoEncodeSubType == (unsigned int)eWXProRes422)
pCodecCtx->profile = 2;
else if (m_EncodeParam.vParam.nVideoEncodeSubType == (unsigned int)eWXProRes422_HQ)
pCodecCtx->profile = 3;
else
pCodecCtx->profile = 2;
}