HD および SD コンテンツのプロキシ ビデオを作成するために mpeg1 コーデックを使用しています。Mpeg1の解像度とビットレートは; HD ビデオ プロキシの場合: 704x576 4.5 Mbit SD ビデオ プロキシの場合: 352x288 1.5 Mbit
私のビデオ パラメータは次のようになります。パラメータを変更するためにパフォーマンスを向上させるにはどうすればよいですか...
よろしくお願いします、
AVCodecContext *c = &m_OutputCodecCtxVideo;
avcodec_get_context_defaults2( c, AVMEDIA_TYPE_VIDEO );
c->codec_id = CODEC_ID_MPEG1VIDEO;
c->codec_type = AVMEDIA_TYPE_VIDEO;
c->pix_fmt = PIX_FMT_YUV420P;
if( bHD ){
c->width = 704;
c->height = 576;
c->sample_aspect_ratio.num = 16;
c->sample_aspect_ratio.den = 11;
c->bit_rate = 4500000;
}
else{
c->width = 352;
c->height = 288;
c->sample_aspect_ratio.num = 12;
c->sample_aspect_ratio.den = 11;
c->bit_rate = 1500000;
}
c->time_base.num = 1;
c->time_base.den = 25;
c->gop_size = 15;
c->max_b_frames = 2;
// Needed to avoid using macroblocks in which some coeffs overflow.
// This does not happen with normal video, it just happens here as
// the motion of the chroma plane does not match the luma plane.
c->mb_decision = 2;
// some formats want stream headers to be separate
if( m_pFormatCtxDst->oformat->flags & AVFMT_GLOBALHEADER )
c->flags |= CODEC_FLAG_GLOBAL_HEADER;
m_OutputCodecCtxVideo.thread_count = 0;