Difference between revisions of "Streaming configuration"

From SOUND4wiki
(Started)
 
Line 1: Line 1:
=== Protocols ===
+
===Protocols===
  
==== Icecast 2.0 and 2.x ====
+
====Icecast 2.0 and 2.x====
 
There are 2 versions: 2.0 or 2.x. The difference is only in metadata handling.
 
There are 2 versions: 2.0 or 2.x. The difference is only in metadata handling.
  
Line 16: Line 16:
 
Supports MP3, all AAC, Opus, Vorbis and FLAC.
 
Supports MP3, all AAC, Opus, Vorbis and FLAC.
  
==== Shoutcast v1 ====
+
====Shoutcast v1====
 
Old shoutcast protocol, very close to Icecast, using mount points.
 
Old shoutcast protocol, very close to Icecast, using mount points.
  
Line 23: Line 23:
 
Supports MP3 and all AAC.
 
Supports MP3 and all AAC.
  
==== Shoutcast v2 ====
+
====Shoutcast v2====
 
Shoutcast protocol using UltraVox protocol. It uses an ID instead of a mount point.
 
Shoutcast protocol using UltraVox protocol. It uses an ID instead of a mount point.
  
Line 32: Line 32:
 
Supports MP3 and all AAC.
 
Supports MP3 and all AAC.
  
==== RTMP ====
+
====RTMP====
 
Flash Media Server protocol., which can be Encrypted (E), Tunneled in HTTP (T) and/or Secured (S), giving a list of different variants.
 
Flash Media Server protocol., which can be Encrypted (E), Tunneled in HTTP (T) and/or Secured (S), giving a list of different variants.
  
Line 41: Line 41:
 
Supports MP3 and all AAC.
 
Supports MP3 and all AAC.
  
==== RTP and RTP/MPEG-TS ====
+
====RTP and RTP/MPEG-TS====
 
Can send data to unicast or multicast address.
 
Can send data to unicast or multicast address.
  
Line 48: Line 48:
 
Payload type can be selected for RTP streams. If the codec is not in registered RTP payloads, dynamic payload 97 will be used.
 
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. The default depends on the codec. For MPEG-TS it is 188.
+
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.
 
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.
Line 58: Line 60:
 
RTP/MPEG-TS: supports MP2, MP3, all AAC, SMPTE 302M and Opus.
 
RTP/MPEG-TS: supports MP2, MP3, all AAC, SMPTE 302M and Opus.
  
===== FEC for RTP =====
+
=====FEC for RTP=====
 
3 kinds of FEC are implemented:
 
3 kinds of FEC are implemented:
  
* parityfec (RFC 2733)
+
*parityfec (RFC 2733)
* ulpfec (RFC 5109) with only Level 0 used
+
*ulpfec (RFC 5109) with only Level 0 used
* ProMPEG (ST2022-1) for MPEG-TS streams only
+
*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.
 
It is send to the same destination, on RTP port+2, with payload 98 for ulpfec and parityfec.
Line 71: Line 73:
 
The mode can be one of:
 
The mode can be one of:
  
* 5% : adds 5% overhead by putting last 20 packets in FEC.
+
*5% : adds 5% overhead by putting last 20 packets in FEC.
* 10% : adds 10% overhead by putting last 10 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 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.
+
*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)
+
*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)
+
*2d: view packets as a matrix and make 1 FEC on columns and 1 on rows (ST2022-1)

Revision as of 15:24, 11 March 2022

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.

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).

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)