Specify the maximum number of B-frames that can be used in a GOP and set the GOP mode to
adaptive using GopCtrlMode=ADAPTIVE_GOP
in the encoder configuration
file at control software and gop-mode=adaptive
at GStreamer. The
encoder adapts the number of B-frames used in the GOP pattern based on heuristics on the
video content. The encoder does not go higher than the maximum number of B frames that
you specified.