Multiple media paths - network share & local disk

I try to use 2 media paths.

  • local HDD
  • SMB share

I have mounted the SMB share as Z:\.
In volume Z i have folders “Movies”, “Tests” usw…

How can i tell CCG to load files from the SMB share?
LOAD 1-10 Movies/foo.mp4 does not work, 404 LOAD FAILED

Config file:

<?xml version="1.0" encoding="utf-8"?>

<configuration>
    <paths>
        <media-path>D:\CasparCG\media</media-path>
	<media-path>Z:\</media-path>
        <log-path disable="false">log/</log-path>
        <data-path>D:\CasparCG\data</data-path>
        <template-path>D:\CasparCG\template</template-path>
    </paths>
    <lock-clear-phrase>secret</lock-clear-phrase>
    <channels>
        <channel>
            <video-mode>720p5000</video-mode>
            <consumers>
                <screen />
                <system-audio />
            </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>
</configuration>

<!--
<log-level> info  [trace|debug|info|warning|error|fatal]</log-level>
<log-align-columns>true [true|false]</log-align-columns>
<template-hosts>
    <template-host>
        <video-mode />
        <filename />
        <width />
        <height />
    </template-host>
</template-hosts>
<flash>
    <enabled>false [true|false]</enabled>
    <buffer-depth>auto [auto|1..]</buffer-depth>
</flash>
<ffmpeg>
    <producer>
        <auto-deinterlace>interlaced [none|interlaced|all]</auto-deinterlace>
        <threads>4 [1..]</threads>
    </producer>
</ffmpeg>
<html>
    <remote-debugging-port>0 [0|1024-65535]</remote-debugging-port>
    <enable-gpu>false [true|false]</enable-gpu>
	<angle-backend>gl [|gl|d3d11|d3d9]</angle-backend>
    <cache-path>(CEF writes some caches next to the executable, which can fail depending on permissions. This changes it to use another path)</cache-path>
</html>
<system-audio>
    <producer>
        <default-device-name></default-device-name>
    </producer>
</system-audio>
<ndi>
    <auto-load>false [true|false]</auto-load>
</ndi>
<video-modes>
    <video-mode>
        <id>1024x768p60</id>
        <width>1024</width>
        <height>768</height>
        <time-scale>60000</time-scale>
        <duration>1000</duration>
        <cadence>800</cadence>
    </video-mode>
