Server-side Transcoding (SST)

Prev Next

Typically, Triton encoding for the Triton Digital content delivery network (CDN) is provided by the station-side Station Manager application, installed on one or more PCs or Zipstream2 appliances. Triton Digital Server-side Transcoding (SST) is a solution to provide additional ways of ingesting an audio stream and metadata into the Triton Digital content delivery network (CDN).

The service works for live streams only. Server-side Transcoding is available as an add-on to our live streaming service. Speak with your Triton Digital Client Success Manager to determine if the solution fits your needs.

Using the Server-side Transcoding mechanism, streams can be ingested via:

  • HLS pull of audio or video streams with ad metadata in playlist;

  • HLS pull via Triton's HLS URL;

  • RTMP pull;

  • Shoutcast or Icecast sources (with metadata);

  • Metadata is supported for HLS, Icecast, Shoutcast, and RTMP. Other formats may be supported but will require additional development (typically minimal).

The Server-side Transcoding solution is a component of MediaRelay.

References

Sources

HLS Pull

Server-side Transcoding follows the HLS specification. In order to ingest an HLS stream, a master playlist needs to be specified. Refer to the HLS playlist examples below.

Supported Codecs

Server-side Transcoding does not support adaptive streaming functionality.

See the Help Center knowledge base article "Choosing Audio Bitrate Settings" for a list of supported codecs.

All audio input codecs in the article above are also supported by Server-side Transcoding (except for the adaptive bitrate ones). As the publisher, you can transcode to the supported audio output codecs, or simply copy the input codec as-is.

Metadata and Cue Points

The information below describes the playlist metadata for ad injection and content.

Playlist Metadata

Ad Injection

The HLS Pull method supports ad injection parameters inside the m3u8 playlist.

Supported ad markers:

Tag

Description

EXT-X-CUE-OUT

Ad replacement beginning. Insert an ad break cue point.

EXT-X-CUE-OUT-CONT

Ad replacement continue. Insert an ad break cue point.

EXT-X-CUE-IN

Ad replacement end. Insert an ad endbreak cue point.

EXTINF

Identify a segment as per HLS specification. Additional metadata can be passed as parameters.

Example Playlist:

#EXTM3U
#EXT-X-VERSION:3
#EXT-X-ALLOW-CACHE:NO
#EXT-X-TARGETDURATION:10
#EXT-X-MEDIA-SEQUENCE:1
#EXT-X-PROGRAM-DATE-TIME:2020-02-20T18:24:11.000+0000
#EXTINF:9.98458
1.aac
#EXTINF:9.98458
2.aac
#EXTINF:9.98458
3.aac
#EXTINF:9.98458
4.aac
#EXT-X-CUE-OUT:30.00
#EXTINF:6.000, Advertisement
blank.aac
#EXT-X-CUE-OUT-CONT:ElapsedTime=6.00,Duration=30.00
#EXTINF:6.000, Advertisement
blank.aac
#EXT-X-CUE-OUT-CONT:ElapsedTime=12.00,Duration=30.00
#EXTINF:6.000, Advertisement
blank.aac
#EXT-X-CUE-OUT-CONT:ElapsedTime=18.00,Duration=30.00
#EXTINF:6.000, Advertisement
blank.aac
#EXT-X-CUE-OUT-CONT:ElapsedTime=24.00,Duration=30.00
#EXTINF:6.000, Advertisement
blank.aac
#EXT-X-CUE-IN
#EXTINF:9.98458
5.aac
#EXTINF:9.98458
6.aac
Content Metadata

The HLS Pull method supports content metadata parameters inside the m3u8 playlist.

EXTINF RAW with Artist and Title:

#EXTINF:200,Madonna - Vogue

EXTINF with STWCUE:

#EXTM3U
#EXT-X-VERSION:3
#EXT-X-ALLOW-CACHE:NO
#EXT-X-TARGETDURATION:10
#EXT-X-MEDIA-SEQUENCE:35
#EXTINF:10.008778,{"name":"track","properties":{"track_id":"SEAMA8777131","track_isrc":"SEAMA8777131","cue_title":"It Must Have Been Love","track_artist_name":"Roxette"}}
/stream/test-mount/media/2286/9/35.aac
#EXTINF:10.008778,{"name":"track","properties":{"track_id":"SEAMA8777131","track_isrc":"SEAMA8777131","cue_title":"It Must Have Been Love","track_artist_name":"Roxette"}}
/stream/test-mount/media/2286/10/36.aac
#EXTINF:9.985556,{"name":"track","properties":{"track_id":"SEAMA8777131","track_isrc":"SEAMA8777131","cue_title":"It Must Have Been Love","track_artist_name":"Roxette"}}
/stream/test-mount/media/2286/11/37.aac
#EXTINF:10.008778,{"name":"track","properties":{"track_id":"SEAMA8777131","track_isrc":"SEAMA8777131","cue_title":"It Must Have Been Love","track_artist_name":"Roxette"}}
/stream/test-mount/media/2286/12/38.aac
#EXTINF:10.008778,{"name":"track","properties":{"track_id":"SEAMA8777131","track_isrc":"SEAMA8777131","cue_title":"It Must Have Been Love","track_artist_name":"Roxette"}}
/stream/test-mount/media/2286/13/39.aac
ID3v2 Tag Metadata

