Icecast Metadata

Prev Next

Metadata is delivered to the server in a method called "out-of-band." That is; while a single TCP connection to the MR server delivers MP3 or AAC audio data, the metadata (song and ad markers) are delivered via separate HTTP transaction to the server independently of the audio data. Metadata is sent to the MR server using the HTTP GET method.

Metadata can be sent to the MR server at any time while broadcasting with a simple HTTP request.

  • It can be used to send Artist and Title information to connected listeners for the current playing track.
  • In theory, metadata can be used to insert ad markers. Unfortunately the metadata channel is not in sync with the audio channel, so the timing may not be perfect and could fluctuate over time. Therefore, we do not recommend using ad markers for dynamic ad insertions of mid-rolls, unless the quality and timing for that station are not important.
  • With custom work, you can use this to send liner notes or other non-track relayed messages to connected listeners.

GET Method:

GET /admin/metadata?mount=/MOUNTNAME&mode=updinfo&song=Song+-+Title&url=UrlEncodedSubParameters HTTP/1.0\r\n
Authorization: Basic c291cmNlOmhhY2ttZQ==\r\n
\r\n

Response

Response CodeDescription
200Success.
400Invalid Request or Invalid Mount Name.
401Invalid Password.
404Unknown Mount or Temporarily Disabled.
500Server Unavailable.

The GET code block shown above is an example HTTP URL that you must create to send to the Triton Digital MediaRelay to insert stream events (Song event and mid-roll ad breaks).

The song and url parameters are needed to support metadata updates.

Song Parameter

The song= parameter is a free-form text field not officially described, but over the years has worked out the following format:

Format
song=Title
song=Artist - Title
song=Artist - Album - Title

Triton has added support for a new song= format that provides improved metadata include Ad replacement and injection. It is discussed further down in this document as TildeATS.

URL Parameter

The url= parameter can be used to provide additional information about the current event, be it a song/track start or a mid-roll ad break.

If the url= parameter is used, then the song= parameter is ignored.

The url= parameter can contain a URL-encoded sub-parameter list of songtype, style, duration, title, artist, and album.

  • songtype of "S" indicates a song or block of content start.
  • songtype of "A" indicates the start of an ad break. This will trigger a mid-roll ad break.
  • style of "block" indicates the start of an ad block. This will trigger a mid-roll ad block; any other form of metadata will be ignored until a songtype of "S" and/or style of "default" is received.
  • duration indicates the length of the current event in seconds (optional but recommended).
  • title indicates the title of the current event. It can be empty (optional).
  • artist indicates the artist of the current event. Ignored if songtype is A (optional).
  • album indicates the album of the current event. Ignored if songtype is A (optional).

Sub-Parameters

Sub-parameters are identical in format to standard URL parameters, but URL-encoded as a single value for the url= parameter.

title=Vogue&artist=Madonna&duration=300&songtype=S

...needs to be delivered as:

url=title%3DVogue%26artist%3DMadonna%26duration%3D300%26songtype%3DS

Mid-roll Ad Injection / Replacement

We do not support using Icecast with mid-roll ad injection.

Icecast Metadata Timing

Metadata can be sent at any time from your broadcasting tool. It is best to make this as accurate as possible given the live "out-of-band" nature of the metadata method.

Once the "content" and the "metadata" arrive at the Triton "origin" server, that timing/synchronization will be carried forward through the system in "lock step" and will not have any further time drift.

Shoutcast/Icecast playback by listeners can and will re-introduce time drift. This is easily solved by using HLS- or FLV-based client players instead.

Metadata Examples

Metadata Type/MetadataDurationCommentExample
Song Start
"Madonna - Vogue"
3 min. 20 sec.
http://source:mount_password@server:port/admin/metadata?mount=/MOUNTNAME&mode=updinfo&song=notUsed&url=duration%3D200%26songtype%3DS%26artist%3DMadonna%26title%3Dvogue
url sub parameters sent : duration=200&songtype=S
Ad Break
"Targeted Ad"
30 seconds
http://source:mount_password@server:port/admin/metadata?mount=/MOUNTNAME&mode=updinfo&song=notUsed&url=title%3DTargeted%20%E2%80%8BAd%20Break%3D%26duration%3D30%26songtype%3DA
url sub parameters sent : title=Targeted Ad Break=&duration=30&songtype=A
End Break
No title needed
Not neededRequired to end an ad break if you are using ads in a news or live show where there are no 'title' updates in the broadcast.http://source:mount_password@server:port/admin/metadata?mount=/MOUNTNAME&mode=updinfo&song=&url=songtype%3DS
url sub parameters sent : songtype=S

TildeATS Metadata Format

Some Icecast broadcast tools are not capable of populating the url parameter. This has limited metadata to only providing classic Artist - Title strings, referred to as ATS format. This precludes ad replacement/injection, as there is no parsing of the song parameter. Triton has added support for song based extended metadata that enables more Icecast broadcast tools, including the option for ads.

Triton has already recognized song=Artist - Title encoded as Artist%20-%20Title where a  space-hypen-space " - " separates Artist and Title.

We now recognize a new separator: space-tilde-space where a tilde (" ~ ") gives you more options/control when your tools do not allow using the url.

  • The tilde-separated string must contain a minimum of four fields:
    • artist
    • title
    • duration in seconds
    • category number
  • The tilde-separated string must be terminated with the caret "^" character.
  • The tildes must have a leading and trailing space " ~ "

Example Track Metadata:

Billie Eilish ~ Bad Guy ~ 246 ~ 0 ^

URL Encoded as:

song=Billie%20Eilish%20~%20Bad%20Guy%20~%20246%20~%200%20%5E

If the duration is not known, 0 must be provided.

Example for Ad Replacement:

Break ~ Break ~ 60 ~ 4 ^

URL encoded as:

song=Break%20~%20Break%20~%2030%20~%204%20%5E

Example for Ad Insertion with a default 1 ad insert:

Break ~ Break ~ 30 ~ 4 ~ I ^

URL Encoded as:

song=Break%20~%20Break%20~%2030%20~%204%20~%20I%20%5E

Example for Ad Insertion with a specific count:

Break ~ Break ~ 30 ~ 4 ~ I ~ 3 ^

URL Encoded as:

song=Break%20~%20Break%20~%2030%20~%204%20~%20I%20~%203%20%5E

Categories

At this time only two categories are processed:

  • Music (0)
  • Commercial (4)

All other categories are accepted and processed as an End Break event.

The known categories at this time are:

  • Music: 0
  • Jingle: 1
  • Sweeper: 2
  • Voice: 3
  • Commercial: 4
  • InternetStream: 5
  • Other: 6
  • VDF: 7
  • Podcast: 8
  • Request: 9
  • News: 10
  • PlaylistEvent: 11
  • FilebyDate: 12
  • NewestfromFolder: 13
  • Teaser: 14
Ignore Metadata Event Feature (##)

An additional feature allows you to have Triton ignore a metadata event yet still be processed as an End Break. This allows you to terminate a break event that will not end up in a SoundExchange report by accident.

Any song= string starting with two hashes "##" are ignored in this way.

Examples:

##Ignored - Event

##Ignored ~ Event ~ 300 ~ 0 ^