</video-modes>
<channels>
    <channel>
        <video-mode>PAL [PAL|NTSC|576p2500|720p2398|720p2400|720p2500|720p5000|720p2997|720p5994|720p3000|720p6000|1080p2398|1080p2400|1080i5000|1080i5994|1080i6000|1080p2500|1080p2997|1080p3000|1080p5000|1080p5994|1080p6000|1556p2398|1556p2400|1556p2500|dci1080p2398|dci1080p2400|dci1080p2500|2160p2398|2160p2400|2160p2500|2160p2997|2160p3000|2160p5000|2160p5994|2160p6000|dci2160p2398|dci2160p2400|dci2160p2500] </video-mode>
        <consumers>
            <decklink>
                <device>[1..]</device>
                <key-device>device + 1 [1..] (This is only used with the external_separate_device mode)</key-device>
                <embedded-audio>false [true|false]</embedded-audio>
                <latency>normal [normal|low|default]</latency>
                <keyer>external [external|external_separate_device|internal|default]</keyer>
                <key-only>false [true|false]</key-only>
                <buffer-depth>3 [1..]</buffer-depth>
                <video-mode>(Run the decklink at a different video-mode. Note: the framerate must match that of the channel)</video-mode>
                <subregion>
                    <src-x>0 (x offset into the channel)</src-x>
                    <src-y>0 (y offset into the channel)</src-y>
                    <dest-x>0 (x offset of the video onto the output)</dest-x>
                    <dest-y>0 (y offset of the video onto the output)</dest-y>
                    <width>0 (width of the region to copy. 0 means no-limit)</width>
                    <height>0 (height of the region to copy. 0 means no-limit)</height>
                </subregion>

                <wait-for-reference>auto [auto|enable|disable]</wait-for-reference>
                <wait-for-reference-duration>10 (seconds)</wait-for-reference-duration>

                <ports>
                    (Add secondary ports to be run in sync with the primary. This allows for splitting a wide channel across multiple decklinks, with sync across the outputs guaranteed by the driver on supported cards)
                    <port>
                        <device>[1..]</device>
                        <key-only>false [true|false]</key-only>
                        <video-mode>(Run the decklink at a different video-mode. Note: the framerate must match that of the channel)</video-mode>
                        <subregion>
                            <src-x>0 (x offset into the channel)</src-x>
                            <src-y>0 (y offset into the channel)</src-y>
                            <dest-x>0 (x offset of the video onto the output)</dest-x>
                            <dest-y>0 (y offset of the video onto the output)</dest-y>
                            <width>0 (width of the region to copy. 0 means no-limit)</width>
                            <height>0 (height of the region to copy. 0 means no-limit)</height>
                        </subregion>
                    </port>
                </ports>
            </decklink>
      	    <bluefish>
                <device>[1..]</device>
		            <sdi-stream>1[1..] </sdi-stream>
                <embedded-audio>false [true|false]</embedded-audio>
                <keyer>disabled [external|internal|disabled] (external only supported on channels 1 and 3, using 3 requires 4 out connectors) ( internal only available on devices with a hardware keyer) </keyer>
                <internal-keyer-audio-source> videooutputchannel [videooutputchannel|sdivideoinput] ( only valid when using internal keyer option) </internal-keyer-audio-source>
                <watchdog>2[0..] ( set to 0 to disable the HW watchdog functionality, otherwise this value indicates how many frames to wait after a crash, before enabling the bypass relay's on the card - only works on sdi-stream 1) </watchdog>
                <uhd-mode>0 [0|1|2|3] (0 = Disable BVC-Multi_Link,  1  = Auto ( ie. BVC-ML gets SQ, Native buffers get 2SI), 2 = Force 2SI output, 3 = Force SQ ie. Square Division output ) this setting only applies in UHD modes. </uhd-mode>
            </bluefish>
            <system-audio>
                <channel-layout>stereo [mono|stereo|matrix]</channel-layout>
                <latency>200 [0..]</latency>
            </system-audio>
            <screen>
                <device>1 [1..]</device>
                <aspect-ratio>default [default|4:3|16:9]</aspect-ratio>
                <stretch>fill [none|fill|uniform|uniform_to_fill]</stretch>
                <windowed>true [true|false]</windowed>
                <key-only>false [true|false]</key-only>
                <vsync>false [true|false]</vsync>
                <borderless>false [true|false]</borderless>
                <interactive>true [true|false]</interactive>
                <always-on-top>false [true|false]</always-on-top>
                <x>0</x>
                <y>0</y>
                <width>0 (0=not set)</width>
                <height>0 (0=not set)</height>
                <sbs-key>false [true|false]</sbs-key>
                <colour-space>RGB [RGB|datavideo-full|datavideo-limited] (Enables colour space convertion for DataVideo TC-100 / TC-200)</colour-space>
            </screen>
            <ndi>
                <name>[custom name]</name>
                <allow-fields>false [true|false]</allow-fields>
            </ndi>
            <ffmpeg>
                <path>[file|url]</path>
                <args>[most ffmpeg arguments related to filtering and output codecs]</args>
            </ffmpeg>
            <artnet>
                <universe>0</universe>

                <host>127.0.0.1</host>
                <port>6454</port>

                <refresh-rate>30</refresh-rate>

                <fixtures>
                    <fixture>
                        <type>RGBW</type>
                        <start-address>1</start-address>
                        <fixture-count>10</fixture-count>
                        <fixture-channels>6</fixture-channels>

                        <x>960</x>
                        <y>540</y>

                        <width>500</width>
                        <height>100</height>

                        <rotation>0</rotation>
                    </fixture>
                </fixtures>
            </artnet>
        </consumers>
        <producers>
            <producer id="0">AMB LOOP</producer>
            <producer id="10">DECKLINK DEVICE 2</producer>
        </producers>
    </channel>
</channels>
<osc>
  <default-port>6250</default-port>
  <disable-send-to-amcp-clients>false [true|false]</disable-send-to-amcp-clients>
  <predefined-clients>
    <predefined-client>
      <address>127.0.0.1</address>
      <port>5253</port>
    </predefined-client>
  </predefined-clients>
</osc>
-->

I need two media paths because i create a overlay.
The overlay video comes from the local disk.

You cannot have more than one media-path in your config. That violates XML rules.

You can do a symbolic link in your media folder, that maps the remote folder into it.

1 Like

You mean, i set in the config file, the media paths to a local folder, and in that folder link to my SMB share?


Like that?

With LOAD 1-10 Z:\xxx it works, but this feels like a hack.
Is this really the only/preferred way to do it?

In this case yes. Most Caspar users are not using more as one media folder, as this does not make sense for most of us. The idea behind it is, to abstract away the physical path and let Caspar only see the relative paths to the files (same also with templates). That helps to keep it simple, when you work with multiple server machines. The commands to play a certain template / media clip will be the same, regardless the machine used.

I have casparcg playing from a network share with nfs, and you could make your media folder default to Z:, but creating a mount point or symbolic link as mentioned above would be the only way to have two separate folders show up. Realize that media scanner could have issues if you feed it multiple files with the same name also as it isn’t really designed to deal with situations like that. If you set up a media asset management system, then you can have files automatically transcoded and moved to the playout folder like most casparcg users probably do manually.

For what do i need the scanner in the first place?
When i tell CCG: “in this folder are all files” (via config file) and then play/load files, i dont see a use case for the scanner.

Is this only necessary for the CCG Client? (Thumbnails, file list, etc)

The scanner is used to populate list of templates or media files in clients (not only the official client). If you always knows, how your files are named, you don’t need that. But if you want to present your users with a list of available assets you need the scanner. I have problems to imagine a use case, where you will not have some user interface to choose, what to play.

I have a backend/other software which allready knows every file on the Storage, which shares the same Storage as the CCG Server. So i just need to tell the CCG Server the path from the mount point what to load/play.

Is use the other sofware as “content management system” and utilities its API.
With a litle self coded proxy, they work seaming less without the scanner.