Glossary · protocol

What is MSE (Media Source Extensions)?

MSE (Media Source Extensions) is a browser API that lets JavaScript feed video / audio data to the HTML5 video element segment by segment. It's the foundation of every adaptive streaming player on the web — YouTube, Netflix, Twitch all use MSE to switch between quality variants without restarting playback.

Also called:media source extensions · sourcebuffer

Before MSE, the element played one URL — you set src and the browser fetched and decoded. To switch quality, you had to load a new URL and restart playback, which interrupted the user. MSE introduced a SourceBuffer object that JS can write video segments into; the video element plays from that buffer.

This is what makes "switch from 1080p to 720p mid-stream without buffering" possible. The player downloads each segment with JS, decides which quality to pick next based on bandwidth measurements, and feeds the chosen segment into the buffer. The browser doesn't know or care which quality each segment came from.

For YouTube downloaders that work browser-side (like VidPickr), MSE is irrelevant for the download itself — we fetch segments via plain XHR and assemble them with mp4-muxer. But the browser-side muxing pipeline borrows the same primitives MSE is built on (fragmented MP4, segment indexing).

Common questions

Is MSE required to play YouTube videos?
Required for adaptive streaming (the normal viewing flow). For a static MP4 file you just downloaded, plain HTML5 video without MSE works fine.

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 →