mediacodec.dev

Storage & codec savings

The same library, weighed in three codecs. This is the calculation behind every "should we re-encode the archive?" meeting.

hours of video

Resolution

Encode tier

The quality you would actually stream to viewers.

Storage provider

$0.0230/GB-month. Standard, first 50 TB, us-east-1. Egress billed separately.

Same library, three codecs

H.264 / AVC1.24 TBbaseline$28.46
H.265 / HEVC743 GB−40%$17.08
AV1619 GB−50%$14.23

Monthly cost on AWS S3 at public list price, verified 2026-07-31. Encoding cost to create the smaller files is not modeled; AV1 encodes cost the most CPU. Details below.

Re-encoding this library from H.264 to AV1 frees 619 GB and saves $171 a year on AWS S3.

How this is calculated

File size is bitrate times duration: a library stored at b Mbps occupies hours × b × 3600 ÷ 8 ÷ 1000 GB. Each codec column applies an efficiency factor to the H.264 baseline bitrate: HEVC at 0.6× (the consensus range is 50–65% of H.264's bitrate for comparable quality) and AV1 at 0.5×. These are engineering consensus numbers, not laws: high-motion sports sees less benefit than talking heads, and a lazy encode preset erases much of the advantage.

The encode tiers scale the baseline: mezzanine masters are stored well above delivery bitrate so future re-encodes start from clean sources, while economy archives accept visible compression.

Storage rows use public list prices per GB-month for each provider's standard tier, US region. Not modeled: request/operation fees, egress to actually serve the files (see the bandwidth calculator), minimum storage durations, and the very real CPU cost of re-encoding: AV1 buys its savings with the most expensive encodes of the three.

When re-encoding pays off

The annual-savings figure is the number to weigh against one-time encoding cost. Large, cold, rarely-served libraries with long retention benefit most; small or short-lived content rarely earns back the compute. And if files are served often, delivery savings usually dwarf storage savings, which flips the decision long before the storage line does.