Skip to main content

Module hls_source

Module hls_source 

Source
Expand description

Minimal HLS assembler for SoundCloud Go+ AAC streams.

SoundCloud’s high-quality (256 kbps AAC) transcoding is delivered as an HLS media playlist of fragmented-MP4 segments rather than one progressive file. Symphonia has no HLS demuxer, but a CMAF/fMP4 HLS stream is just an optional init segment (#EXT-X-MAP) followed by media fragments — concatenating them in order yields a single valid fMP4 byte stream the isomp4 reader decodes.

This downloads the playlist and all its segments synchronously and returns the assembled bytes. It’s blocking (built for the player’s spawn_blocking decode thread, beside range_source) and trades a short up-front download for dead-simple, fully-seekable in-memory playback.

Functions§

assemble
Fetch an HLS media-playlist URL and concatenate its init + media segments into one contiguous (fMP4) byte buffer.