OBS Studio is the first mainstream streaming software to support surround sound streaming and recording. Traditionally this is a feature reserved to professional broadcast appliances.
OBS Studio can stream and record up to 8 audio channels. The audio channels can be surround sound channels or more general multichannel ones.
Settings > Audio: just select a channel different from Mono or Stereo in the Channels list. Click OK to the Warning pop-up and restart OBS.
Settings > Output:
⚠ IMPORTANT WARNING: make sure to select the same channel layout as your input (if you have a 4.1 audio source do not select 7.1). If you don't, channel mixing may (or may not) occur. There is an automatic channel rematrixing when either downmixing or upmixing is mandated by a difference in channel layouts between source and output. This channel rematrixing mixes channels in general. Or it can remove a channel (ex: 3.1 source to 4.0 output removes the LFE channel).
Dolby: Streams can be encoded in ac3/eac (using Output > Advanced > Custom FFmpeg recording > stream to URL). But support of the various streaming services or web players has not been tested. Capture of Bolby can be tricky if the channels are lumped into two PCM channels; in order to be decoded correctly and encoded all the channels should be held in different PCM channels.
As of now, the following services have been tested and are compatible with live surround sound streaming:
Apart from streaming to services like Twitch or Facebook Live, you might use your own streaming server which delivers streams to your website.
The following servers have been tested and ingest surround sound in rtmp protocol:
Note however that server-side recordings only keep the first two channels although.
NB: Flash player accepts rtmp surround sound in Dolby; it might work ==> untested.
For music bands, try Djing. Up to 7.1 surround sound is available.
OBS Studio has built-in audio filters as well as VST 2 support. Filters support surround sound; VSTs can if the VST itself does.
Select Custom FFmpeg recording and a PCM format (e.g. pcm_s24le for 24 bit samples) for uncompressed audio.
For compressed formats, you can select also libopus and aac which will work very well (target at least 64 kbs per channel).
Reaper :
Tested with Reaper and the following apps ensuring the routing:
No DAW tested. Update the Wiki if you tested.
Although the channel layouts are tagged with position (2.1 5.1 etc), it is possible to encode your channels for ambisonics use provided your decoding application is setup to supply the ambisonics positions according to channel order.
This is the case for Facebook Live 360 with spacial audio.
To use the latter in Settings > Audio, select : channels > 4.0 ; aac codec is mandatory (if you use Recording > Custom FFmpeg > to URL > select flv container, with rtmp URL to FB live 360 and aac audio codec + x264 video codec).
When streaming to FB Live 360 the four channel rtmp stream will be interpreted as carrying ambisonics of order 1 .
In order for this feature to work, obviously you will need an ambisonics capture device.
If you have an aac or uncompressed audio recording with 4 ambisonics, you can also play it by adding a Media Source.
(If it doesn't work, check with ffmpeg that it is decoded correctly.)
No live streaming service supports beyond first-order ambisonics.
For recording, though for order 2 or 3, you can use pkviet's fork.
If you record with libopus (Output > Advanced > Custom FFmpeg recording ) up to 255 channels are available with mkv.
You will have to add the mapping_family=255 option though to FFmpeg audio encoder options in OBS-Studio.
Multichannel support in OBS allows to stream several languages simultaneously.
This is useful for live translation (public talks ... ).
The mainstream streaming services do not support such a feature directly.
In the broadcast industry, one usually uses mpeg-ts multi-track streams instead of a multichannel stream (in single track).
There are workarounds though allowing one to use a single track multichannel audio.
Here is one requiring :
For nginx setup with rtmp module, check elsewhere. (Make sure to set it up with a single worker.)
The setup is the following for surround sound capture with each mono channel carrying a language:
(capture tested: sdi/hdmi decklink cards, reaper, Behringer X32, ASIO sound cards).
obs with surround sound enabled
rtmp stream to nginx which is setup with an exec script
rtmp {
server {
listen 1935;
ping 30s;
notify_method get;
application splitter {
live on;
allow play all;
exec /home/me/splitter.sh $name;
exec_kill_signal term;
record off;
}
}
FFmpeg example script (for two languages and a stereo source):
#!/bin/bash
echo "$(date +"%Y/%m/%d %H:%M:%S"): starting"
on_die() {
# kill all children
pkill -KILL -P $$
}
trap 'on_die' TERM
ffmpeg -i rtmp://IP:port/splitter/ \
-filter_complex \
"[0:a]pan=mono|c0=c0,aresample=async=1000[a0];
[0:a]pan=mono|c0=c1,aresample=async=1000[a1]" \
-map 0:v -copyts -start_at_zero -vcodec copy \
-map [a0] -bsf:a aac_adtstoasc -copyts -start_at_zero -c:a libfdk_aac -ab 64k -ac 1 \
-f flv rtmp://IP:PORT/app/stream_language1 \
-map 0:v -copyts -start_at_zero -vcodec copy \
-map [a1] -bsf:a aac_adtstoasc -copyts -start_at_zero -c:a libfdk_aac -ab 64k -ac 1 \
-f flv rtmp://IP:PORT/app/stream_language2 &
wait
For more languages pick a corresponding channel layout and add relevant streams in FFmpeg script. You should also read the ffmpeg filtering guide. Note that for 5.1 and 7.1 one channel (the fourth) will be encoded as LFE and so is not useable. For up to 16 channels support, check the pkviet's fork.
Recording and Streaming multichannel audio sources (surround sound).
Compatible streaming services: Twitch, Mixer rtmp (not ftl), smashcast, FB 360 live
Compatible protocols:
Streaming servers tested:
html5 players tested and working with live surround:
Compatible containers (for recordings):
Compatible codecs:
OS: compatible with win, macOS, linux (alsa, pulse-audio).
Misc: