What is 8-Bit Video?
8-bit video stores each color component of every sample as an 8-bit integer, giving 256 possible code values per component. It is the only bit depth of VP8 and of the H.264 Constrained Baseline, Main, and High profiles, whereas ITU-R BT.2100 specifies its integer HDR signals at 10 or 12 bits.
How 8-Bit Video works
Bit depth is the number of bits used to quantize each component of a sample. Eight bits give 256 codes, but the signal range decides which of them carry picture. ITU-R BT.709, the HDTV standard, puts black at code 16 and nominal peak white at 235 for luma and R′G′B′, centers the color-difference components on 128 within 16 to 240, and reserves 0 and 255 for timing references; full-range video uses 0 to 255 instead. The same standard’s 10-bit coding runs from 64 to 940, four steps for every 8-bit step, and that coarser 8-bit spacing is why gradients can show visible bands below 10 bits per component. Chroma subsampling and range are chosen separately from bit depth: a pixel format names one combination of bit depth and chroma layout, a codec profile limits which combinations a stream may use, and range is normally signaled by a separate tag. HDR is the exception to that freedom: BT.2100 defines integer PQ and HLG signals only at 10 or 12 bits.
Key facts
- Whether an 8-bit code means black, white, or neither depends on the signal range. In limited (TV or MPEG) range, luma black is 16 and nominal white is 235, with color-difference values from 16 to 240; in full (PC or JPEG) range the scale is 0 to 255. Limited-range video read as full range loses contrast, because black and white sit at 16 and 235 instead of 0 and 255, so keep the range tag consistent with the samples through every conversion and update it whenever a conversion changes the range. YouTube, for example, converts full-range uploads to limited range.
- A codec profile limits which bit depths and chroma formats a stream may use. H.264 Constrained Baseline, Main, and High, HEVC Main, VP9 Profile 0, and VP8 are limited to 8 bits with 4:2:0 chroma (H.264 High also permits monochrome), so the two video codecs every WebRTC browser must implement, VP8 and H.264 Constrained Baseline, are 8-bit only. 10-bit 4:2:0 needs a higher profile such as H.264 High 10, HEVC Main 10, or VP9 Profile 2, and 8-bit 4:2:2 or 4:4:4 needs profiles such as H.264 High 4:2:2, H.264 High 4:4:4 Predictive, or VP9 Profile 1. H.264 High 10 and HEVC Main 10 also admit 8-bit video, so a profile name alone does not establish the bit depth.
- Transcoding does not by itself guarantee 8-bit 4:2:0 output. FFmpeg’s H.264 encoding guide warns that, depending on the source, the output may use a pixel format that QuickTime and most other players cannot play, and advises requesting
yuv420pexplicitly. In FFmpeg’s naming,yuv420pis 8-bit 4:2:0 andyuv420p10leis its 10-bit counterpart, so check the pixel format of both the source and the output. A pixel format does not describe the transfer function, and FFmpeg documents tone mapping between dynamic ranges as a separate filter,tonemap, so requestingyuv420pdoes not turn a PQ or HLG source into SDR. - Reducing higher-bit-depth material to 8 bits can introduce banding in nearly flat regions, and dithering is not a guaranteed fix. FFmpeg’s
zscalefilter offers ordered, random, and error-diffusion dither but applies none by default, and FFmpeg documents its debanding filtergradfunas for playback only, because lossy compression tends to remove the dither and bring the bands back.
When 8-Bit Video matters
Choose 8-bit output for standard dynamic range delivery that must play on the widest range of browsers and players, and request the pixel format explicitly, because an encoder may otherwise keep a higher-bit-depth or 4:2:2 source format. Bit depth is not dynamic range: a 10-bit source is not necessarily HDR, and reducing an HDR source to an 8-bit pixel format does not by itself convert it to SDR. Plan on at least 10 bits together with a PQ or HLG transfer function for HDR delivery, and inspect nearly flat regions and smooth gradients first when checking an 8-bit encode for banding.
How Transloadit helps with 8-Bit Video
Transloadit’s /video/encode Robot passes the options in its ffmpeg parameter to FFmpeg, and those options take precedence over the chosen preset, so an Assembly can request 8-bit 4:2:0 output explicitly, for example with pix_fmt set to yuv420p, instead of depending on the source or the preset.
The preset tables list container, codecs, bitrates, and resolution but not pixel format, so confirm the bit depth of an encoded file by inspecting it.
Sources
- Recommendation ITU-R BT.709-6: Parameter values for the HDTV standards (PDF)
- Recommendation ITU-R BT.2100-3: Image parameter values for high dynamic range television (PDF)
- MDN: Web video codec guide
- WebM Project: VP9 Coding Profiles
- RFC 7742: WebRTC Video Processing and Codec Requirements
- FFmpeg wiki: H.264 Video Encoding Guide
- FFmpeg Filters Documentation (scale, zscale, gradfun, tonemap)
- FFmpeg n7.1 source: libavutil/pixfmt.h pixel format definitions
- YouTube Help: Recommended upload encoding settings
- YouTube Help: Upload High Dynamic Range (HDR) videos