Skip to main content
The CMAF sink encodes live audio as AAC-LC in a fragmented MP4 container and serves it as both HLS and MPEG-DASH from the same in-memory segment ring buffer. Any HLS- or DASH-capable client can play the stream — including every modern browser — without installing extra software. This is the default audio output for the Docker image: the web UI’s <audio> element attaches to the HLS stream automatically as soon as the active output is set to cmaf / hls / dash.

Endpoints

Once rockboxd is running with audio_output = "cmaf", three endpoints are served on cmaf_http_port (default 7882):

Play from anywhere

How it works

  • A 2-second sliding window of segments is retained; clients always join at the live edge.
  • Between tracks the encoder emits silence segments at wall-clock cadence so clients don’t see an empty playlist (which hls.js would treat as a fatal levelEmptyError).
  • The bitrate is clamped to 32 000 – 320 000 bps. Outside that range it is silently clamped to the nearest endpoint.

Mirror to disk for an external HTTP server

To serve the same artefacts from nginx, Caddy, or a CDN origin, point the sink at a directory:
init.mp4, seg/N.m4s, hls/master.m3u8, hls/audio.m3u8, and dash/manifest.mpd are all written there alongside the in-memory ring. The in-memory ring is always authoritative; disk I/O is best-effort and never blocks encoding. Example nginx vhost:

Licensing note

libfdk-aac ships under the Software License for The Fraunhofer FDK AAC Codec Library for Android — open source but not GPL-compatible. Redistributing a binary that combines this sink with the GPLv2 Rockbox firmware is a license conflict for redistribution. Personal / non-distributed use is the intended scope.

Switching to another sink

Edit audio_output in settings.toml and restart, or call:
…or pick another output from the web UI’s device picker. See Audio output › Overview.