In-stream ID3v2 content metadata is supported with HLS ingest. Refer to the ID3v2 specification for more information.

Supported Encryption

Triton HLS Server-side Transcoding supports the following features according to the HLS specification:

  • AES-128 Encryption

RTMP Pull

Server-side Transcoding from an RTMP/FLV Server. The Triton architecture can pull a stream from an RTMP server. To do this, we require an HTTP streaming URL to ingest in the Triton platform.

Metadata and Cue Points

Content Metadata

RTMP encapsulated FLV packets with optional onMetadata objects.

The onMetadata FLV cue points are converted to onCuepoint (STWcue) FLV format.

The following onMetadata objects are converted:

onMetadata

STWCue

album

track_album_name

genre

track_genre

title

cue_title

artist

track_artist_name

publisher

track_album_publisher

url

track_product_url

duration

cue_time_duration

Ad Markers

Ad breaks are signaled by the string Advert: in the title object.

title = "Advert: This is my ad"

To end a break, send a new title in the onMetadata FLV cue point that does not contain Advert:

title = "Morning News"

Ingest Metadata Supported

Ingest Metadata Priority

The metadata order of priority is listed below; highest to lowest:

Metadata

Description

STWcue

Triton Digital's internal format.

FLV

Classic FLV (Adobe) onMetadata format.

STCE35

HLS SCTE35.

ID3V2

Any file or segment based content, aac, mp3 etc. Can have an ID3v2 embedded at the start of the file.

EXTINF

M3U (defined pre-HLS format, created by Winamp/Nullsoft in roughly 1998). It is very basic ("Time In Seconds, Free Form String also known as ATS"), "ATS" used for Artist, Title and/or Song.

SC

Shoutcast/Icecast; this metadata comes from a live stream of mp3/aac audio over a single TCP connection. A metadata marker is sent every XXXX bytes, defined by the server and contains more useful information if present, including the possibility of Artist, Title, Album, Artwork URL, Ad marker, Duration, and more.

RAW

Described above, but it the simplest form of metadata. However, if it has " - " separators within, players and our system may be able to guess the "Title," "Artist - Title," and "Artists - Album - Title."

Priority example: If "STWCUE" is found to be present in the metadata, it is treated as highest priority and is used exclusively. While "RAW" data – that is, a pure string such as "A random string of words" – is treated with the least priority as it doesn't give the system much information to run with. But it is supported when you cannot classify/quantify the metadata. Basically, it is a pass-through string.

Best Practices

It is recommended to test the source feeds for at least 24 hours of continuous streaming prior to re-streaming via Triton Digital, to make sure the source does not present any issues and can ensure reliable streaming/transcoding.

Below are some of the tools that can be used.

ffmpeg (https://ffmpeg.org/)

For HLS Streams

Running the command line below will show in real time the different audio chunks that are being parsed, as well as the bitrate and encoding settings, and will reveal potential timestamp issues. Input the URL playlist to be tested and ffmpeg will convert it into a FLV file.

ffmpeg -v verbose -re -i https://my-stream-to-test/playlist.m3u8 -f flv -flvflags "no_duration_filesize" test.flv

For RTMP Streams (https://en.wikipedia.org/wiki/List_of_RTMP_software)

Replace the RTMP link with the stream to be validated:

ffmpeg -re -i rtmp://111.111.11.11:80/live/mystream -c:a libfdk_aac -profile:a aac_he -b:a 80k -ar 44100 -ac 2 -vn -sn -dn -f flv -flvflags "no_duration_filesize" -bsf:a aac_adtstoasc test.flv

The FLV files that are obtained after running these lines will be saved in the same folder where the command is run.

HLS Monitor

This is a Triton Digital tool that helps debug HLS feeds. It identifies all the fragments of the stream, and the debug tools are excellent to identify the incoming cue points. It is an Adobe AIR application that can be provided upon request.

Media Stream Validator

This is part of the HTTP Live streaming tools found on Apple's Developer web site (StreamingTools.pkg). The Media Stream Validator simulates an HTTP Live Streaming session and verifies that the index file and media segments conform to the HTTP Live Streaming specification. If any errors or problems are found, a detailed diagnostic report is displayed.

Once installed on a Mac, it can be run by typing the following from a terminal window:

mediastreamvalidator http://example.com/playlist.m3u8