How to Calculate Encoding Ratio for Video & Audio: Step-by-Step

The Direct Answer: Encoding Ratio Formula

To calculate encoding ratio, divide the uncompressed source bitrate by the encoded output bitrate. The result is expressed as X:1, where X equals uncompressed ÷ encoded. For example, a 1080p30 8-bit 4:2:0 video stream running at 746 Mbps that encodes to 37.3 Mbps HEVC has a 20:1 encoding ratio.

This definition differs from generic data compression ratio because we compare continuous bitrates, not static file sizes. In my first streaming job for a regional sports network in 2018, I mistakenly used final MP4 size divided by raw capture size. That ignored variable frame timing and audio interleaving, causing me to overestimate bandwidth savings by nearly 15% and blow the CDN budget.

If you want to skip manual math, our Encoding Ratio Calculator automates the division, but understanding the steps prevents poor codec choices downstream.

What Encoding Ratio Really Means (And Why It’s Not Compression Ratio)

Most articles ranking for how to calculate encoding ratio actually describe file compression ratio: original bytes ÷ compressed bytes. That works for ZIP archives but fails in media workflows. Encoding ratio measures how much a codec shrinks a signal’s data rate while preserving perceptual quality.

The thing nobody tells you about encoding ratio is that it is content-dependent. A 20:1 ratio on a static talking-head video is trivial; the same 20:1 on high-motion sports may show blocking because the encoder ran out of bits. I learned this when a client’s hockey stream at CRF 20 delivered only 12:1 on raw capture but jumped to 25:1 on rehearsal slides.

Encoding ratio is a rate ratio, not a file-size ratio. Always measure bits per second, not bytes per file.

Uncompressed Source Bitrate Is the Foundation

For video, uncompressed bitrate = pixel count × framerate × bits per pixel (accounting for chroma subsampling). For 8-bit 4:2:0, each pixel averages 12 bits (8 for luma, 2 each for chroma). A 1920×1080 frame at 30 fps needs 1920×1080×30×12 = 746,496,000 bits per second, or ~746 Mbps.

For audio, uncompressed PCM bitrate = sample rate × bit depth × channels. CD audio (44.1 kHz, 16-bit, stereo) is 1,411 kbps. These numbers are your baseline before any codec touches the signal.

Encoded Bitrate Comes From the Codec

The encoded bitrate is what your encoder emits: a CBR setting, a VBR average, or an ABR ladder segment. If you use constant rate factor (CRF), you must measure the resulting file’s average bitrate over time because CRF targets quality, not a fixed rate. We’ll cover that later in the CRF section.

Step-by-Step: How to Calculate Encoding Ratio for Video

Follow this spreadsheet-style workflow I use for every ingest validation. It takes five minutes and has saved me from under-provisioning CDNs twice.

1. Determine Raw Pixel Throughput

Write resolution (W×H), fps, and bit depth/chroma in a row. Multiply them as shown above. If you’re unsure of exact frame dimensions, our Aspect Ratio Calculator confirms pixel grids for non-square pixel formats.

2. Compute Uncompressed Bitrate

Use the formula: Uncompressed Mbps = (W × H × fps × bits_per_pixel) / 1,000,000. For 1080p30 8-bit 4:2:0, that’s 746.5 Mbps. For 4:4:4 10-bit, bits_per_pixel = 30, yielding 1.87 Gbps.

3. Measure Encoded Bitrate

Take the output file size in bytes, multiply by 8, divide by duration in seconds. Or read the muxed bitrate from ffprobe. For VBR, average over the whole clip; for ABR, use the top rendition’s measured video track only.

4. Divide and Express as Ratio

Encoding Ratio = Uncompressed Bitrate ÷ Encoded Bitrate. If uncompressed is 746.5 and encoded is 37.3, the ratio is 20.0, written 20:1. This directly answers the common question: what does 20:1 compression mean? It means the encoded stream uses only 5% of the original data rate, discarding 95% of raw information under the codec’s perceptual model.

Worked Example: 1080p at 20:1 in a Real Streaming Context

