Skip to content

Playback and Output

DatanoiseTV edited this page Jun 18, 2026 · 1 revision

Playback and Output

How listeners and viewers get a stream out of TinyIce. Three transports — progressive Icecast, HLS, and WebRTC (WHEP) — plus the built-in player, embeds, and playlist files. For getting streams in, see Streaming Sources.

Output URLs at a glance

For a mount at /live:

URL Serves
/live Progressive Icecast stream (MP3/Ogg/FLAC/WAV). VLC, mpv, ffplay, hardware players.
/live.m3u · /live.m3u8 · /live.pls Playlist files pointing at the stream.
/live/playlist.m3u8 HLS — audio, or audio+video when the mount has H.264.
/live/master.m3u8 Multivariant (ABR) playlist when a variant_group is configured.
/live/whep WHEP / WebRTC playback (POST, application/sdp in and out).
/live/video Raw H.264 Annex-B for debugging (mpv http://host/live/video).
/live/poster.jpg Cached poster thumbnail (video mounts).
/player/live Built-in browser player page.
/embed/live Compact embeddable player (audio bar or video).
/status-json.xsl Icecast-compatible stats JSON.

Progressive (Icecast)

The default, maximally-compatible path. Each listener subscribes to the mount's shared circular buffer at an offset rewound by the mount's burst size, gets an instant-start burst, then rides a signal channel as new data arrives — no per-listener copy of the audio. This is why a single node scales to six figures of listeners (see Architecture and Deployment).

For long-running Ogg streams, a per-listener Ogg page rewriter regenerates the bitstream serial and rebases granule positions, so late joiners don't hit a multi-minute granule jump that strict decoders fill with silence.

HLS (audio and audio + video)

/<mount>/playlist.m3u8 serves HLS. For audio-only mounts it's an audio HLS playlist; for mounts carrying H.264 it's audio+video.

  • Default 1 s segments, keyframe-aligned (segments still start cleanly on an IDR even when the encoder's GOP is longer), with accurate EXTINF / TARGETDURATION.
  • 60 s DVR window by default — every video stream is seekable back a minute, no extra config; hls.js renders a scrubbable timeline.
  • Safari/iOS play HLS natively; Chromium/Firefox lazy-load hls.js only when needed.

OBS simulcast (ABR ladder)

Run multiple OBS outputs to separate mounts (one per rendition) and group them into one multivariant playlist via variant_groups (Configuration):

"variant_groups": { "/live": ["/live", "/live_720", "/live_480"] }

/live/master.m3u8 then advertises all three with BANDWIDTH and RESOLUTION derived from each member's live ingest metrics. The built-in player auto-detects the master playlist and lets hls.js do ABR; it falls back to /live/playlist.m3u8 when no group is configured.

WebRTC playback (WHEP)

POST /<mount>/whep with an SDP offer (application/sdp in and out) for sub-second WebRTC viewer playback. In the player, append ?webrtc=1 to opt in.

WHEP playback requires the OBS encoder to publish without B-frames (Profile baseline, or bf=0 in x264 params) while B-frame handling is finalised. HLS remains the default, robust path.

The built-in player

/player/<mount> renders a player tuned to the mount type:

  • Audio: compact bar with metadata and a visualiser.
  • Video: dedicated 16:9 <video> layout.
  • STATS overlay (button in the bottom strip): transport (HLS/WebRTC/ Icecast), audio codec + bitrate, video codec/resolution/fps/GOP/bitrate, plus client-side buffer seconds, dropped frames + drop %, and HLS live-edge latency.
  • Poster thumbnails: the player snapshots the <video> a few seconds into playback and POSTs a JPEG; the server caches it per mount and serves it at /<mount>/poster.jpg for landing/explore cards.
  • Viewer count + listening time: browser playback (HLS polls, WHEP offers) feeds a 30 s sliding-window IP tracker, so video mounts show real "viewers" rather than "0 listeners". Listening time sits next to the count and resets on pause.

Embedding

<iframe src="https://your-server.com/embed/live"
        width="100%" height="80" frameborder="0" allow="autoplay"></iframe>

The embed detects video mounts and renders a <video> instead of the compact audio bar when appropriate.

Listing pages

  • / — public landing page (branding + featured streams).
  • /explore — browse all mounts marked visible (visible_mounts).

Mounts hidden from listings are still streamable by direct URL — visibility and access are independent.


Next: AutoDJ for file-based stations · Observability for metrics on listeners/viewers.

Clone this wiki locally