AES67

From SOUND4wiki

Generalities

These docs are useful :

AES67 Practical Guide (by courtesy of RAVENNA) :
File:AES67 Practical Guide.pdf

SDP

The SDP (Session Description Protocol) is a mandatory AES67 data that gives all useful information to connect to an audio/video stream. It is usually automatically exchanged transparently by devices but can be used to manually connect to an audio/video stream.

The SDP file for generated AES67 streams can be downloaded on the SOUND4 device web server at : "http://<ULA IP address>:8554/by-id/<Stream number>"

with <ULA IP address> = IP address of the AES67 Ethernet Port of the SOUND4 device

and <Stream number> = from 1 to 8

eg http://192.168.6.50:8554/by-id/1

NOTE: some devices (WM2) can configure the RTSP port and have a default port equal to 8854.

The SDP file can be saved with .sdp extension and then directly opened in VLC for instance (Media->open file).

The lines of interest are :

  • "c=IN IP4 <IP address>/<TTL>" gives the stream's Multicast IP address
  • "m=audio <udp port> RTP/AVP <payload type>" for the UDP port and PayloadType
  • "a=rtpmap:<payload type> <format>/<samplerate>/<n channels>" for the Sample Format (usually "L24") and Number of Channels (usually 2 ; if the stream has more than 2 only the first two will be used on SOUND4 device)


Transport

IPv4 Multicast addresses

AES67 does not automatically attribute multicast address, it's under user's responsibility.

Multicast address range is : 224.0.0.0/4. The group includes the addresses from 224.0.0.0 to 239.255.255.255 (cf https://en.wikipedia.org/wiki/Multicast_address)

For Audio over IP usage it's recommended to use 239.x.y.z range ("Administratively scoped, private use within an organization", see [rfc:2365 RFC2365]).

Actually some usual sub-ranges are :

  • 239.192.y.z => Livewire (Livestream and Standard Stereo Streams) [239.192.0.1 to 239.192.127.255] Livewire channel is y*256+z, so channel range is [1:32767] So channel 1000 is 239.192.3.232 (1000/256=3 and 1000-3*256=232)
    • 239.192.255.1 to 4 are Livewire clock/advertising/GPIO
  • 239.193.y.z => Livewire (Back Standard Streams)
  • 239.195.y.z => Livewire (Back Live Streams)
  • 239.255.255.255 => SAP (advertisement) Dante

Never use 224.x.y.z range which is reserved for Network administration and control.

IGMP

IGMP snooping must be enabled on the Ethernet Switches. It routes multicast packets to the ports that request them, and avoid them to be broadcasted everywhere on the network which would saturate it.

Windows

Under Windows, there may be difficulties with multicast routing when more than one Network Interfaces is used.

You can check joins with netsh interface ip show joins.

A solution might be to add a static route like route add -p 224.0.0.0 mask 240.0.0.0 192.168.x.y (the -p makes route permanent).

Another one would be to reduce metric on the multicast interface.

For FFMPEG, you may add the parameter localaddr, like for instance rtp://239.192.22.31:5004?localaddr=192.168.x.y.

For VLC, it is possible to specify the local IP address for the multicast with for instance rtp://192.168.x.y@239.192.22.31:5004/ where 192.168.x.y is your local IP address.

UDP Port

Usually port 5004 is used for RTP (audio) and 5005 for RTCP (control) (cf http://www.networksorcery.com/enp/protocol/ip/ports05000.htm) but you may choose another number:

  • RTP port must be even
  • RTCP port = RTP port + 1
  • don't use port under 1024 which are Unix "system ports"


Note : RTCP is not widely used except by RAVENNA

IP TTL

Time To Live was a way to restrict multicast packets to a subnet. This is important because AoIP bandwidth is huge and audio packets should not flood away and bring down a company's network.

TTL=1 is a widely used value but it may disturb some CISCO routers, this is why SOUND4 devices have a default TTL=2 value.

Because TTLs are difficult to manage in practice, nowadays IP routing rules is the preferred choice for confining Multicast, based on "scoping", typically used inside the "administratively scoped IPv4 multicast space" (239.0.0.0 to 239.255.255.255) which is the range normally used by AES67 audio packets (RFC2365). In this case the TTL may be forced to 255.

CAUTION : The TTL always has to be checked against your network governance, especially when Multicast Routing is used.


QOS

IP packets must be classified :

  • clock packets (PTP or LW) must be highest priority to minimize delay / jitter and improve stability.
    • for PTP, AES67 standard recommends to use EF (DSCP46). We recommend to use CS6 (DSCP48)
    • for Livewire we recommend to use CS6 (DSCP48)
  • audio packets must be high priority. Low delay packets must have higher priority than higher delay ones.
    • for Livewire streams (Very Low Delay: 12 spl/pkt = 250µs/pkt) we recommend to use EF (DSCP46)
    • for AES67 1ms streams (Low Delay : 48 spl/pkt = 1ms/pkt), AES67 standard recommends to use AF41 (DSCP34)
    • for Livewire Standard streams (240 spl/pkt = 5ms/pkt) we recommend to use AF41 (DSCP34)

This configuration must be the same for all the audio devices of your network.

Ethernet switches must also be configured to classify these DSCP with different Egress priority, usually :

CS6 > EF > AF41> Default Forwarding = Best Effort (DSCP0)

Clocking

AES67 uses PTP (Precise Time Protocol, IEEE1588v2-2008) as clock reference for sub-sample synchronization.

You have to configure some parameters, which are normally chosen according to a "PTP Profile" (1588, AES67, ST2110) and must be the same for all the audio devices of your network.

These parameters are critical for good and fast synchronization, especially when a Master Clock is disappearing and another one takes precedence.

Parameters :

  • domain [0..255] : choose a common number, 0 is AES67 default, 127 is SMPTE ST2110 default
  • priority1 and priority2 [0..255] : (for Master only) used to elect the clock Master. Lower values take precedence. priority1 is used first, then Clock Quality, then priority2. Default is 128,128.
  • sync delay (in seconds) : (for Master only) mean delay between SYNC messages. Default is 0.125s
  • announce interval (in seconds) : (for Master only) mean delay between ANNOUNCE messages. Default is 2s
  • announce timeout (in packets) : number of announce interval that has to pass before timeout (which launch a Best Master election). Default is 3 packets.
  • request interval (in seconds) : (for Slave only) mean delay between DELAY_REQ messages. Default is 1s


Reception Buffer size and Jitter Compensation

At each sink side the reception buffer size must be configured by taking into account the jitter of arriving audio packets and the acceptable transit delay.

Note that audio from a PC Virtual Sound Card may have 10ms of jitter. Audio from Internet may also have such high jitter.

Interconnecting...

Dante

Wheatstone

iqoya

Don't use the "AES67 Very Low Latency profile".

Check format is 24bits.

PC Virtual Sound Card, SOUND4 WM2

These product may have 10ms of output jitter so the receiving device must be configured with more than 10ms buffer.

Sending with SOUND4 Stream

Use RTP - PCM S16BE - Stereo - 48kHz to send on port 5004, and configure to receive 16 bits audio (L16).

Payload type should be set to 96.

You can use unicast by setting the unicast IP destination, and putting the same address on the receiver (its address).

NOTE: SOUND4 Stream is designed first for compressed audio, so it works with 2048 sample buffers. This creates bursts in PCM every 43ms.

Troubleshooting

See LANAUDIO