Repository navigation
Streams
This article explains part of Radio 2.0 in plain words. It is not normative: where it differs from the specification, the specification is right.
A stream entry in a Radio 2.0 manifest describes one way to listen to the station: a URL with its format, bitrate and timing. The streams list holds one to 32 of them, all carrying the same programme. The optional broadcast object adds whether and how the station is also on the air (FM, HD Radio, DAB+ and others).
| Defined in | Specification 2.4, 2.5, 2.6 |
| Members |
streams[] and broadcast in the Manifest
|
| Required per stream |
id, url, mimeType
|
| Count | 1 to 32 streams; up to 32 transmissions |
| Status | Draft |
Each stream has a unique id (letters, digits, ., _, -, up to 64 characters, stable across versions), a url and a mimeType such as audio/mpeg, audio/aac, audio/ogg; codecs=opus, audio/flac or application/vnd.apple.mpegurl. Recommended: protocol (icecast, http, hls or ll-hls), bitrate in kbit/s, typicalDelayMs and carries. Optional: sampleRate, channels, default.
typicalDelayMs is the typical time from an item's startedAt to the moment a listener who has just connected hears it. Players use it to show titles at the right moment; see Live events.
All streams in a manifest carry the same programme in different formats, bitrates or transports. An HLS playlist with several bitrates counts as one stream. A sister channel, an HD2 sub-channel with its own programming, or an AM and an FM service that share a brand but not programming are separate stations with their own manifest and GUID. The reason: one manifest has one set of events, one schedule and one value.
Publishers list streams in order of preference. Exactly one stream should set default: true. A consumer that finds none treats the first stream as the default. A consumer that finds several keeps the first and ignores the other flags. If the default fails, the consumer should try the next stream it can play. A consumer choosing for its own needs (bandwidth, battery, codec) takes the first stream whose mimeType it can decode and whose bitrate suits it.
A consumer that stores a manifest sets default on exactly one stream by the rule above. The same rule applies to video streams.
broadcast has a required mode, either on_air or web_only. With on_air at least one transmission must be listed; with web_only the list must be empty or absent. Without broadcast, the answer is unknown.
Each transmission has an id and a band, and only the members its band allows. The spec lists these bands: fm, am, lw, sw, hd_fm, hd_am, dab, dab_plus, drm, drm_plus, satellite, cable and dtv. The unit is in the member name (frequencyMhz, frequencyKhz), so a frequency is never ambiguous. DAB uses a block such as 12B; HD Radio uses a subchannel; satellite, cable and TV use a provider channel. Any band may add callSign or licensedName, area, coverage, an optional transmitter site (leave it out for privacy or security) and regulatorIds.
Each stream says what it carries in carries: the ids of the transmissions it feeds, or ["web"] for an internet-only stream. web cannot be mixed with transmission ids and cannot be a transmission id. A consumer labels each stream from its own carries, and treats the station as on the air when any stream carries a listed transmission, even if mode says web_only. A validator reports that disagreement as an error.
Regulator identifiers are {authority, kind, id}, with an authority such as us.fcc or gb.ofcom. Cross-checking them with public records is informative only and does not prove who publishes the manifest.
{
"mode": "on_air",
"transmissions": [
{
"id": "dab",
"band": "dab_plus",
"block": "11B",
"licensedName": "Harbourside Radio",
"serviceId": "C4A2",
"ensembleId": "C1B7"
}
]
}A directory should label such a transmission "DAB+ 11B", followed by the call sign or licensed name.
- Putting
frequencyMhzon adabtransmission, orrdson DAB. Members a band does not list must not appear. - Giving
mode: "web_only"with transmissions. - Naming a
carriesid that does not exist.
Radio 2.0 is an open standard, MIT licensed. Documentation: radio2.org. Questions: Discussions.
Overview
The manifest
Discovery and identity
Live data
Money
Implementations and tools
- Implementations
- Reference implementation
- radio2 command line tool
- Create a manifest
- Conformance
- Stations
- Brand and badges
Project
Documentation
Community