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.
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.
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.
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 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.
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.
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.
One number of one component (Y, Cb, or Cr). The basic unit in codec documents.
The number of luma samples across and down.
Frames per second. 29.97 = 30000/1001.
Whether pixels are square, and what the final screen ratio is.
How many ticks a container divides one second into. A device that avoids error through integer arithmetic.
In a 1920×1080, 4:2:0 video, how many samples does the Cb component have?
Which value represents 29.97 fps exactly?