Imagine a camera feeding 1080p30 8-bit 4:2:0 SDI at 746 Mbps. You encode with HEVC at 37.3 Mbps for a premium tier. The encoding ratio is exactly 20:1. In practice, Netflix or YouTube might push that same source to 3–5 Mbps (150:1–200:1) for 1080p delivery, but those ratios rely on psychovisual tuning and would fail for live events with rapid motion.

According to the ITU-T H.265 (HEVC) standard, such compression is achievable because of improved prediction structures, but the standard does not guarantee ratio—it depends on encoder implementation and content.

Audio Encoding Ratio: From PCM to AAC and MP3

Audio follows the same division but with smaller numbers. Start with PCM as above. Then compare to your encoded track.

CD Audio Baseline

44.1 kHz × 16-bit × 2 channels = 1,411 kbps uncompressed. An AAC-LC track at 256 kbps yields a 5.5:1 encoding ratio. The same source as MP3 at 128 kbps is 11:1.

Why Audio Ratios Are Lower Than Video

Most people don’t realize that audio codecs are less efficient at extreme ratios because the ear is sensitive to pre-echo and quantization noise. Video can discard whole high-frequency DCT coefficients; audio must preserve transients. In a live music stream I mixed, pushing AAC beyond 8:1 introduced audible artifacts that viewers flagged within minutes.

Multi-Channel and High-Resolution Audio

5.1 PCM at 48 kHz/24-bit is 5 × 1,152 = 5,760 kbps. Encoding with E-AC-3 at 640 kbps gives 9:1. Dolby TrueHD lossless sits near 1:1, proving ratio is a choice, not a mandate.

Codec Comparisons: Realistic Encoding Ratios in 2024

Below is a mental model I use when selecting a codec. These are typical ratios for “visually transparent” 1080p30 SDR content on moderate-motion footage, not best-case slides.

Codec Uncompressed Base Typical Transparent Bitrate Encoding Ratio Best For
H.264 (AVC) 746 Mbps (1080p30 4:2:0) 5–8 Mbps ~100:1–150:1 Legacy device reach
HEVC (H.265) 746 Mbps 3–5 Mbps ~150:1–250:1 4K/HDR delivery
AV1 746 Mbps 2.5–4 Mbps ~190:1–300:1 Browser streaming
AAC-LC 1,411 kbps (CD) 256 kbps 5.5:1 Music streaming
Opus 1,411 kbps 128 kbps 11:1 VoIP / low-latency

The table is a decision matrix, not a promise. High-motion or film-grain content can halve these ratios. The ITU-T H.264 specification defines syntax, not target ratios, so encoder tuning matters more than the checkbox.

The Link Between CRF, Bitrate, and Encoding Ratio

CRF (Constant Rate Factor) in x264/x265 lets you set quality from 0–51. Lower CRF = higher quality = lower ratio (less compression). But CRF does not output a fixed bitrate, so your encoding ratio varies per clip.

Estimating Ratio From CRF

In my test corpus of 50 corporate videos, CRF 23 (x264 default) on 1080p30 yielded about 120:1 against raw 4:2:0. CRF 18 (near-lossless) dropped to ~60:1 and file sizes doubled. If you need a predictable ratio for bandwidth planning, use CBR or constrained VBR instead.

The Trade-off Nobody Mentions

Chasing a high ratio like 200:1 with CRF 28 may look fine on a phone but fall apart on a 65-inch OLED. I once shipped a training series at 220:1 to save CDN cost; support tickets about blurry charts proved the savings weren’t worth it. Encoding ratio is a means, not a goal.

Common Mistakes and What Can Go Wrong

Even with the formula, pitfalls skew your ratio. Here are the failure modes I see most.

  • Using container file size only: MP4 overhead, audio tracks, and moov atoms add bytes. Always separate video and audio bitrates with ffprobe.
  • Mixing variable frame rate: If your source is 29.97 fps but you calculate with 30, the uncompressed base is off by 0.1%, but over long clips it misstates ratio.
  • Ignoring chroma subsampling: Treating 4:2:2 as 4:2:0 halves your raw bitrate incorrectly, making ratio look twice as good.
  • Bitrate spikes in VBR: Averages hide peaks; a 20:1 average might have 5:1 sections during explosions, causing rebuffer.

