mediacodec.dev

Bandwidth & CDN cost

Audience size times watch time times bitrate: that is the whole formula. The interesting part is what each variable does to the bill.

How this is calculated

A stream at b Mbps transfers b × 3600 ÷ 8 ÷ 1000 GB per hour, so a 5.5 Mbps 1080p stream costs about 2.5 GB per viewer-hour. Multiply by viewers and average watch time for monthly egress. Bandwidth is billed in decimal units (1 TB = 1000 GB), which is what we use.

The bitrates behind each resolution are typical H.264 delivery rates. Beware the numbers you see on upload guides: YouTube's recommended bitrates are upload targets with re-encode headroom and run roughly twice what services actually deliver. HEVC and AV1 rates derive from the efficiency factors described on the storage calculator. Real adaptive streaming serves a ladder of renditions and most sessions dip below the top rung, so treat the output as a defensible upper bound, not a quote.

Cost rows use each provider's public first-tier list price for North America and Europe, verified against the sources linked in the table notes. Cloudflare Stream bills per minute delivered rather than per GB, which is why its row ignores bitrate entirely. One honesty note: Cloudflare's famous "unmetered" CDN plans are not listed as free video delivery here, because their terms restrict serving video through the plain CDN; R2 and Stream are the products actually built for it.

Costs not modeled: volume-tier discounts, per-request fees (HLS segments generate hundreds of requests per viewer-hour), storage at origin, and regional multipliers (Asia-Pacific and South America egress runs 1.5–4× NA/EU prices on most networks). Above roughly 100 TB/month, nobody pays list price; you would negotiate.

Reading the results

Two levers dominate everything: codec choice moves the entire bill by 30–50%, and resolution is quadratic-ish in pixels but sublinear in bitrate, so 4K costs roughly 3× a 1080p stream, not 4×. If the estimate scares you, those are the two dials to turn, in that order.