Another potential solution: use FFMPEG to split the stereo audio track into two mono audio tracks:
ffmpeg -i source.mp4 -map 0:0 -map 0:1 -map 0:1 -map_channel 0.1.0:0.1 -map_channel 0.1.1:0.2 -c:a:0 aac -b:a:0 64k -ac:a:0 1 -r:a:0 44100 -c:a:1 aac -b:a:1 64k -ac:a:1 1 -r:a:1 44100 -strict experimental -y output.mp4
Then you can use Wowza’s ModuleMP4AudioChannelSelector module to specify the desired audio track in the URL:
The nice thing about this method is that it works for VOD across RTMP, HTTP (HLS), and RTSP, delivered by Flash, HTML5, or QuickTime – basically, just about anything Wowza can output. And if you offer your videos for download, podcasting, or will be viewing them locally at all, this makes for easy audio switching in iTunes, iOS, VLC, etc. You can even assign your tracks languages with FFMPEG metadata:
Or use MP4Box / MP4Track to set custom audio track names.
Downside to this method is you have to reload the page/player to switch between the audio tracks, and it only works when preparing VOD files, not live streams, because FFMPEG live streams require the “flv” container and that doesn’t support multiple audio tracks.
For live streams, you could run separate FFMPEG commands to isolate each of the audio channels with the video:
ffmpeg -re -i rtmp://wowza-server/liveapp/myStream -map 0:0 -map 0:1 -map_channel 0.1.0:0.1 -c:v copy -c:a aac -b:a 64k -ac:a 1 -r:a 44100 -strict experimental -f flv rtmp://wowza-server/liveapp/myStreamLeft
ffmpeg -re -i rtmp://wowza-server/liveapp/myStream -map 0:0 -map 0:1 -map_channel 0.1.1:0.1 -c:v copy -c:a aac -b:a 64k -ac:a 1 -r:a 44100 -strict experimental -f flv rtmp://wowza-server/liveapp/myStreamRight
In our case, viewers should only need either both channels (the original stream) or just the right channel (the second FFMPEG live stream command above) so we only need one extra command.