Protocol conformance
The service’s HLS and DASH output is checked by an automated black-box suite, and the remaining vendor and browser checks are listed with how to run them.
The automated suite
tests/conformance.rs starts the real binary against every fixture below and audits what a player would fetch. Run it with make conformance (it also runs under make test and in CI).
Fixtures: the main H.264/AAC file, the same with moov after mdat, video only, 44.1 kHz stereo audio, and variable frame timing; FFmpeg’s default edit lists and a delayed audio track; two audio tracks; non-square pixels with tagged colour; a QuickTime file; HEVC, VP9, AV1; AC-3, E-AC-3, Opus, and FLAC audio; and audio-only files with one and two tracks. Every reassembled track is decoded by FFmpeg without errors and its packet count compared with the source.
HLS (RFC 8216)
- Playlist starts with
#EXTM3U; the protocol version is at least 6, which fMP4 withEXT-X-MAPrequires. - The variant has
BANDWIDTHnot belowAVERAGE-BANDWIDTH, a codec string, and a resolution. - An
AUDIOgroup reference on the variant matches exactly oneEXT-X-MEDIArendition, and a rendition without a reference is rejected. - Media playlists are
VOD,INDEPENDENT-SEGMENTS, end withENDLIST, and have anEXT-X-MAP. - Every
EXTINFrounded to whole seconds does not exceedEXT-X-TARGETDURATION. - Every URI in every playlist resolves and returns
200.
DASH (ISO/IEC 23009-1)
- The manifest has the MPD namespace,
type="static", a DASH profile, and validmediaPresentationDurationandminBufferTime. - Each
Representationhas bandwidth and codecs and aSegmentTemplatewith aSegmentTimeline. $RepresentationID$and$Number$substitutions resolve to real objects.- The timeline does not exceed the presentation duration, and the longest track equals it.
Media bytes (ISO BMFF, CMAF-style layout)
- Init segments have
ftyp,moov, exactly onetrak,mvex/trex, and empty sample tables. - Media segments are
[styp] moof mdat, every box size tiles its parent exactly, andtfhduses default-base-is-moof. - The
trundata offset lands exactly on the first payload byte, and the sample sizes sum to themdatpayload. mfhdsequence numbers run 1, 2, 3 …;tfdtvalues are contiguous, each starting where the previous segment ended.- Video segments begin with a sync sample.
- The duration declared in the playlist or timeline matches the sum of sample durations in the fragment, within one millisecond of rounding.
- HLS and DASH serve byte-identical init and media segments for every track.
Transport
Byte ranges (bytes=a-b, suffix bytes=-n), Accept-Ranges, ETag, If-None-Match, stale If-Range, and immutable caching on media objects.
Decoding
When FFprobe and FFmpeg are installed, each track is reassembled (init plus segments), decoded with ffmpeg -v error with no errors, and its packet count is compared with the source file’s.
The suite was mutation-checked: making the fragment sequence numbers start at 2 fails it immediately.
What is not covered
The suite verifies structural rules the code can be held to. It is not a certification.
| Check | Status | How to run it |
|---|---|---|
Apple HLS validation (mediastreamvalidator, hlsreport) | Not run | Requires macOS and Apple’s HTTP Live Streaming Tools. Point the validator at http://<host>/hls/<asset>/master.m3u8 before a release |
DASH-IF conformance (DASH-IF-Conformance tool or web validator) | Not run | Needs Java or the hosted validator. Run it on a served MPD before a release |
| CMAF (ISO/IEC 23000-19) profile conformance | Not claimed | The layout is CMAF-style but no CMAF validator has been run. Do not claim conformance |
| Browser playback with hls.js and dash.js (start, seek, play) | Not implemented | Needs Node, npm, and a browser driver such as Playwright. Neither npm nor a driver was available where this suite was written |
| Device and player matrix (Safari, tvOS, Android ExoPlayer, smart TVs) | Not covered | Manual |
Until the vendor validators and browser tests are run and their output recorded here, treat the output as structurally sound and cross-checked but not certified.