Channel_layout / Mixing / Mapping / 16ch out of 2

Hello again,

after a while I’m coming back to the forum with a problem I cannot solve. Maybe my understanding of the concept of channel_layout is wrong.
What I try to achieve:
I need a decklink output that always contains audio on 16 channels. The output could either be a video from an input channel that already contains 16 channels or an audio only from a wav- or aac-file. The problem is that I need to “copy” the audio tracks 1 and 2 to all 16 channels.
While I’m using server 2.1.11 NRK branch I thought I could manage that via the mixer in the config file.
So I established a channel_layout “dubbed” which I call everytime I play a (audio- or video-)file that contains only two audio channels:

LOADBG 1-9 “CASTLES720” FORMAT 1080i5000 CHANNEL_LAYOUT “dubbed” LOOP MIX 12
PLAY 1-9

The entry in the config file section is as follows:

<audio>
  <channel-layouts>
	<channel-layout name="16ch"     type="16ch"        num-channels="16"/>	
	<channel-layout name="dubbed"   type="multi"      num-channels="16" channel-order="FL FR FL FR FL FR FL FR FL FR FL FR FL FR FL FR"/>	
  </channel-layouts>
  <mix-configs>
	<mix-config from-type="multi"   to-types="16ch"  mix="FL = FL | FR = FR" />
  </mix-configs>
</audio>

So I thought whenever I call then channel_layout “dubbed” the mixer gets the two available channels and maps them to all 16 channels.
Unfortunately I have absolutely no audio on any channel when I call this channel_layout. All muted.

Can anyone lead me to the right track here. I think I don’t get the idea of audio mixing and mapping right here.

Thanks.

Ingo

Here’s my complete config file:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <paths>
    <media-path>D:/CasparCG/_media/</media-path>
    <log-path>D:/CasparCG/_log/</log-path>
    <data-path>D:/CasparCG/_data/</data-path>
    <template-path>D:/CasparCG/_templates/</template-path>
    <thumbnail-path>D:/CasparCG/_thumbnails/</thumbnail-path>
  </paths>
  <log-level>info</log-level>
    <accelerator>auto</accelerator>
  <flash>
    <buffer-depth>auto</buffer-depth>
  </flash>
  <html>
    <remote-debugging-port>0</remote-debugging-port>
    <enable-gpu>true</enable-gpu>
  </html>
  <thumbnails>
    <generate-thumbnails>true</generate-thumbnails>
    <width>256</width>
    <height>144</height>
    <video-grid>2</video-grid>
    <scan-interval-millis>5000</scan-interval-millis>
    <generate-delay-millis>2000</generate-delay-millis>
    <video-mode>1080i5000</video-mode>
    <mipmap>true</mipmap>
  </thumbnails>
  <channel-grid>false</channel-grid>
  <channels>
    <channel>
        <video-mode>1080i5000</video-mode>
	    <channel-layout>16ch</channel-layout>
        <straight-alpha-output>false</straight-alpha-output>
	  <consumers>
             <decklink>
                <device>5</device>
                <embedded-audio>true</embedded-audio>
                <channel-layout>16ch</channel-layout>
                <latency>normal</latency>
                <keyer>default</keyer>
                <key-only>false</key-only>
                <buffer-depth>3</buffer-depth>
            </decklink>
        </consumers>		
	</channel>
	<channel>
        <video-mode>1080i5000</video-mode>
		<channel-layout>16ch</channel-layout>
        <straight-alpha-output>false</straight-alpha-output>
	  <consumers>
	           <decklink>
                <device>6</device>
                <embedded-audio>true</embedded-audio>
                <channel-layout>16ch</channel-layout>
                <latency>normal</latency>
                <keyer>default</keyer>
                <key-only>false</key-only>
                <buffer-depth>3</buffer-depth>
            </decklink>
        </consumers>		
	</channel>
	<channel>
        <video-mode>1080i5000</video-mode>
		<channel-layout>16ch</channel-layout>
        <straight-alpha-output>false</straight-alpha-output>
	  <consumers>
           <decklink>
                <device>7</device>
                <embedded-audio>true</embedded-audio>
                <channel-layout>16ch</channel-layout>
                <latency>normal</latency>
                <keyer>default</keyer>
                <key-only>false</key-only>
                <buffer-depth>3</buffer-depth>
            </decklink>
          </consumers>		
	</channel>
	<channel>
        <video-mode>1080i5000</video-mode>
		<channel-layout>16ch</channel-layout>
        <straight-alpha-output>false</straight-alpha-output>
	  <consumers>
          <decklink>
                <device>8</device>
                <embedded-audio>true</embedded-audio>
                <channel-layout>16ch</channel-layout>
                <latency>normal</latency>
                <keyer>default</keyer>
                <key-only>false</key-only>
                <buffer-depth>3</buffer-depth>
            </decklink>
         </consumers>		
	</channel>
</channels>
  <controllers>
    <tcp>
        <port>5250</port>
        <protocol>AMCP</protocol>
    </tcp>
	<tcp>
      <port>3250</port>
      <protocol>LOG</protocol>
    </tcp>
  </controllers>
  	<amcp>
        <media-server>
            <host>127.0.0.1</host>
            <port>8000</port>
        </media-server>
    </amcp>
	<osc>
		<default-port>6250</default-port>
		<predefined-clients>
			<predefined-client>
				<address>127.0.0.1</address>
				<port>6250</port>
			</predefined-client>
		</predefined-clients>
	</osc>
