Skip to content

Terminology

currentMigrated from docs/introduction/terminology.mdx at 37c3317fd058; modified for Encode Wiki · CC BY-SA 4.0

Most encoding vocabulary describes simple ideas. These are the terms you will meet most often on this wiki and in tool documentation.

A codec is a compression format such as H.264, AV1 or Opus, defined by a specification. An encoder is a program that produces that format (x264, SVT-AV1, libopus); a decoder reads it back (dav1d decodes AV1). One codec can have many encoders of very different quality. See the prologue.

A bitstream is the compressed data an encoder produces, following the codec’s syntax. An elementary stream is one such stream on its own: a single video, audio or subtitle track, before it is put into a container.

A container (MKV, MP4, WebM, MOV) is a file format that holds one or more elementary streams together with timing, chapters, metadata and attachments. The container decides which codecs and how many tracks a file can hold, and some of the compatibility of the result. See containers.

Muxing packs elementary streams into a container; demuxing extracts them. Remuxing moves streams to a different container without re-encoding, so it is fast and lossless (ffmpeg -i in.mkv -c copy out.mp4).

Transcoding decodes a stream and encodes it again, usually into a different codec or at a different quality. Transcoding from one lossy format to another always loses some quality, even at high settings. It has nothing to do with the container.

A filter processes decoded frames or audio samples: scaling, cropping, denoising, deinterlacing, sharpening, tone mapping and so on. Filtering requires re-encoding.

A bitstream filter modifies compressed data without decoding it. Examples are converting H.264 from MP4-style to Annex B start codes for MPEG-TS (h264_mp4toannexb) or rewriting color metadata in an HEVC stream header (hevc_metadata).

The most widely supported container: phones, browsers, TVs and editing software all handle it. Common contents are H.264, HEVC or AV1 video with AAC audio. AV1, VP9, Opus and FLAC all have official MP4 mappings, although older players may not support them. Subtitle support is limited to timed-text formats such as mov_text (tx3g); ASS and bitmap subtitles cannot be stored. FFmpeg and MP4Box both write MP4; .m4v and .m4a are the same format with different extensions.

Apple’s QuickTime format, which MP4 is based on. It is the usual container for ProRes and other editing formats.

Holds practically any codec, any number of video, audio and subtitle tracks, chapters and attachments such as fonts. It is the most flexible container and the usual choice for personal libraries and for intermediate work. Some devices and browsers do not play it. See Matroska.

A restricted subset of Matroska for the web: VP8, VP9 or AV1 video, Vorbis or Opus audio, and WebVTT subtitles. Browsers do not display WebVTT tracks stored inside a WebM file; put subtitles in a separate .vtt file loaded with the <track> element instead (MDN).

Rate control decides how many bits each frame gets. CRF (constant rate factor) and similar constant-quality modes target a quality level and let the size vary; bitrate modes target a size or data rate and let quality vary. See quality controls.

A preset bundles many encoder settings into one speed level. Slower presets search harder for efficient ways to code each frame, giving smaller files at the same quality.

A keyframe (intra frame) can be decoded on its own; other frames are predicted from frames around them. A GOP (group of pictures) is the run of frames from one keyframe to the next. Players can only start decoding at a keyframe, so the GOP length trades seeking speed against compression.

Rate–distortion optimization is how an encoder chooses between coding options: it weighs the bits each option costs against the distortion it causes. What counts as “distortion” matters a great deal: a simple squared-error measure favors blur, which is why good encoders add psychovisual terms.

The number of bits per sample: 8-bit gives 256 levels per channel, 10-bit gives 1,024. More levels mean smoother gradients and less banding. 10-bit is standard for HDR and often used for SDR AV1 and HEVC encodes as well.

Video is usually stored as brightness (luma, Y) plus two color-difference channels (chroma, Cb and Cr). Because eyes resolve color detail less sharply than brightness detail, chroma is often stored at lower resolution: 4:2:0 halves it in both directions (the norm for delivery), 4:2:2 halves it horizontally (common in production), and 4:4:4 keeps it at full resolution. Fine colored text and sharp red edges show the loss first.

Perceptual, psychovisual and psychoacoustic quality

Section titled “Perceptual, psychovisual and psychoacoustic quality”

Perceptual quality is quality as people experience it: psychovisual for images and video, psychoacoustic for sound. Encoders that model perception spend bits where viewers and listeners notice errors. No metric fully captures it: metrics help narrow down settings and find bad scenes, but the final check is watching or listening. See psychovisual quality and the quality comparison guide.

The DCT converts a block of samples (pixels, or audio samples over time) into a set of frequency coefficients. For natural images and sound, most of the energy ends up in a few low-frequency coefficients, so the rest can be quantized coarsely or dropped with little visible or audible effect. The DCT is the core of JPEG; H.264, HEVC and AV1 use integer approximations of it alongside other transforms, and the related MDCT is used by AAC, Vorbis and Opus’s CELT layer.