编码器设置,去除B帧的方法

  1. 方法一
c->max_b_frames = 0;   
ret = avcodec_open2(c, codec, NULL);
  1. 方法二
AVDictionary *d = NULL;
av_dict_set_int(&d,"bf",0,0);
ret = avcodec_open2(c, codec, &d);
  1. 方法三
AVDictionary *d = NULL;
av_dict_set(&d,"x264opts","bframe=0",0);    //实际验证未成功,todo
ret = avcodec_open2(c, codec, &d);

你可能感兴趣的:(编码器设置,去除B帧的方法)