<audio>
  <channel-layouts>
	<channel-layout name="16ch"     type="16ch"        num-channels="16"/>	
	<channel-layout name="dubbed"   type="multi"      num-channels="16" channel-order="FL FR FL FR FL FR FL FR FL FR FL FR FL FR FL FR"/>	
  </channel-layouts>
 	<mix-configs>
		<mix-config from-type="multi"   to-types="16ch"  mix="FL = FL | FR = FR" />
	</mix-configs>
</audio>
</configuration>

Hi,

I haven’t tested this but you might need to put some channel order on your 16ch layout

	<channel-layout name="16ch"     type="16ch"        num-channels="16" channel-order="0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15"\>

and then in your mix config from multi to 16ch,
<mix-config from-type="multi" to-types="16ch" mix="FL = 0 | FR = 1 | FL = 2 | FR = 3 | FL = 4 | FR = 5 | FL = 6 | FR = 7 | FL = 8 | FR = 9 | FL = 10 | FR = 11 | FL = 12 | FR = 13 | FL = 14 | FR = 15" />

Not tested so sorry if that is a waste of time. I think if you added a channel-order of just FL FR to 16ch you would lose the ability to playout true 16ch content, so you will need only 2 channel content to be mapped to the 0…15 order. I hope that works for you and again sorry if it doesn’t.

Hi frozen,

Thanks for your suggestion.
Unfortunately it doesn’t work that way.

Ingo

Hello,

Thanks for the help. :grinning:
Thanks to vimlesh I could solve the issue by configuring as follows:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <paths>
    <media-path>D:/CasparCG/_media/</media-path>
    <log-path>D:/CasparCG/_log/</log-path>
    <data-path>D:/CasparCG/_data/</data-path>
    <template-path>D:/CasparCG/_templates/</template-path>
    <thumbnail-path>D:/CasparCG/_thumbnails/</thumbnail-path>
  </paths>
  <log-level>info</log-level>
    <accelerator>auto</accelerator>
  <flash>
    <buffer-depth>auto</buffer-depth>
  </flash>
  <html>
    <remote-debugging-port>0</remote-debugging-port>
    <enable-gpu>true</enable-gpu>
  </html>
  <thumbnails>
    <generate-thumbnails>true</generate-thumbnails>
    <width>256</width>
    <height>144</height>
    <video-grid>2</video-grid>
    <scan-interval-millis>5000</scan-interval-millis>
    <generate-delay-millis>2000</generate-delay-millis>
    <video-mode>1080i5000</video-mode>
    <mipmap>true</mipmap>
  </thumbnails>
  <channel-grid>false</channel-grid>
  <channels>
    <channel>
        <video-mode>1080i5000</video-mode>
	    <channel-layout>16audio</channel-layout>
        <straight-alpha-output>false</straight-alpha-output>
	  <consumers>
             <decklink>
                <device>5</device>
                <embedded-audio>true</embedded-audio>
                <channel-layout>16audio</channel-layout>
                <latency>normal</latency>
                <keyer>default</keyer>
                <key-only>false</key-only>
                <buffer-depth>3</buffer-depth>
            </decklink>
        </consumers>		
	</channel>
	<channel>
        <video-mode>1080i5000</video-mode>
		<channel-layout>16audio</channel-layout>
        <straight-alpha-output>false</straight-alpha-output>
	  <consumers>
	           <decklink>
                <device>6</device>
                <embedded-audio>true</embedded-audio>
                <channel-layout>16audio</channel-layout>
                <latency>normal</latency>
                <keyer>default</keyer>
                <key-only>false</key-only>
                <buffer-depth>3</buffer-depth>
            </decklink>
        </consumers>		
	</channel>
	<channel>
        <video-mode>1080i5000</video-mode>
		<channel-layout>16audio</channel-layout>
        <straight-alpha-output>false</straight-alpha-output>
	  <consumers>
           <decklink>
                <device>7</device>
                <embedded-audio>true</embedded-audio>
                <channel-layout>16audio</channel-layout>
                <latency>normal</latency>
                <keyer>default</keyer>
                <key-only>false</key-only>
                <buffer-depth>3</buffer-depth>
            </decklink>
          </consumers>		
	</channel>
	<channel>
        <video-mode>1080i5000</video-mode>
		<channel-layout>16audio</channel-layout>
        <straight-alpha-output>false</straight-alpha-output>
	  <consumers>
          <decklink>
                <device>8</device>
                <embedded-audio>true</embedded-audio>
                <channel-layout>16audio</channel-layout>
                <latency>normal</latency>
                <keyer>default</keyer>
                <key-only>false</key-only>
                <buffer-depth>3</buffer-depth>
            </decklink>
         </consumers>		
	</channel>
</channels>
  <controllers>
    <tcp>
        <port>5250</port>
        <protocol>AMCP</protocol>
    </tcp>
	<tcp>
      <port>3250</port>
      <protocol>LOG</protocol>
    </tcp>
  </controllers>
  	<amcp>
        <media-server>
            <host>127.0.0.1</host>
            <port>8000</port>
        </media-server>
    </amcp>
	<osc>
		<default-port>6250</default-port>
		<predefined-clients>
			<predefined-client>
				<address>127.0.0.1</address>
				<port>6250</port>
			</predefined-client>
		</predefined-clients>
	</osc>
<audio>
<channel-layouts>
<channel-layout name="dubbed"      type="multi"      num-channels="2"       channel-order="FL FR" />
<channel-layout name="16audio"     type="16ch"       num-channels="16"      channel-order="FL FR FL FR FL FR FL FR FL FR FL FR FL FR FL FR" />
</channel-layouts>

<mix-configs>
<mix-config from-type="multi"          to-types="16ch"  mix="FL=FL | FR=FR" />	
</mix-configs>

</audio>
</configuration>

Cheers
Ingo

1 Like