What HLS actually contains
HTTP Live Streaming is a delivery system, not one single video file format. Apple designed HLS to deliver live and prerecorded media over ordinary HTTP servers and content delivery networks. A small UTF-8 playlist describes available renditions or lists a sequence of media resources. The media can be packaged as MPEG-2 transport stream segments or fragmented MP4, depending on the publisher.
A URL ending in .m3u8 usually points to a playlist. A master playlist lists alternate streams, often with bandwidth, resolution, and codec information. A media playlist lists the actual segments for one rendition and normally pairs each segment with an #EXTINF duration. The downloader must understand which kind of playlist it received before it can fetch the video.
The Apple HLS overview is the authoritative starting point for the protocol. This downloader implements only the subset required by the compatible Kommodo recordings it has been designed to process.
Master playlist and quality selection
When a master playlist offers several variants, a player normally adapts between them as network conditions change. A downloader has a different goal: it needs a stable set of segments that can become one file. The current browser tool reads the listed bandwidth value and selects the highest-bandwidth variant. It then follows that variant until it reaches a media playlist.
Highest bandwidth is a practical approximation for highest quality, not a mathematical guarantee. A publisher can label variants imperfectly, use different codecs, or offer separate audio groups. Resolution, frame rate, codec efficiency, and source quality also matter. The tool does not combine independent video and audio rendition groups; recordings that use a more complex arrangement may need an export supplied by the platform.
Why segments cannot always be joined blindly
Transport stream segments contain timing information, encoded audio and video packets, and metadata needed to preserve continuity. Simple byte concatenation sometimes creates a playable transport stream, but it does not create a standards-compliant MP4. MP4 uses boxes and sample tables that describe track timing, byte ranges, codec configuration, and media fragments.
A transmuxer parses the transport packets, reconstructs track information, creates an MP4 initialization segment, and emits media fragments in the correct order. Timestamps must remain coherent. Discontinuities, missing segments, codec changes, or malformed packet boundaries can make the result fail even when most of the bytes downloaded successfully.
This project uses mux.js, an open-source media transmuxing library. It is bundled locally with the website so the conversion dependency does not need to execute from a third-party CDN.
Container versus codec
A container organizes tracks; a codec defines how audio or video is encoded. MP4 is a container. H.264 is a video codec, and AAC is an audio codec. MPEG-2 transport stream is another container commonly used for segmented delivery. Moving H.264 and AAC from transport stream packaging into MP4 packaging can be done without decoding the underlying pictures and sound.
That operation is transmuxing. It is typically faster and avoids generation loss because the encoded samples remain intact. Transcoding is different: it decodes the samples and encodes them again, which is necessary when the destination cannot accept the original codec or when resolution, bitrate, or compression must change. This downloader is a transmuxer, not a general-purpose transcoder.
Read Kommodo recording formats and compatibility for a practical table of formats, expected behavior, and limitations.
Create the downloadable browser file
After mux.js emits MP4 parts, JavaScript creates one Blob representing the completed file. A Blob is immutable binary data managed by the browser. The application creates a temporary Blob URL and assigns it to a normal download link. Selecting Save MP4 asks the browser to persist those in-memory bytes to local storage.
The process explains both the privacy advantage and the memory limitation. The video does not need to be uploaded to an application conversion server, but the browser must retain enough data to assemble the result. The Blob URL is temporary and tied to the page lifecycle; it is not a permanent public address.
Cases that need a different workflow
- Encrypted HLS: this tool intentionally rejects playlists with media key declarations.
- Unsupported codecs: MP4 packaging cannot make an incompatible codec universally playable.
- Separate audio groups: a complex master playlist may require explicit track selection and muxing logic.
- Very large recordings: browser memory can become the limiting resource.
- Expired signed URLs: the playlist or segments may return an authorization error after the link expires.
- Fragmented MP4 input: the MPEG-TS transmux path is not a general merger for every HLS segment format.
If you are unsure which case applies, start with the download troubleshooting checklist and note the exact stage at which the status panel stops.