1

我正在使用 mpeg1 编解码器来创建我的高清和标清内容的代理视频。Mpeg1 分辨率和比特率是;高清视频代理:704x576 4.5 Mbit 标清视频代理: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;
4

0 回答 0