Tool

Bitrate Over Time Graph for Video Files

The bitrate shown in a file's info is a single overall average. This tool reads the size of every frame and shows how the bitrate moves over time, where the sharpest spike is, and whether any stretch goes over a cap you set. Your video file is read only inside this browser.

MKV, WebM or fragmented MP4 → paste ffprobe output

Run the command below in a terminal and paste the resulting lines (time,size). Each line looks like 0.000000,52341.

ffprobe -v error -select_streams v:0 -show_entries packet=pts_time,size -of csv=p=0 input.mkv > packets.csv

Why the average bitrate isn't enough

The bitrate of a video file is usually just the average: file size ÷ duration. But an encoder spends different amounts of bits on different scenes. Low-motion scenes get fewer, while complex scenes and keyframes (I-frames) get more. As covered in the CQP, CRF and ABR lesson, CRF holds quality constant, so a bitrate that swings widely is normal. Live streaming is the opposite case: there, keeping the bitrate pinned down comes first. Even when the average is the same, a momentary peak above your line's limit can cut off a stream or get an upload rejected, so you need to look at it per interval.

What does this tool calculate?

  • What it reads: the frame size table (stsz) and the timing tables (stts, ctts) in the MP4 or MOV header. It doesn't decode the video, so even large files load quickly. These sizes are the byte counts of the compressed frames.
  • Bitrate per interval: for each window of the length you choose (1 second by default), it adds up the sizes of the frames displayed in that window and divides by the window length. A shorter window makes peaks look higher; a longer one flattens them. The leftover tail at the end, where the window isn't full, is left out of the statistics.
  • Peak: the highest window and its ratio to the average, plus the size and position of the single largest frame. A keyframe is usually the largest.
  • Stretches over the cap: enter a cap (kbps) and windows above it are painted red and grouped into continuous stretches with their times.
  • VBV check: a simple model that assumes the decoder buffer keeps filling at maxrate and each frame leaves it all at once at its decode time. It assumes the buffer starts full, and finds the bufsize needed to keep the buffer from ever running empty as the maximum of (sum of frame bits over a continuous stretch − maxrate × time). If you enter a bufsize yourself, it also counts the frames the buffer falls short for.

How can you use the result?

  • Checking streaming and upload limits: enter the limit as the cap and see whether any red stretch appears. Limit numbers differ by service and change over time, so this page doesn't list fixed values. Check the service's official guidance and enter it. To work out a safe bitrate from your connection speed, use the streaming upload speed planner.
  • Seeing how much a CRF file spikes: even at the same average, a large peak ratio makes a CRF result hard to use as is for live streaming or a fixed-rate line. In that case, you can use the bufsize the tool reports as a starting point for choosing -maxrate and -bufsize.
  • Comparing before and after: encode the same source with plain CRF and with a -maxrate -bufsize limit, then load the two files one after the other to see how the peak and the required bufsize change. For the change in average size and quality, look at the size and bitrate calculator or the CRF vs. bitrate measurement.
  • Finding where quality breaks down: if the bitrate suddenly drops in a stretch, you can compare the quality at that time with the per-frame scores in the VMAF log viewer.

When the file is MKV, WebM, or can't be read from the header

MKV, WebM and fragmented MP4 files have no frame table in the file header, so the tool can't read them directly. Instead, extract each packet's time and size with ffprobe and paste the output, and it draws the same graph. Use the command below exactly as written. The column order (time, size) matters, so don't add other fields to -show_entries.

ffprobe -v error -select_streams v:0 -show_entries packet=pts_time,size -of csv=p=0 input.mkv > packets.csv

-select_streams v:0 selects only the first video stream, and size is the packet's size in bytes. This method doesn't get decode times separately and uses presentation times instead, so the VBV figure for a file with B-frames is an approximation.

Limitations worth knowing

  • Only the frame sizes of the video track are counted. Audio and container or transport overhead (RTMP, HLS segments and so on) are left out, so the amount actually carried over your connection is larger.
  • VBV is a simplified model. The initial buffer fullness of a real encoder or platform, and the buffer rules of hardware decoders, may differ, so a “pass” here doesn't guarantee a pass on that service. Put the target service's requirements first.
  • The instantaneous rate your connection actually receives depends on the transport method and buffering, so it helps to look at the graph with several window lengths.
  • Only MP4 and MOV (M4V) are read directly. Files with more than 3 million frames or a header larger than 400 MB are not read.
  • This page doesn't include measurements of how much the bitrate varies for a particular codec or setting. The amount of variation depends heavily on the video content and encoder settings, so load your own file to check.
  • The file is not sent to a server, and this tool doesn't modify or save the file.