The most dangerous misconception is that encoding ratio equals quality. It does not. Two codecs at 100:1 can look radically different because of perceptual tooling.

Edge Cases That Break the Basic Formula

Real-world pipelines rarely hand you clean 4:2:0 30fps. You must adjust the uncompressed base for these scenarios.

Interlaced Sources

1080i50 is still 1920×1080 pixels per field at 50 fields/s. If you deinterlace to 50p, bitrate doubles vs 25p. I’ve seen engineers calculate ratio on the 25 “frames” and report 2× better compression than reality.

HDR and Higher Bit Depth

10-bit 4:2:0 raises bits_per_pixel to 15; 12-bit 4:4:4 to 36. A 1080p30 HDR10 base is 933 Mbps, not 746. Failing to count this makes your 20:1 claim actually 16:1.

Variable Resolution Streaming

ABR ladders change resolution per segment. Calculate ratio per rendition, then weight by view time. A 1440p30 10-bit layer at 8 Mbps against 2.33 Gbps raw is 291:1, but if only 5% of viewers get it, the effective average is far lower.

Case Study: Calculating Ratio for a Multi-Camera Live Event

In 2022 I engineered encoding for a 12-camera concert stream. Each camera was 1080p59.94 10-bit 4:2:2 SDI, raw ~1.49 Gbps. We encoded mixed ISO records with HEVC at 18 Mbps and program output at 12 Mbps.

For the program, uncompressed 1.49 Gbps ÷ 12 Mbps = 124:1. But during pyro sequences, actual VBR peaked at 25 Mbps, dropping ratio to 60:1. We provisioned bandwidth for the peak, not the average, avoiding a public rebuffer incident. This is the kind of nuance a static compression-ratio article misses.

How Container and Transport Streams Affect Measured Ratio

MPEG-TS adds ~3–5% overhead versus MP4 fragmentation. If you measure encoded bitrate from a TS capture including PCR and null packets, you’ll understate ratio vs the raw video elementary stream. Always extract the video PID bitrate with ffprobe -show_streams.

I once debugged a “low ratio” complaint that was purely TS padding. Stripping transport overhead revealed the true video ratio was 30% better, aligning with codec expectations.

Advanced Mental Model: Ratio Budgets Across ABR Ladders

When designing a ladder, allocate ratio budgets per tier. Here’s the checklist matrix I use:

  • 720p30: target 80–120:1 (baseline H.264 ~2.5 Mbps)
  • 1080p30: target 120–200:1 (HEVC ~4 Mbps)
  • 1080p60 HDR: cap at 100:1 (avoid motion artifacts)
  • 2160p30: target 250–350:1 (AV1 necessary)
  • Audio stereo: never exceed 12:1 for music; 8:1 for critical listening

This framework prevents over-compression at high tiers where artifacts are most visible. It’s a planning tool, not a measurement substitute.

A Practical Checklist for Calculating Your Encoding Ratio

Before you publish, run this four-point verification. I keep it pinned in our encode farm’s wiki.

  • Confirm raw parameters: resolution, fps, bit depth, chroma, audio sample specs.
  • Extract true encoded video bitrate separate from audio using ffprobe streams.
  • Compute uncompressed per the pixel/audio formulas; cross-check with calculator.
  • Validate ratio against content type: >200:1 for video likely needs AV1/HEVC and low motion; audio >12:1 risks artifacts.

If you want a sanity check, plug numbers into our Encoding Ratio Calculator and compare to the table above.

When Encoding Ratio Matters Most

You should care about this metric when provisioning live bandwidth, estimating storage, or debugging quality complaints. For archival, file-size compression ratio may suffice. For streaming, the rate ratio is the only number that predicts CDN bills.

In short, learning how to calculate encoding ratio properly shifts you from guesswork to engineering. The next time someone asks “what does 20:1 compression mean?” you can explain it’s a 95% data-rate reduction measured against uncompressed source, not a zip file. And you’ll know to verify chroma, fps, and codec before quoting the number.

Leave a Reply

Your email address will not be published. Required fields are marked *