5.1 Audio via System Audio or ASIO


#1

Hey all - Long time, first time. I’ve run into a bit of a road block with a use case I’m working on and would love some insight. TL;DR Is it possible to get Multitrack Audio out of Caspar to either System Audio or ASIO? I’m trying to avoid external hardware to de-embed the audio from my DeckLink.

I have video with 5.1 audio embedded in it and a need to send this audio to Dante. Video and Audio play fine through the DeckLink, but we need to route the audio to our Dante system. Using Dante Virtual Soundcard I can select either WDM or ASIO for an input. Selecting WDM blocks me into using several stereo channel pairs to get multitrack audio. Caspar has a built in limitation to only use Stereo when using System Audio and can only use one (the default) System Audio Consumer as far as I can tell. I can use the program “Hi-Fi CABLE & ASIO Bridge” to create a 5.1 System Audio device that passes through to my Dante Virtual Soundcard, but again I’m limited to only use Stereo when using the System Audio Consumer even though Windows can play 5.1 audio through it to my Dante system.

Any thoughts on either getting System Audio to work with Multitrack Audio or creating an ASIO consumer?

Thanks!

Caspar 2.1
Windows 10
DeckLink Mini Monitor 4K


#2

Humm… 2.1 should should support channel-layout and latency as parameters for system-audio.

            <system-audio>
                <channel-layout>5.1</channel-layout>
                <latency>200</latency>
            </system-audio>

#3

That’s what I thought, too! Everything seems to downmix to stereo though. As per the (dated) Wiki from 2018-05-29 System Audio always converts to Stereo https://github.com/CasparCG/help/wiki/Media%3A-Audio#audio-consumers. No matter what config I use, I seem to always get stereo.

  <audio>
    <channel-layouts>
      <channel-layout name="smpte"       type="5.1"         num-channels="6" channel-order="FL FR FC LFE BL BR" />
      <channel-layout name="8ch"         type="8ch"         num-channels="8" />
    </channel-layouts>
  </audio>
  <channels>
    <channel>
      <video-mode>2160p2398</video-mode>
      <channel-layout>smpte</channel-layout>
      <consumers>
        <system-audio>
          <channel-layout>smpte</channel-layout>
        </system-audio>
        <decklink>
          <device>1</device>
          <buffer-depth>4</buffer-depth>
        </decklink>
      </consumers>
    </channel>
  </channels>

#4

It’s hard set to 2 (also in v2.2+):

Nothing about in the git log, might be a limitation or the implementation simply wasn’t finished. You should create an issue on GitHub.


#5

Why? The intention (as I understand) of the screen consumer and the system audio was, to have a simple way to test or preview Caspars output. So it is sufficient to have stereo. The sound of system audio is also not in sync to the Decklink.

But if you disagree you can post a feature request on GitHub or add the functionality, that you wish, yourself.


#6

Gotcha, thanks for the insight. For this use case the audio doesn’t need to be in perfect sync and a bit of drift is totally okay. This box is aimed at being a low-cost player that can be dropped in a cluster and play back media on demand with audio routing via software (Dante). Having one box with no external hardware for the audio makes this super easy to deploy. I’ll make the change locally and if it’s working well enough make a PR on GitHub.

Any thoughts on using ASIO?


#7

Well, what about Qlab or Watchout instead?
Caspar is more meant to be used in an broadcast environment. Of course I get the point of using Dante (I also would REALLY love to see this in a future version), but at this point it´s more an tool for SDI when it comes to multiple audio channels. :-/


#8

I ended up modifying the OpenAL consumer to use AL_FORMAT_51CHN16 instead of AL_FORMAT_STEREO16 in addition to modifying the buffers and channels. This is now working on a build from the 2.1.x branch and is hard coded for 5.1, but maybe I’ll change it to be set by the config if anyone is interested. I spent some time trying to get these changes working with 2.2.x and master, but kept running into audible clicking from what seems like maybe a buffer or sampling issue so I won’t be putting in a PR at this point.


#9

Great to hear. I’m not sure that there is much interest (especially if it needs more work for 2.2+), but I would recommend that you get your fork up on GitHub so those that might need more than stereo from system-audio can find it. You’d also increase the chance of someone implementing it for 2.2+.