[FFmpeg-devel] Adding option B does not work

Moritz Barsnick barsnick at gmx.net
Fri Nov 24 12:44:00 EET 2017

On Thu, Nov 23, 2017 at 14:41:45 +0000, shailender Jain wrote:
> I am trying to ensure that a specific number of B Frames should be
> used by FFMPEG. I am running the following command

This list is solely for the discussion of the development of ffmpeg and

For usage questions, please refer to the list ffmpeg-user.

> However, when i look at the stats.txt, i cannot see 16 B-Frames. Is
> there any way this can be done? I want to find a way by which i can
> enforce if a frame will be B-Frame or P-Frame or I-Frame. Is this
> feasible? If not, then please help me identify the source code where
> i can update the code

"-bf" only specifies the *maximum* number of B-frames. The encoder - in
this case x264 - makes its own decisions, and will rarely choose 16.
You can influence x264's decisions by using some of its special
options, and passing them via ffmpeg's "-x264opts". See here (and
slightly below) for a lot of options which *may* actually make x264
create 16 B-frames:


More information about the ffmpeg-devel mailing list