Failling to start the blackmagic output

i have two new server builds.
CasparCG will run on these builds fine with a screen consumer.
when i add the decklink consumer it will not start.

here is the log. there are two errors i have not seen

[fatal] Failed to setup LOG controller on port 3250. It is likely already in use

[error] Exception: C:\Program Files (x86)\Jenkins\workspace\casparcg-server-dep\master\src\shell\server.cpp(307): Throw in function class caspar::spl::shared_ptr<class caspar::IO::protocol_strategy_factory > __cdecl caspar::server::impl::create_protocol(const class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > &,const class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > &) const

[2021-09-15 10:01:54.735] [fatal]    Please check the configuration file (casparcg.config) for errors.
[2021-09-15 10:02:54.705] [info]    ############################################################################
[2021-09-15 10:02:54.705] [info]    CasparCG Server is distributed by the Swedish Broadcasting Corporation (SVT)
[2021-09-15 10:02:54.705] [info]    under the GNU General Public License GPLv3 or higher.
[2021-09-15 10:02:54.705] [info]    Please see LICENSE.TXT for details.
[2021-09-15 10:02:54.706] [info]    http://www.casparcg.com/
[2021-09-15 10:02:54.706] [info]    ############################################################################
[2021-09-15 10:02:54.706] [info]    Starting CasparCG Video and Graphics Playout Server 2.3.2 4de6d18f Dev
[2021-09-15 10:02:55.021] [info]    Initializing OpenGL Device.
[2021-09-15 10:02:55.025] [info]    Initialized OpenGL 4.5.0 NVIDIA 471.96 NVIDIA Corporation
[2021-09-15 10:02:55.025] [info]    Initialized image module.
[2021-09-15 10:02:55.026] [info]    Initialized ffmpeg module.
[2021-09-15 10:02:55.026] [info]    Initialized oal module.
[2021-09-15 10:02:55.026] [info]    Initialized decklink module.
[2021-09-15 10:02:55.026] [info]    Initialized screen module.
[2021-09-15 10:02:55.026] [info]    Initialized newtek module.
[2021-09-15 10:02:55.268] [info]    Initialized html module.
[2021-09-15 10:02:55.268] [info]    Flash support is disabled
[2021-09-15 10:02:55.268] [info]    Initialized flash module.
[2021-09-15 10:02:55.269] [info]    Initialized bluefish module.
[2021-09-15 10:02:55.270] [info]    "C:/CasperCG\Server\casparcg.config":
[2021-09-15 10:02:55.270] [info]    -----------------------------------------
[2021-09-15 10:02:55.270] [info]    <?xml version="1.0" encoding="utf-8"?>
[2021-09-15 10:02:55.270] [info]    <configuration>
[2021-09-15 10:02:55.270] [info]       <paths>
[2021-09-15 10:02:55.270] [info]          <media-path>D:/media</media-path>
[2021-09-15 10:02:55.270] [info]          <log-path>D:/log/</log-path>
[2021-09-15 10:02:55.270] [info]          <data-path>data/</data-path>
[2021-09-15 10:02:55.270] [info]          <template-path>D:/Templates/</template-path>
[2021-09-15 10:02:55.270] [info]          <thumbnail-path>thumbnail/</thumbnail-path>
[2021-09-15 10:02:55.270] [info]          <font-path>font/</font-path>
[2021-09-15 10:02:55.270] [info]       </paths>
[2021-09-15 10:02:55.270] [info]       <mixer>
[2021-09-15 10:02:55.270] [info]          <blend-modes>true</blend-modes>
[2021-09-15 10:02:55.270] [info]          <straight-alpha>true</straight-alpha>
[2021-09-15 10:02:55.270] [info]       </mixer>
[2021-09-15 10:02:55.270] [info]       <lock-clear-phrase>secret</lock-clear-phrase>
[2021-09-15 10:02:55.270] [info]       <channels>
[2021-09-15 10:02:55.270] [info]          <channel>
[2021-09-15 10:02:55.270] [info]             <video-mode>1080i5994</video-mode>
[2021-09-15 10:02:55.270] [info]             <channel-layout>stereo</channel-layout>
[2021-09-15 10:02:55.270] [info]             <straight-alpha-output>true</straight-alpha-output>
[2021-09-15 10:02:55.270] [info]             <consumers>
[2021-09-15 10:02:55.270] [info]                <decklink>
[2021-09-15 10:02:55.270] [info]                   <device>1</device>
[2021-09-15 10:02:55.270] [info]                   <embedded-audio>True</embedded-audio>
[2021-09-15 10:02:55.270] [info]                   <channel-layout>stereo</channel-layout>
[2021-09-15 10:02:55.270] [info]                   <latency>normal</latency>
[2021-09-15 10:02:55.270] [info]                   <keyer>external</keyer>
[2021-09-15 10:02:55.270] [info]                   <key-only>false</key-only>
[2021-09-15 10:02:55.270] [info]                   <buffer-depth>3</buffer-depth>
[2021-09-15 10:02:55.270] [info]                </decklink>
[2021-09-15 10:02:55.270] [info]             </consumers>
[2021-09-15 10:02:55.270] [info]          </channel>
[2021-09-15 10:02:55.270] [info]       </channels>
[2021-09-15 10:02:55.270] [info]       <controllers>
[2021-09-15 10:02:55.270] [info]          <tcp>
[2021-09-15 10:02:55.270] [info]             <port>5250</port>
[2021-09-15 10:02:55.270] [info]             <protocol>AMCP</protocol>
[2021-09-15 10:02:55.270] [info]          </tcp>
[2021-09-15 10:02:55.270] [info]          <tcp>
[2021-09-15 10:02:55.270] [info]             <port>3250</port>
[2021-09-15 10:02:55.270] [info]             <protocol>LOG</protocol>
[2021-09-15 10:02:55.270] [info]          </tcp>
[2021-09-15 10:02:55.270] [info]       </controllers>
[2021-09-15 10:02:55.270] [info]    </configuration>
[2021-09-15 10:02:55.270] [info]    -----------------------------------------
[2021-09-15 10:02:55.273] [info]    Initialized OpenGL Accelerated GPU Image Mixer for channel 1
[2021-09-15 10:02:55.273] [info]    video_channel[1|1080i5994] Successfully Initialized.
[2021-09-15 10:02:55.287] [info]    DeckLink Quad 2 [1-1|1080i5994] Disabled low-latency mode.
[2021-09-15 10:02:55.287] [info]    DeckLink Quad 2 [1-1|1080i5994] Enabled external keyer.
[2021-09-15 10:02:55.290] [info]    DeckLink Quad 2 [1-1|1080i5994] Initialized.
[2021-09-15 10:02:55.290] [info]    Initialized channels.
[2021-09-15 10:02:55.290] [fatal]   Failed to setup LOG controller on port 3250. It is likely already in use
[2021-09-15 10:02:55.291] [info]    video_channel[1|1080i5994] Uninitializing.
[2021-09-15 10:02:55.291] [info]    [asio] Shutting down global io_service.
[2021-09-15 10:02:55.291] [info]    [asio] Global io_service uninitialized.
[2021-09-15 10:02:55.345] [info]    DeckLink Quad 2 [1-1|1080i5994] Reference signal: not detected.
[2021-09-15 10:02:55.347] [info]    DeckLink Quad 2 [1-1|1080i5994] Uninitialized.
[2021-09-15 10:02:55.365] [error]   Exception: C:\Program Files (x86)\Jenkins\workspace\casparcg-server-dep\master\src\shell\server.cpp(307): Throw in function class caspar::spl::shared_ptr<class caspar::IO::protocol_strategy_factory<char> > __cdecl caspar::server::impl::create_protocol(const class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > &,const class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > &) const
[2021-09-15 10:02:55.365] [error]   Dynamic exception type: class boost::exception_detail::clone_impl<struct caspar::user_error>
[2021-09-15 10:02:55.365] [error]   [struct caspar::tag_msg_info * __ptr64] = Invalid protocol: LOG
[2021-09-15 10:02:55.365] [error]   [struct caspar::tag_stacktrace_info * __ptr64] =  0# 0x00007FF63C65A37E in casparcg
[2021-09-15 10:02:55.365] [error]    1# 0x00007FF63C689690 in casparcg
[2021-09-15 10:02:55.365] [error]    2# 0x00007FF63C680B79 in casparcg
[2021-09-15 10:02:55.365] [error]    3# 0x00007FF63C687DAD in casparcg
[2021-09-15 10:02:55.365] [error]    4# 0x00007FF63C68983B in casparcg
[2021-09-15 10:02:55.365] [error]    5# 0x00007FF63C65D85D in casparcg
[2021-09-15 10:02:55.365] [error]    6# 0x00007FF63C66111D in casparcg
[2021-09-15 10:02:55.365] [error]    7# 0x00007FF63CA96A88 in casparcg
[2021-09-15 10:02:55.365] [error]    8# BaseThreadInitThunk in KERNEL32
[2021-09-15 10:02:55.365] [error]    9# RtlUserThreadStart in ntdll
[2021-09-15 10:02:55.365] [error]   
[2021-09-15 10:02:55.365] [error]   
[2021-09-15 10:02:55.365] [error]    0# 0x00007FF63C65A37E in casparcg
[2021-09-15 10:02:55.365] [error]    1# 0x00007FF63C659CAF in casparcg
[2021-09-15 10:02:55.365] [error]    2# 0x00007FF63CB404BA in casparcg
[2021-09-15 10:02:55.365] [error]    3# _C_specific_handler in VCRUNTIME140
[2021-09-15 10:02:55.365] [error]    4# _TypeMatch in VCRUNTIME140
[2021-09-15 10:02:55.365] [error]    5# RtlCaptureContext2 in ntdll
[2021-09-15 10:02:55.365] [error]    6# 0x00007FF63C66111D in casparcg
[2021-09-15 10:02:55.365] [error]    7# 0x00007FF63CA96A88 in casparcg
[2021-09-15 10:02:55.365] [error]    8# BaseThreadInitThunk in KERNEL32
[2021-09-15 10:02:55.365] [error]    9# RtlUserThreadStart in ntdll
[2021-09-15 10:02:55.365] [error]   
[2021-09-15 10:02:55.436] [fatal]    Please check the configuration file (casparcg.config) for errors.

