Video Production 3D

From raw frames to file size and picture quality: bitrate, resolution, frame rate and codec.

Presets

Playback

Video settings (same as 2D)

Identical formulas to the 2D page.

View

Camera

Layers

Quality

Model checks

The science

Size, rate and the data cube

Uncompressed 8-bit 4:4:4 video needs 24·W·H·fps bit/s, so the raw file is 24 W H fps · t / 8 bytes: that is the big blue cube, and the frames inside it are one picture per frame of a second of video. A compressed file is bitrate × t / 8 bytes: the small green cube. Both cubes are drawn with volume proportional to bytes (side = cube root), so their volume ratio is exactly the compression ratio shown. The green cube grows with the encoding progress because the file grows linearly in time.

Bits per pixel and quality

A useful indicator is bpp = bitrate / (W·H·fps). Rate-distortion theory says PSNR grows about 6 dB per doubling of the rate per pixel at high rates; this page uses PSNR ≈ 27 + 6 log2(bpp · e / 0.1) clipped to 20-52 dB, where e is a codec multiplier (H.264 = 1, HEVC ≈ 1.5, AV1 ≈ 2). The three glowing ridges on the plinth are the three codecs at your resolution and frame rate: the same quality needs less rate with a better codec. Above about 40 dB differences are hard to see. The PSNR definition is 20 log10(255 / RMSE), so the screen adds noise with RMSE = 255 · 10-PSNR/20.

The cinema screen

The picture is a procedural test scene rendered by a shader: the number of picture columns follows the resolution (a pixelated image at 360p), the sun's motion is sampled at your frame rate (stutter at 12 fps), the noise level follows the PSNR above, and 8x8 block artifacts grow as PSNR falls below 42 dB. The block artifacts and the motion are illustrations of the trend; real codec artifacts depend on the content and the encoder.

Storage

The three glass tubes fill with the file size relative to a 16 GB stick, a 128 GB phone and a 1 TB drive (decimal gigabytes). Red means the file does not fit.

Independent numerical checks

Check 1: the file size is computed two independent ways (bitrate x time, and bits-per-pixel x pixels x frames x time) and must agree to 1e-9; the compression ratio must equal 24 W H fps / bitrate. Check 2 measures what the screen really shows: the same shader renders a 256x144 frame once clean and once with the model's noise level, the two frames are read back from the GPU, and the measured PSNR must match the model value within 0.4 dB (the test is capped at 40 dB because 8-bit output quantisation matters beyond that).

Honest simplifications

The 27 dB offset and 6 dB/octave slope are an illustrative calibration, not a measurement of any encoder; real PSNR depends on content (a talking head compresses far better than football) and on encoder settings. A constant bitrate is assumed, audio and container overhead are ignored, and PSNR is only a rough proxy for perceived quality.

Things to try

  • Preset Starved 4K: the green cube is tiny, the PSNR is low and the picture is blocky; then switch to AV1 and see the ridge move.
  • Compare the same bitrate at 720p and 4K in the third graph: more pixels with the same bits mean fewer bits per pixel.
  • Use Bitrate for 40 dB as a planning number, then check the drive tubes for the file size.

Educational model; not a codec benchmark.

Loading model...
Loading Blender model...
PSNR vs bitrate for three codecs
File size vs duration (half / yours / double bitrate)
PSNR by resolution at your bitrate
Made with 🟠 Blender · Three.js