Ch. 1 · Video Basics

한국어日本語
6 min

Pixels, Resolution, and Frame Rate: How Digital Video Is Stored as Numbers

Digital video is a 3D array of numbers: width × height × time, with a few color values per cell. Why codec docs say 'samples,' and what 29.97 fps really is.

People who work with codecs see video not as pictures but as blocks of numbers. To be precise, it looks like this.

The data structure of video
video[t][y][x][c]
  t : frame index along time   (0 … N-1)
  y : vertical pixel coordinate   (0 … height-1)
  x : horizontal pixel coordinate (0 … width-1)
  c : component index (e.g. Y, Cb, Cr)

A pixel is short for picture element, the smallest unit that makes up an image. In codec documents, though, the word sample is used far more often than pixel. There's a reason. With chroma subsampling (covered later), the number of luma and chroma components differs, and it becomes ambiguous how many numbers 'one pixel' is. If you call one number of one component = 1 sample, the ambiguity disappears.

Easy to mix up

Standards documents don't use 'luma sample' and 'pixel' interchangeably. Call a 4:2:0 video 1920×1080 'pixels,' and luma is 1920×1080 samples, but each chroma plane is only 960×540 samples.

Resolution — the number of samples across and down

NameResolutionLuma samplesNotes
SD (480p)720 × 480~350KDVD era
HD (720p)1280 × 720~920KEarly streaming
Full HD (1080p)1920 × 1080~2.07MStill the largest share
4K UHD (2160p)3840 × 2160~8.3M4× 1080p
8K UHD (4320p)7680 × 4320~33.2M16× 1080p

Doubling the resolution quadruples the sample count. The reason bitrate doesn't quadruple going from 4K to 8K is that as resolution rises, correlation between neighboring pixels gets stronger too, so compression works better.

In the field — DAR, PAR, SAR

In practice, three aspect-ratio values travel alongside resolution. PAR/SAR (Pixel/Sample Aspect Ratio) says whether a single pixel is square, and DAR (Display Aspect Ratio) is the final display ratio. The classic case is an analog-era 720×480 source. For 4:3 display you use PAR 10:11; for 16:9 widescreen you use PAR 40:33 — the same pixel data is 'stretched' to a different ratio. Most content today has square pixels (PAR 1:1), but you'll definitely run into this when you touch broadcast sources.

Frame rate — resolution along the time axis

How many pictures are shown per second is the frame rate (fps). Film is 24, broadcast is 25 (PAL) / 29.97 (NTSC), games and sports use 50/60, and high-frame-rate content goes up to 120.

What 29.97 really is

29.97 fps is exactly 30000/1001. It's a legacy from 1953: when color was squeezed into black-and-white NTSC, the frame rate was lowered by 0.1% to avoid interference with the color subcarrier. That 0.1% still affects drop-frame timecode, A/V sync error, and the design of container timescales today. Half of the time-related bugs in codec work come from here.

That's why containers (MP4 and others) don't store time as a decimal fps but as an integer fraction, like timescale = 30000, frame duration = 1001. It's designed so that no accumulated error builds up. How containers handle time (PTS, DTS, timebase) is covered in Chapter 16.

SampleSample

One number of one component (Y, Cb, or Cr). The basic unit in codec documents.

ResolutionResolution

The number of luma samples across and down.

Frame rate (fps)Frame rate

Frames per second. 29.97 = 30000/1001.

PAR / DARPixel aspect ratio / Display aspect ratio

Whether pixels are square, and what the final screen ratio is.

TimescaleTimescale

How many ticks a container divides one second into. A device that avoids error through integer arithmetic.

Check yourself

In a 1920×1080, 4:2:0 video, how many samples does the Cb component have?

Check yourself

Which value represents 29.97 fps exactly?