Mono sound out

Is it possible to get mono sound out of CasparCG?

the scenario is:
Stereo sound in SDI video into Blackmagic card.
Use track 1 only and send it on track 1 & 2 at the output of CasparCG (Blackmagic)

I tried this with a file and not with decklink input but i guess it will work in simmilar way. Just replace filename with decklink 1

We need to put audio config in casparcg.config file as bellow.

Server 2.07
Audio Config

<audio>
  <channel-layouts>
  <channel-layout>
<name>R_to_Both</name>
<type>xyz</type>
<num-channels>2</num-channels>
<channels>1 2</channels>
</channel-layout>

 <channel-layout>
<name>L_to_Both</name>
<type>xyz1</type>
<num-channels>2</num-channels>
<channels>1 2</channels>
</channel-layout>

 <channel-layout>
<name>Mix</name>
<type>xyz2</type>
<num-channels>2</num-channels>
<channels>1 2</channels>
</channel-layout>

 <channel-layout>
<name>Only_L</name>
<type>xyz3</type>
<num-channels>2</num-channels>
<channels>1 2</channels>
</channel-layout>

 <channel-layout>
<name>Only_R</name>
<type>xyz4</type>
<num-channels>2</num-channels>
<channels>1 2</channels>
</channel-layout>

 </channel-layouts>


<mix-configs>

<mix-config>
<from>xyz</from>
<to>2.0</to>
<mix>add</mix>
<mappings>
<mapping>2 L 1.0</mapping>
<mapping>2 R 1.0</mapping>
</mappings>
</mix-config>

<mix-config>
<from>xyz1</from>
<to>2.0</to>
<mix>add</mix>
<mappings>
<mapping>1 L 1.0</mapping>
<mapping>1 R 1.0</mapping>
</mappings>
</mix-config>

<mix-config>
<from>xyz2</from>
<to>2.0</to>
<mix>add</mix>
<mappings>
<mapping>1 L 0.7</mapping>
<mapping>2 R 0.7</mapping>
<mapping>1 R 0.7</mapping>
<mapping>2 L 0.7</mapping>
</mappings>
</mix-config>

<mix-config>
<from>xyz3</from>
<to>2.0</to>
<mix>add</mix>
<mappings>
<mapping>1 L 1.0</mapping>
<mapping>1 R 0.0</mapping>
</mappings>
</mix-config>

<mix-config>
<from>xyz4</from>
<to>2.0</to>
<mix>add</mix>
<mappings>
<mapping>2 L 0.0</mapping>
<mapping>2 R 1.0</mapping>
</mappings>
</mix-config>


</mix-configs>
</audio>

play 1-1 “filename” channel_layout L_to_Both

Server 2.1
Audio Config

<audio>
<channel-layouts>

<channel-layout name="R_to_Both"      type="xyz"      num-channels="2" channel-order="FL FR" />
<channel-layout name="L_to_Both"      type="xyz1"      num-channels="2" channel-order="FL FR" />
<channel-layout name="Mix"      type="xyz2"      num-channels="2" channel-order="FL FR" />
<channel-layout name="Only_L"      type="xyz3"      num-channels="2" channel-order="FL FR" />
<channel-layout name="Only_R"      type="xyz4"      num-channels="2" channel-order="FL FR" />
</channel-layouts>

<mix-configs>
<mix-config from-type="xyz"          to-types="stereo"  mix="FL=FR | FR=FR" />
<mix-config from-type="xyz1"         to-types="stereo"  mix="FL=FL | FR=FL" />	
<mix-config from-type="xyz2"         to-types="stereo"  mix="FL=0.7FL+0.7FR | FR=0.7FL+0.7FR" />
<mix-config from-type="xyz3"         to-types="stereo"  mix="FL=FL | FR=0FR" />	
<mix-config from-type="xyz4"         to-types="stereo"  mix="FL=0FL | FR=FR" />		
</mix-configs>

</audio>

play 1-1 “filename” channel_layout L_to_Both

Server 2.3
Audio Config- no audio config required.

play 1-1 “filename” af pan=stereo|c0=c0|c1=c0

Thanks!
Do you know if it’s the same when I run CasparCG Server v2.3.0

Server 2.3
Audio Config- no audio config required.

play 1-1 “filename” af pan=stereo|c0=c0|c1=c0

Thanks for being a big help.

This works:
PLAY 1-10 DECKLINK DEVICE 1 FORMAT 1080i5000 af pan=stereo|c0=c0|c1=c0

Do you know if it is possible to do it on the fly, if I discover it should be mono after it is started?
have tried with: MIXER 1-10 af pan=stereo|c0=c0|c1=c0
as you can do with e.g. volume adjustment. But it does not work

The only way I found out is to STOP 1-10 and PLAY it again with full command.
Thanks again for your help

Hi vimlesh,

I have a similar problem. Maybe you know how to help.
I’m running server 2.1.11 NRK fork. The decklink output ist configured “16ch”.
Is it possible to play a stereo clip on that channel and to dub the stereo to all 16 audio channels?
I hoped

<channel-layout name="dubbed"      type="xyz"      num-channels="16" channel-order="FL FR FL FR FL FR FL FR FL FR FL FR FL FR FL FR FL FR" />

together with

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

will work, but it doesn’t.
Any suggestions?

Thanks.
Ingo

P.S.: I’m certainly calling CHANNEL_LAYOUT “dubbed” from the client.

I got a config file which works by giving command like

play 1-1 go1080p25

https://drive.google.com/file/d/1QinFIKusDRJtkyAB4dcEbCO5EsWSjwaB/view?usp=sharing

Hi vimlesh,

Thank you for sharing.
Unfortunately that doesn’t work for me. I got a server error message when I try to send
play 1-1 go1080p25

Maybe I didn’t explain it the right way. I opened another topic meanwhile with more information about my configuration and problem.
Maybe you might like to have a look at it:

Thanks.
Ingo

Pl give your pc on remote to me in private message. I will setup.

Hi vimlesh,
That’s very kind. But I’m sorry.
My company does not allow any remote access.
Can’t do that.

I only can give you my config for modifications:

<?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>

Cheers

Ingo

This will give error only when you dont have file go1080p25.
My given config file will surely work . I have tested it on my pc.

OK.
I’m getting a step closer. I used your config and now get all channels when I check via OSC server but don’t get any real output at the blackmagic output.
It could be that there is a flaw in my client programming. I’m using mixer commands with my client. Maybe this “undermines” the settings of the config file. I’ll have to check this next.
Thanks very much so far. :grinning:

Ingo

Hi vimlesh,

It works! Thanks very much!
The problem still lied in the config. I set the channel_layout of the output to “16ch”. That didn’t work. But setting them to “dubbed” as well works fine.
You were a really great help! :grinning:

Here my working config for anyone who’s interested:

<?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>
1 Like

hi vimlesh, I’m running 2.3.2 server and plycast client, how can I make mono out on this?