M4S

An M4S file is a media segment in fragmented MP4 format, holding a few seconds of video or audio from an adaptive stream. M4S segments are used by MPEG-DASH and by HLS streams that use fMP4 or CMAF. A player downloads them in order after reading a manifest, which tells it where each segment lives.

Why it matters

M4S segments are what viewers actually download in many modern streams. Their length affects how fast playback starts, how quickly quality adapts and how many requests the CDN handles. Getting segment settings right shapes both viewer experience and delivery cost. Request counts drop out of the budget on FastPix: request charges and egress are bundled into the per-minute streaming price, so delivery cost follows minutes watched.

How it works

  1. A packager splits each quality level of a video into short fMP4 fragments.
  2. Each fragment is saved as an .m4s file, with a separate init file holding codec setup.
  3. The manifest, MPD or M3U8, lists the M4S files in order.
  4. The player downloads the init file once, then fetches M4S segments as playback continues.

How do I open or play an M4S file?

A single M4S file usually will not play alone, because it needs the init segment that holds codec setup. To watch it, join the init file and the segments in order, then remux to MP4 with a tool such as FFmpeg. Players handle this automatically when given the manifest.

What is the difference between M4S and MP4?

An M4S file is one short fragment of a stream, while an MP4 is usually a complete, standalone video. Both use the same box structure. Joining an init segment and its M4S fragments in order produces a playable MP4. Most people never handle M4S files directly, because players fetch them automatically.

Where it's used

OTT services and video platforms store each title as thousands of M4S segments behind the scenes, which let players switch quality smoothly as a viewer's connection changes.