Glossary · workflow

What is Mux (muxing)?

Muxing is the process of combining separate audio and video streams into a single container file (MP4, MKV, WebM). Demuxing is the reverse — splitting a combined file back into its component streams. Muxing is lossless; the codec data is unchanged, only the wrapper.

Also called:muxer · multiplexing · remux

YouTube serves video and audio as separate streams for any quality above 720p. The video file has no audio; the audio file has no video. To produce the single file you actually want to save, the two need to be combined — that's muxing.

Muxing happens at the byte level. The encoded H.264 frames and AAC audio frames are dropped into an MP4 container without being decoded or re-encoded. This is why a clean mux of a 1080p video takes seconds, not minutes — there is no "processing", just file assembly.

VidPickr does muxing in your browser. The video and audio streams come from YouTube's CDN, get fed into a JavaScript MP4 muxer (mp4-muxer), and the combined file streams to your disk via the File System Access API. No server side mux, no full-file buffer in RAM — bytes flow through.

Common questions

Is muxing the same as transcoding?
No. Muxing is repackaging existing codec data into a container. Transcoding decodes the data and re-encodes it — usually with quality loss. Muxing is fast and lossless; transcoding is slow and lossy.
Why does YouTube split video and audio?
It allows the player to choose video quality independently of audio. Switching from 720p to 1080p mid-playback only requires swapping the video stream — the same audio stream keeps playing. Storing combined files would multiply the storage cost.

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 →