Dynamic GOP - 2023.1 English

H.264/H.265 Video Codec Unit v1.2 Solutions LogiCORE IP Product Guide (PG252)

Document ID
PG252
Release Date
2023-05-16
Version
2023.1 English

Dynamic GOP is the ability to change gop-length, number of B-Frames, and forcing IDR picture while the encoder is active.

To change the gop-length of the video at frame number 100 to 45:

zynqmp_vcu_encode -w 3840 -h 2160 -e avc -g 30 -o /run/op.h264 -i /run/input.yuv -d GL:100:45

To change the number of B-frames of the video at frame number 20 to 2:

zynqmp_vcu_encode -w 3840 -h 2160 -e avc -b 4 -o /run/op.h264 -i /run/input.yuv -d BFrm:20:2

To insert a key frame at frame number 35:

zynqmp_vcu_encode -w 3840 -h 2160 -e avc -b 4 -o /run/op.h264 -i /run/input.yuv -d KF:35

Guidelines for Dynamic Controls

  • Both the bitrate and the GOP length should be set to the largest possible value allowed by the application, to increase the video quality.
  • Dynamic parameters should not be changed frequently, as that may cause stability issues since the algorithm does not have time to settle. It is recommended that you wait for a time period of at least twice or thrice the GOP length when changing the dynamic parameters.
  • An Intra/IDR frame is inserted on the first frame corresponding to a scene change.
  • Dynamic GOP changes comes in effect immediately, that is, either the current GOP is closed earlier, or it is extended so that its actual size corresponds to the new parameters.
  • Dynamic bitrate changes are considered immediately (may impact the QP of the next frames). However, the new average target bitrate may take some time depending on the content, bitrate delta, and so on. It may take up to ~1 GOP duration to converge.