This may not fix your crash problem, but your casparcg.config is not optimal. The log entry line “Starting CasparCG Video and Graphics” shows the server is version 2.3.3_LTS (I know is says 2.3.2 but …) and TCP logs (a user of port 3250) are not supported in this version. You also have some paths that are not required and you are missing the pointer to the media scanner task needed by this server version.

The default casparcg.config for every release of server is obviously available in the server directory when a new install is done, or you can obtain a copy direct from teh GitHub distribution - for example at https://github.com/CasparCG/server/blob/master/src/shell/casparcg.config for server version 2.3.3.

I have merged this clean copy with your paths (thumbnail and font paths are not needed) and decklink definition. See following block.

<?xml version="1.0" encoding="utf-8"?>
<configuration>
    <paths>
        <media-path>D:/media/</media-path>
        <log-path>D:/log/</log-path>
        <data-path>data/</data-path>
        <template-path>D:/Templates/</template-path>
    </paths>
    <lock-clear-phrase>secret</lock-clear-phrase>
    <channels>
        <channel>
            <video-mode>1080i5994</video-mode>
            <channel-layout>stereo</channel-layout>
            <straight-alpha-output>true</straight-alpha-output>
            <consumers>
               <decklink>
                  <device>1</device>
                  <embedded-audio>true</embedded-audio>
                  <channel-layout>stereo</channel-layout>
                  <latency>normal</latency>
                  <keyer>external</keyer>
                  <key-only>false</key-only>
                  <buffer-depth>3</buffer-depth>
               </decklink>
            </consumers>
        </channel>
    </channels>
    <controllers>
        <tcp>
            <port>5250</port>
            <protocol>AMCP</protocol>
        </tcp>
    </controllers>
    <amcp>
        <media-server>
            <host>localhost</host>
            <port>8000</port>
        </media-server>
    </amcp>
    <osc>
       <default-port>6250</default-port>
       <disable-send-to-amcp-clients>false</disable-send-to-amcp-clients>
       <predefined-clients>
          <predefined-client>
             <address>127.0.0.1</address>
             <port>5253</port>
          </predefined-client>
       </predefined-clients>
     </osc>
</configuration>

The error message reports issues with port 3250. Did you have client 2.2 running when the server ran up? Client 2.2 uses port 3250 as the default OSC control port. You can ask a PC to report the ip addresses and ports in use via the netstat command line tool.

Type CMD in the Windows taskbar search, and choose “Run as administrator” from the list of choices. Then enter netstat -ao and over a few seconds the computer will list the open tcp links and ports, giving the PID of the process owning the port. If you can see port 3250 in use when no CasparCG server or clients are running you can find the name of the task using the port by running Task Manager, selecting the Details tab, and looking for the PID value in the list. A click on the PID colum label puts the display into ascending order.

1 Like