user12259: Given an encoded video file with non-constant bitrate, how would one analyze the bitrate over time? So far I found one old program that produces a bitrate plot, but none that can give the raw data of the encoded frames.
I think bitrate data should be generated by averaging the size of a set of frames spanning 1 second--i.e. frames with a DTS belonging in that interval. So a 10 second video would have 10 data points describing the encoder input bitrate. Though I am curious to hear alternative ways of calculating bitrate.
Is there a way to get the size of each (encoded) frame? preferably with windows software. I know it is trivially easy for an uncompressed source (resolution * bitdepth * time).

user1871: It does not make sense to speak of the size of an encoded frame in an inter-coded video stream, which is typical of MPEG-X videos. I-frames are self-contained but P- and B- frames are predicted frames and the final decoded result uses data from various inputs. On the other hand, the size of a single Group of Pictures (GOP) may be a meaningful measure.
The FFmpeg segmenter in combination with a compatible demuxer can break apart the video stream at GOP boundaries. By specifying an ultra-low time for segment size, you can ensure that each segment contains 1 GOP. Running a ffprobe on each segment will then provide the bitrate for that GOP.
I tested the command below on MP4s which had 1) a variable-sized GOP, 2) an intra-coded scheme and 3) fixed GOP of unusual length (11 frames), and each output had the expected result.
ffmpeg -i input.mp4 -an -c:v copy -segment_time 0.00001 -f segment i%0d.mp4

Each segment contained exactly 1 I-frame (each segment of the intra input contained exactly 1 frame in all).
Running ffprobe on each segment gives a bitrate reading:
Duration: 00:00:00.37, start: 4.466016, bitrate: 1539 kb/s
Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
1280x720 [SAR 1:1 DAR 16:9], 1520 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)

The above one is from the 11-frame GOP, and has a bitrate of 1520 kbps.

12259: <p>Given an encoded video file with non-constant bitrate, how would one analyze the bitrate over time? So far I found one old program that produces a bitrate plot, but none that can give the raw data of the encoded frames.</p>

<p>I think bitrate data should be generated by averaging the size of a set of frames spanning 1 second--i.e. frames with a DTS belonging in that interval. So a 10 second video would have 10 data points describing the encoder input bitrate. Though I am curious to hear alternative ways of calculating bitrate.</p>

<p>Is there a way to get the size of each (encoded) frame? preferably with windows software. I know it is trivially easy for an uncompressed source (resolution * bitdepth * time).</p>
 1871: <p>It does not make sense to speak of the size of an encoded frame in an inter-coded video stream, which is typical of MPEG-<em><code>X</code></em> videos. I-frames are self-contained but P- and B- frames are predicted frames and the final decoded result uses data from various inputs. On the other hand, the size of a single Group of Pictures (GOP) may be a meaningful measure.</p>

<p>The FFmpeg segmenter in combination with a compatible demuxer can break apart the video stream at GOP boundaries. By specifying an ultra-low time for segment size, you can ensure that each segment contains 1 GOP. Running a ffprobe on each segment will then provide the bitrate for that GOP.</p>

<p>I tested the command below on MP4s which had 1) a variable-sized GOP, 2) an intra-coded scheme and 3) fixed GOP of unusual length (11 frames), and each output had the expected result.</p>

<pre><code>ffmpeg -i input.mp4 -an -c:v copy -segment_time 0.00001 -f segment i%0d.mp4
</code></pre>

<p>Each segment contained exactly 1 I-frame (each segment of the intra input contained exactly 1 frame in all).</p>

<p>Running ffprobe on each segment gives a bitrate reading:</p>

<pre><code>Duration: 00:00:00.37, start: 4.466016, bitrate: 1539 kb/s
Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
1280x720 [SAR 1:1 DAR 16:9], 1520 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
</code></pre>

<p>The above one is from the 11-frame GOP, and has a bitrate of 1520 kbps.</p>
