I have a h264 file that extract from YUV format using SVC software. Now, I want to caculate size of each GOP in the h264 file. We know that size of GOP is the distance between two nearest I frame. here. Could you suggest to me how to cacluate the GOP size of a given h264 file. It is better when we implement it by C/C++.Thank you
I personally prefer filtering by pict_type:
ffprobe -show_frames input.h264 | grep pict_type
This will show you the frame structure:
pict_type=I
pict_type=P
pict_type=P
pict_type=P
pict_type=P
pict_type=P
...