C++ アプリで ffmpeg コードを使用しており、そこで VIDEO の bit_rate パラメーターを制御したいと考えています。仕事でその値を変更しようとしました(ost-> st-> codec-> codec-> bit_rateを介して)が、ffmpegはそれを変更したくありませんでした。もしかしたら作り方知ってる人いる?
何か案は?
私はこのように試してみましたが、それは私のために働いています。
avcodec_init();
avcodec_register_all();
codec = avcodec_find_encoder(CODEC_ID_H263);
c = avcodec_alloc_context();
picture= avcodec_alloc_frame();
c->bit_rate = bitrate;
c->width = w;
c->height = h;
c->time_base= (AVRational){1,framerate};
c->pix_fmt = PIX_FMT_YUV420P;
avcodec_close(c);
av_free(c);