Automatic routing at config file

Just a quick question. Right now I have a main channel which I control using RedCast OnTime and a second channel that I use as a route of the first channel. I’ve done this mostly as a workaround for streaming using OBS because of this problem I had with the current implementation of NDI.

Now, whenever I need to restart the server, main channel works as soon as I hit play on RedCast, but for the second channel I need to:

telnet localhost 5250
PLAY 2-10 route://1
bye

… or open a Client and use the Route command.

Is there any way to make routing automatic in the config file? As far as I can tell, checking INFO shows up a channel-consumer in channel 1 and a channel-producer in channel 2, a thing I didn’t know happened during this process.

PS: I telnet to the server because I’m using NRK’s Caspar Launcher, so no console is exposed.

NRK CasparCG fork has this functionality, see config file for documentation.

1 Like

Tested and working. To clarify, it should be used like this:

In caspar.config, in the channels section:

  <channels>
    <!-- Channel 1 - Source -->
    <channel>
      <!-- Set your main channel as usual -->
      <video-mode>NTSC</video-mode>
      <channel-layout>stereo</channel-layout>
      <consumers>
        <screen>
          <device>1</device>
          <windowed>true</windowed>
        </screen>
        <system-audio></system-audio>
      </consumers>
      <!-- This is an example only, producer is not mandatory. -->
      <producers>
        <!--
          producer will take any parameter accepted for the PLAY command.
          These can be stacked in layers as usual by adding as much producer
          as required.

          The following line is equivalent to "PLAY 1-10 AMB LOOP" in AMCP.
        -->
        <producer id="10">AMB LOOP</producer>
      </producers>
    </channel>

    <!-- Channel 2 - Replica -->
    <channel>
      <!--
        IMPORTANT:
        Remember that any routed channel MUST have the same frame size and rate
        as the source channel.
      -->
      <video-mode>NTSC</video-mode>
      <channel-layout>stereo</channel-layout>
      <consumers>
        <screen>
          <device>1</device>
          <windowed>true</windowed>
        </screen>
        <system-audio></system-audio>
      </consumers>
      <producers>
        <!-- The following line is equivalent to "PLAY 2-5 route://1" in AMCP. -->
        <producer id="5">route://1</producer>
      </producers>
    </channel>
  </channels>

And that should do the trick. Thanks @mint for the hint.