2 u013527163 u013527163 于 2015.06.04 21:54 提问

ffmpeg avcodec_open2问题

AVCodecContext c;
c->bit_rate = 400000;
c->width = width;

c->height = height;

c->time_base = avRate;

c->lmin = 1;
c->lmax = 1000;
c->me_method = 8;

c->me_range = 16;

c->me_subpel_quality = 7;

c->qmin = 10;

c->qmax = 51;
c->gop_size = 12; /
emit one intra frame every twelve frames at most */

c->pix_fmt = PIX_FMT_YUV420P;

if (c->codec_id == CODEC_ID_MPEG2VIDEO) {

c->max_b_frames = 2;

}

if (c->codec_id == CODEC_ID_MPEG1VIDEO){

c->mb_decision=2;

avcodec_open2宽度和高度不同时有时打开成功,有时失败,如1366*768打开成功,1365*767打开失败

1个回答

qq_28763887
qq_28763887   2015.06.05 11:51

不好意思 ,帮不上你的忙 了,想了好久还是想不出

u013527163
u013527163 我对照了两种情况的参数,只有宽度和高度不同
2 年多之前 回复
Csdn user default icon
上传中...
上传图片
插入图片