Tool

BD-rate Calculator

Encode with two encoders (or two settings) at several CRF steps, paste the resulting (bitrate, VMAF) points, and the tool calculates by what percentage the bitrate differs on average at the same quality. It also overlays the two curves. There is nothing to install or upload, and your input is processed only inside this browser.

Example: versus the x264 reference

Fills both boxes with points from this site's measurements (4 clips at 1080p25; x264 medium, x265 medium, SVT-AV1 preset 8, VP9 cpu-used 5). The reference is always x264.

Bitrate unitInterpolation

The first number on each line is read as the bitrate and the second as VMAF. Lines with letters, such as a header, are skipped. Use the same unit for A and B.

What is BD-rate?

BD-rate (Bjøntegaard Delta rate) overlays the ‘bitrate vs. quality curves’ of two encodes and, over the quality range both curves pass through, gives the average difference in the bitrate needed to reach the same quality as a percentage. If it is −20%, the test encode reaches the same quality with 20% less bitrate on average; if it is +20%, it uses that much more. Two files made with a single CRF each differ in both quality and size, so you cannot say right away which one is more efficient. Comparing the whole curve solves that problem.

The calculation goes like this. For each encode, build a curve with the score (VMAF) on the horizontal axis and the logarithm of the bitrate on the vertical axis. Over the score range where the two curves overlap, average the difference between the two log values, then convert that average back to a percentage. This tool takes that average by splitting the overlap range into 1,000 equal parts.

Which points should I enter?

  1. The points must be measured on the same source in the same way (resolution, frame rate and VMAF model). Apart from what you are comparing, change only one condition.
  2. Use 4 to 6 CRF steps so the scores spread widely. If the overlap range is narrow, the BD-rate is only the value for that narrow range.
  3. Write the bitrate and VMAF on each line, separated by a comma, tab or space. You can use the average VMAF from our VMAF log viewer or VMAF command builder, and the bitrate worked out from file size and duration (with the calculator).
  4. If you have several videos, calculate each clip separately and compare. Mixing clips into one curve blurs the meaning.

What do the settings do?

  • Exclude points at VMAF 99.5 and above: VMAF saturates near 100. Even a large bitrate increase barely raises the score, so the curve becomes almost vertical and the average gets pulled toward that region. The 99.5 threshold is a value chosen by this tool, not an academic standard, so turn the check off and compare if you need to.
  • PCHIP: an interpolation method that connects points monotonically. The curve does not oscillate even with many points, so it is the default.
  • Cubic polynomial: the approach of classic BD-rate implementations. With 4 points the curve passes through every point, and with 5 or more it is fitted by least squares. With many points or scores close to saturation, the curve can oscillate and the value can change. If the two methods differ a lot, suspect the points or the range.

Where does the example data come from?

The example buttons load the CSV of the Does a newer codec’s size gain differ by quality tier? measurement as it is. It holds 4 ten-second 1080p25 clips encoded at 6 steps each with x264 (medium), x265 (medium), SVT-AV1 (preset 8) and VP9 (cpu-used 5). That article shows the saving separately at VMAF 80, 85, 90, 95 and 98 on the same curves, while this tool gives the value averaged over the whole range. The data is the same but the view is different, so the numbers are not exactly equal. Head-to-head codec measurements are in x265 vs SVT-AV1 at equal VMAF and VP9 vs x265.

How do I use the result?

  • Deciding whether a settings change pays off: encode with the changed preset, tune or filter at the same CRF steps and paste both. Unlike comparing single files, where quality changes along with size, you get one number.
  • Comparing savings: BD-rate is an average over the overlap range, so if your target quality is fixed, look at the row for that quality in the ‘Same VMAF’ table. The range average and the value at your target point can differ.
  • Can I use PSNR points? If you enter PSNR as the second number, the calculation itself works. The 99.5 exclusion is meant for VMAF, though, so turn that check off. A different metric can give a different result; a case of that is in the measurement where PSNR and VMAF disagree.
  • If the value looks good, pick actual settings with the re-encode size predictor or the CRF recommender.

Limits worth knowing

  • This tool does not measure VMAF. It only builds curves from the points you paste, and how reliable the points are depends on the settings of whoever measured them.
  • BD-rate is an average within the overlap range. It does not hold outside that range (lower or higher quality), and if the curves cross, the range average can cancel the differences on both sides and come out near 0. Check the graph as well.
  • With few points the value is shaky. Fewer than 4 triggers a warning, but even with 4 to 6 the value can shift by a few percent depending on the interpolation method. Try both methods and compare.
  • The scope of the example data is 4 ten-second 1080p25 8-bit clips, one PC and one preset per codec. Results may differ with other presets, resolutions and content, and encoding time and playback compatibility are not part of BD-rate.
  • The interpolation and integration in this tool were written by this site. We did not cross-check the results against other tools (such as Python scripts), so for numbers going into a paper or report, verify them again with the standard implementation in your field.