AES67 resources

AES67 is a standard for audio over IP developed by the Audio Engineering Society. It enables interoperability between existing standards such as Dante, RAVENNA, Q-Lan and Livewire.

Information about AES67

So how does AES67 actually work? The AES67 Wikipedia page and the AES67 draft from 2017 are a good point to get an overview:

In summary AES67 consists of three major, already existing standards. The first is Precision Time Protocol (PTP) as defined by IEEE 1588-2008 (Precision Time Protocol on Wikipedia) for clock synchronization. The second is the Real-time Transport Protocol (Wikipedia) with 24-bit PCM as the default audio format transmitted via multicast. The third is the Session Description Protocol with Session Announcement Protocol as the transport protocol for session discovery. I suggest to take a look at the standards (sadly IEEE 1588-2008 is behind a paywall) if you want to know how they work, as I won’t be explaining any details here.

Implementations of the standards

As the mentioned important standards for AES67 already exists longer than AES67 itself. We do not necessarily need to implement them, as there are already good working implementations out there.

RTP

  • GStreamer (also implements PTP and SDP): Open source multimedia framework
  • rtptools: “set of small applications that can be used for processing RTP data”

PTPv2

SAP/SDP

Open source software

Even though AES67 has been around for 6 years, there is not a lot of open source software for AES67 out there. Open source projects that are related to AES67 which I find most interesting are (in no particular order):

Closed source software

  • Lawo VSC (Windows) AES67 virtual soundcard
  • Lawo Stream Monitor (Windows) AES67 stream monitoring tool
  • Merging AES67 ALSA Driver (Linux, free and partially open source) AES67 Alsa virtual soundcard
  • Merging MacOS VSC (MacOS, free) AES67 virtual soundcard
  • Livewire+ VSC (Windows) Livewire+ virtual soundcard, compatible with AES67
  • Ravenna VSC (Windows, free) Ravenna virtual soundcard, compatible with AES67
  • RAV2SAP (Windows, free) “Session announcement translation between RAVENNA and SAP-based systems”
  • PTP Track Hound (MacOS, Linux, Windows, free) PTP network traffic analysis tool
  • Aneman (MacOS, Windows, free) Cross platform and cross vendor AoIP connection manager
  • AES67 Test Tone (MacOS, free) AES67 test tone app, does not implement PTP

Discussion, talks, articles and other resources

If you have further suggestions of software or resources that are missing on this list, feel free to contact me on Twitter.

Interesting ffmpeg commands and scripts

I had serveral occasions, where I wanted something weird done in ffmpeg. The following ffmpeg commands and scripts are things I tried out, experimented with and also used. I might add onto the list in the future, as I stumble upon other interesting tasks done with ffmpeg.

The first script is to use ffmpeg as an audio dsp with multiband equalizer in MacOS. You could add other audio filters if you want, though that might increase the latency which is already quite high. For me the input is the built in microphone, though you can adjust that accordingly. I wrote the script to make it easier to configure the equalizer.

#:/bin/sh

# range is from 0 to 20
# 1b: Set 65Hz band gain.
f1b=10
# 2b: Set 92Hz band gain.
f2b=10
# 3b: Set 131Hz band gain.
f3b=10
# 4b: Set 185Hz band gain.
f4b=10
# 5b: Set 262Hz band gain.
f5b=10
# 6b: Set 370Hz band gain.
f6b=10
# 7b: Set 523Hz band gain.
f7b=10
# 8b: Set 740Hz band gain.
f8b=10
# 9b: Set 1047Hz band gain.
f9b=10
# 10b: Set 1480Hz band gain.
f10b=10
# 11b: Set 2093Hz band gain.
f11b=10
# 12b: Set 2960Hz band gain.
f12b=10
# 13b: Set 4186Hz band gain.
f13b=10
# 14b: Set 5920Hz band gain.
f14b=10
# 15b: Set 8372Hz band gain.
f15b=10
# 16b: Set 11840Hz band gain.
f16b=10
# 17b: Set 16744Hz band gain.
f17b=10
# 18b: Set 20000Hz band gain.
f18b=10

ffmpeg -f avfoundation -i ":0" -filter_complex superequalizer=1b=$f1b:2b=$f2b:3b=$f3b:4b=$f4b:5b=$f5b:6b=$f6b:7b=$f7b:8b=$f7b:9b=$f9b:10b=$f10b:11b=$f11b:12b=$f12b:13b=$f13b:14b=$f14b:15b=$f15b:16b=$f16b:17b=$f17b:18b=$f18b -f f32le - | ffplay -f f32le -ar 44.1k -ac 2 -

The next command merges several .mp3 files into one file.

cat *.mp3 | ffmpeg -i pipe:0 -acodec libmp3lame -map_metadata -1 "output.mp3"

It is possible to just do cat *.mp3 > output.mp3. This should work in most players, but the problem is that between the encoded audio data are the headers of the mp3 files. By reencoding the audio with ffmpeg, the length of the audio and the metadata are stored at the beginning of the mp3 file as it should be. I use -map_metadata -1 to remove any metadata of the mp3 files. Otherwise ffmpeg would copy the ID3 tags and other metadata of the first file to output.mp3.

I got one more command. This one is to make the video of a usb webcam or built in camera available on the network. It takes /dev/video0 as an input, and opens a tcp server on the specified IP address and port. You can access it by ffplay tcp://ip:port for example, but you can also use it as a OBS source or access it with vlc. By using -c:v copy the video is not reencoded, and thus this command has very little cpu consumption and there is less delay. This command is linux only, as it uses the video4linux2 input device.

ffmpeg -f v4l2 -framerate 30 -video_size 1920x1080 -vcodec h264 -i /dev/video0 -c:v copy -f h264 tcp://ip:port?listen