Reviewed answer
Why do video encoders often prefer even pixel dimensions?
Many video pipelines use chroma-subsampled pixel formats that group colour information across more than one pixel. Even width and height values avoid partial chroma blocks and compatibility errors in common encoding workflows.
Claims reviewed 2026-11-11.
The exact restriction depends on the pixel format, codec, encoder, and filter chain. Even dimensions are a safe default, not a universal rule for every format.
If proportional scaling produces an odd height, rounding to the nearest even value changes the ratio only slightly and is usually preferable to an encoder failure.
In common 4:2:0 video, chroma samples represent groups of neighbouring luma pixels. Filters and encoders may therefore require dimensions that align with those sampling blocks even when the container itself accepts other values.
The requirement can be stricter than simply even width and height. Some hardware pipelines, macroblock-oriented workflows, or chosen pixel formats may prefer multiples of four, eight, or sixteen for performance or compatibility.
Do not silently crop a meaningful edge pixel. Calculate the proportional size first, then decide whether rounding, padding, or a one-pixel crop is least harmful for the content.
Example
Scaling 1920 × 1080 to a width of 853 produces a proportional height near 479.8. An encoder-friendly result such as 854 × 480 preserves the ratio closely and avoids odd dimensions.
Practical checklist
- Check the target codec, pixel format, encoder, and hardware path.
- Calculate the proportional dimensions before applying alignment rules.
- Round only once and record whether the result was rounded, padded, or cropped.
- Test a short encode and inspect the edges and displayed aspect ratio.