Hi everybody, this is my first message, I hope I'm in the right place to ask this question: which (and how) parameters of AVCodecContext should I set to obtain a h264 video with constant bit rate?
I'm writing a program that encode a h264 video using the FFmpeg API: I've started with libavformat/output-example.c
and I've modified it to have a h264 video, with the following parameters (besides the ordinary ones), that are working fine for non-CBR mode (please note that if I remove any of these i get the famous "broken ffmpeg default settings detected" error):
c->qcompress = 0.6;
c->qmin = 10;
c->qmax = 30;
c->max_qdiff = 4;
c->i_quant_factor = 0.71;
Then I've tried to change values of the above parameters as:
c->qcompress = 0.0;
c->qmin = 10;
c->qmax = 10;
c->max_qdiff = 0;
c->i_quant_factor = 0.01
AND to set many values of many combinations of these parameters:
crf, bit_rate, bit_rate_tolerance, rc_buffer_size, rc_max_rate, rc_min_rate, rc_max_available_vbv_use, rc_min_vbv_overflow_use
but I'm still unable to get a video with CBR: when I run my program, at the end of the processing, when libx264 prints the informations about the video, there's "kb/s:inf" and in the property of the file created there's "Bitrate: N/A".
I've tried many different combinations of settings with these parameters and now I really don't know what else to try, so I hope you can help me. Thanks in advance.