H264 intra frame size

I’m using gstreamer to encode H264, I’m testing the usability of different length of GOP over the same input, at the same bitrate, and something is looking wrong.
I was expecting that as the GOP length would be shorter (say 6 compared to 30) - hence the I frame size (in bits) would be smaller - instead of that, the I frame size looks the same, which leads to smaller P frames and deviation from the bitrate limit.
I have configured the stream as CBR, bitrate=3Mbps, qp factors=0,50 (tried different values for “vbv” and “stringent bit mode”)

At CBR mode, should GOP length influence I frame size? in order not to exceeds bitrate limit? if so, should I configured something else?

The function you require is close to GDR on Jetpack 4.6.1, For more information, please check discussion in this topic:
GDR in H265 encoding not working as expected

It is not ready on r28 release. We would suggest upgrade your release version and use jetson_multimedia_api. If you have to use r28 releases, the suggestion is same as this:
H264 encoding intra refresh - #5 by DaneLLL
After setting EnableTwopassCBR=true EnableStringentBitrate=true, you should see less deviation in size between I and P frames when comparing to EnableTwopassCBR=false EnableStringentBitrate=false. However, video quality can be worse.

thanks for your reply, but this question isnt about GDR, this question related to the “macro” level of the stream being CBR (i.e. time interval bigger than 1 sec).

I have configured “EnableTwopassCBR=true” , “EnableStringentBitrate=true” , “bitrate=3Mbps” and I have tested 2 scenarios: GOP=30 and GOP=6 encoding the same input movie, I’ve noticed that in both cases the I frames have approx. the same size (@Bytes) which leads to deviation from the the bitrate limit, when using GOP=6.

hence, my question is, if and how GOP length affect I frame size (assuming, I have to use, in some application such a short GOP length)

In the mode it is strict to fit bitrate setting, so you should see close-to-3Mbits compressed data per second. Should not have much deviation in I frame size.

One case is bitrate is too small for the resolution and the target bitrate cannot be achieved. Here is a relevant topic:
Constant Bitrate help - #12 by DaneLLL

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.