Streaming configuration

From SOUND4wiki

Protocols

Icecast 2.0 and 2.x

There are 2 versions: 2.0 or 2.x. The difference is only in metadata handling.

Icecast needs a fixed user (source) even if the protocol allows other usernames.

The metadata update should use the admin password, which is different from the source password. However, it can work if a stream is coming from the same IP address.

In Icecast server 2.2+ we can use XSL to send metadata and avoid this problem. We can also send title and artist as separated data.

In Icecast server 2.0, we have no way to avoid this problem.

Default port: 8000.

Supports MP3, all AAC, Opus, Vorbis and FLAC.

Shoutcast v1

Old shoutcast protocol, very close to Icecast, using mount points.

Default port: 8000.

Supports MP3 and all AAC.

Shoutcast v2

Shoutcast protocol using UltraVox protocol. It uses an ID instead of a mount point.

Metadata is sent as XML in the main stream, allowing flexible use.

Default port: 8000.

Supports MP3 and all AAC.

RTMP

Flash Media Server protocol., which can be Encrypted (E), Tunneled in HTTP (T) and/or Secured (S), giving a list of different variants.

Metadata is sent in the main stream, allowing any name/value pairs.

Default port: 1935 (80 for T/TE, 443 for S/TS).

Supports MP3 and all AAC.

RTP and RTP/MPEG-TS

Can send data to unicast or multicast address.

If using RTP/MPEG-TS, audio will be encapsulated in MPEG-TS muxer.

Payload type can be selected for RTP streams. If the codec is not in registered RTP payloads, dynamic payload 97 will be used.

Max Payload Size may be set to reduce latency, but increasing bandwidth usage, or the opposite. The default depends on the codec.

For MPEG-TS it is 188. You can set it to 188*7=1316 to reduce bandwidth.

A SDP file can be generated locally by setting a path to store it. On Standalone products, /public/ might be a good place as it is accessible from Windows networks.

In latest versions, metadata is sent as an ID3 metadata PES stream.

Default port: 5004.

RTP: supports MP2, MP3, all AAC, PCM S16BE and Opus.

RTP/MPEG-TS: supports MP2, MP3, all AAC, SMPTE 302M and Opus.

FEC for RTP

3 kinds of FEC are implemented:

  • parityfec (RFC 2733)
  • ulpfec (RFC 5109) with only Level 0 used
  • ProMPEG (ST2022-1) for MPEG-TS streams only

It is send to the same destination, on RTP port+2, with payload 98 for ulpfec and parityfec.

For ProMPEG, uses payload 96 and RTP port+2 for columns, RTP port+4 for rows (2d mode).

Note: For ProMPEG FEC, row must be in [1-20] and Col must be in [4-20] and Row*Col≤100.

The mode can be one of:

  • 5% : adds 5% overhead by putting last 20 packets in FEC.
  • 10% : adds 10% overhead by putting last 10 packets in FEC.
  • ...
  • 100% rec 3: adds 100% overhead by putting last 2 packets in FEC, but after each packet.
  • 100% rec 4: adds 100% overhead by using a rotating scheme on the last 4 packets.
  • 1d: view packets as a matrix and make FEC on columns (similar to ST2022-1)
  • 2d: view packets as a matrix and make 1 FEC on columns and 1 on rows (ST2022-1)

Warning: In Streaming extension ≤3.0.3, the row and col are inversed for ProMPEG (only).