Glossary · format

What is Container (file format)?

A container is the file format that wraps one or more audio and video streams into a single file. Common containers are MP4, MKV, WebM, and AVI. The container does not compress data — it organizes the codec output, subtitles, and metadata so a player knows what to do with each track.

Also called:file format · wrapper · mp4 · .mp4

Think of a container as a folder for the bytes a codec produces. Inside an .mp4 you might have an H.264 video track, an AAC audio track, two subtitle tracks, a cover image, and chapter markers. The container records the offsets of each piece and the metadata a player needs to sync them.

MP4 is the universal container — every device, browser, and editor opens it. MKV is technically richer (supports more subtitle formats, more audio tracks, embedded fonts) but compatibility outside computers is patchy. WebM is a YouTube-friendly subset of Matroska that pairs VP9/AV1 video with Opus/Vorbis audio.

You cannot improve quality by changing containers — repacking H.264 from MKV into MP4 is a lossless byte-for-byte operation that takes seconds. A "transcode to MP4" implies a codec change as well, which is lossy.

Common questions

Is MP4 a codec or a container?
MP4 is a container. The codec inside is usually H.264 or H.265 for video and AAC for audio. People casually say "MP4" to mean "the standard YouTube-compatible video file", which is technically a container plus a codec convention.
Should I download MKV or MP4 from YouTube?
MP4 unless you have a specific reason. Every device plays it; some smart TVs and older players choke on MKV. MKV makes sense if you need multiple audio tracks or rare subtitle formats.

Related terms

VidPickr is a free, browser-based YouTube downloader. Every term in this glossary either describes how YouTube delivers video or why your downloads behave the way they do. Try the downloader →