What is a .m4s file?
video/mp4
M4S is a CMAF/fragmented-MP4 media segment: a moof header plus an mdat payload covering a few seconds of one rendition. It is not a complete file — the codec configuration lives in a separate initialisation segment, so an .m4s on its own cannot be decoded and most players will refuse it outright.
How to use a .m4s file
Use example .m4s segments to test adaptive-streaming clients, segment fetchers and CMAF parsers. Load the matching init segment first, then append segments in order; a client that can play a segment without its init is not doing CMAF correctly.
Download example .m4s files
- HLS VOD — CMAF Init Segment (init_0.m4s)A CMAF initialisation segment: the moov box carrying codec configuration and track metadata, with no media samples. A player must fetch this before any media segment of the same rendition, and switching renditions mid-stream means fetching the new rendition's init first — the step ABR implementations most often get wrong.
- HLS VOD — CMAF Init Segment (init_1.m4s)A CMAF initialisation segment: the moov box carrying codec configuration and track metadata, with no media samples. A player must fetch this before any media segment of the same rendition, and switching renditions mid-stream means fetching the new rendition's init first — the step ABR implementations most often get wrong.
- HLS VOD — CMAF Init Segment (init_2.m4s)A CMAF initialisation segment: the moov box carrying codec configuration and track metadata, with no media samples. A player must fetch this before any media segment of the same rendition, and switching renditions mid-stream means fetching the new rendition's init first — the step ABR implementations most often get wrong.
- HLS VOD — Media Segment (seg-0-000.m4s)A one-second fragmented-MP4 media segment (moof + mdat) from the playable ladder. It starts on a keyframe, so it decodes independently once the matching init segment has been loaded — which is what makes mid-stream quality switching possible at all.
- HLS VOD — Media Segment (seg-0-001.m4s)A one-second fragmented-MP4 media segment (moof + mdat) from the playable ladder. It starts on a keyframe, so it decodes independently once the matching init segment has been loaded — which is what makes mid-stream quality switching possible at all.
- HLS VOD — Media Segment (seg-1-000.m4s)A one-second fragmented-MP4 media segment (moof + mdat) from the playable ladder. It starts on a keyframe, so it decodes independently once the matching init segment has been loaded — which is what makes mid-stream quality switching possible at all.
- HLS VOD — Media Segment (seg-1-001.m4s)A one-second fragmented-MP4 media segment (moof + mdat) from the playable ladder. It starts on a keyframe, so it decodes independently once the matching init segment has been loaded — which is what makes mid-stream quality switching possible at all.
- HLS VOD — Media Segment (seg-2-000.m4s)A one-second fragmented-MP4 media segment (moof + mdat) from the playable ladder. It starts on a keyframe, so it decodes independently once the matching init segment has been loaded — which is what makes mid-stream quality switching possible at all.
and 10 more in the library.