Cue next Video Clip

I am using the CasprCG client 2.3.0 to build a playlist of videos, server version 2.4.0. I can play the first video but I am looking to cue the next video up as the first one ends so I can manually play the next clip when needed. I’ve attempted to add “Trigger on next” option when adding the video but no luck. Any assistance would be greatly appreciated!

The CasparCG Client doesn’t handle playlists very well. Consider using SuperConductor (GitHub - SuperFlyTV/SuperConductor: A playout client for Windows/Linux/macOS that will let you control CasparCG Server, BMD ATEM, OBS Studio, vMix, OSC-compatible devices, HTTP (REST)-compatible devices, and more!).

The load and play options depend on your operational practices for clip playback. SuperConductor can easily make an ordered set of clips to play, each manually triggered to play. At the end of the current playing clip the first frame of the next video clip is loaded. This of course means that the vision mixer must cut away from the CasparCG output before the final frame of playout.

You may need the clips to be created with a couple of seconds of content beyond ideal cut away time, or you can tell Superconductor to hold the last frame of the video by manually adding time, say 2 seconds, to each clip duration. An option to include a pause at the end of clip has been added as a feature request, but not yet actioned.

Client V2.3.0 automatically holds the last frame of a video until the user manually requests a new clip load. There is a “Freeze on load” tick box in the clip inspector that allows you to press the F3 clip to load and pause the selected clip. The client configuration general tab allows the “Freeze on load” tick to be set as the default for all clip load requests.

If you are using a Stream Deck and BitFocus Companion as the control interface you can enable remote control of the client functions using OSC messages (enable Rundown menu item ‘Allow Remote Triggering’). One of the control messages is
/control/playandautostep which plays the current item and advances the selection to the next item in the rundown. You can then use the /control/load message to manually load the first frame of the next clip when the current clip ends.

I’m waiting on a StreamDeck Nano to come in to play with BitFocus Companion. Looks like I’ll also be adding in SuperConductor also. Thanks for the quick response @Nytamin and @andyw I’ll be giving both a try if I’m left alone long enough to try today!

I downloaded SuperConductor and I have it working sort of… I can assign Stream Deck buttons in SuperConducter but that gives me limited control but I want more!

I’ve downloaded and installed BitFocus. I added CasprCG to BitFocus and just attempted to add a play button but I can’t get it to play. In either SuperConductor or the CasprCG client. I did click the remote trigger option in the client. What am I missing?

In SuperConductor you can assign buttons on the Streamdeck to be the secondary or primary trigger for the selected clip. SuperConductor does not need Companion running to use the stream deck hardware.

By default, SuperConductor uses the same keyboard shortcut keys as the standard SVT client, so F1 is STOP, F2 is PLAY etc. Superconductor HOME tab, Application Triggers allows you to delete any curent allocation, such as F2, and then replace it with a button on stream deck. Equally you can add multiple triggers to the stop, play load commands enabling the keyboard or stream deck to play an item. You select the item in the SuperConductor rundown, then the trigger actions work with that item. You can also set a stream deck key to load and play a specific item in the rundown.

I have not yet found a method to move the item selection cursor using buttons on the stream deck.

You can get the Companion software and CasparCG driver to directly control load and play of clips. The CasparCG server library is available in a dropdown selector in the Companion GUI editor to help you find the clip to play.

However I mostly use stream deck to control an instance of the SVT client. This requires that you configure the client to enable OSC control. See the OSC tab in the client configuration. The default OSC control input port number is 3250. You can enable remote control of a single clip by ticking the remote enable box in the item inspector, and entering a name in the UID box. Let us use clip01 as an example name. In Companion you enable a generic OSC driver, setting the IP to the machine running the SVT client and the port to the same number as the client OSC control entry.

Select a key definition in companion, adding an OSC output to the press actions, selecting the Send Integer element from the listed OSC commands. Enter the OSC control address as /control/clip01/play and set the transmitted value to 1 (always integer 1). When you press the stream deck button the clip with UID clip01 loads and plays.

I mostly use the stream deck as a small keyboard that replaces the client PC keyboard. Create a rundown by builfding the media list, then enable that rundown to be remote controlled by ticking “Allow Remote Control” in the Client Rundown menu drop-down. A small red lightening flash is shown in the rundown tab.

Now you can send OSC messages such as /control/play or /control/stop. You can also use /control/up (move cursor to item above current active) and /control/down that allow you to step through the rundown items. There is also a very useful OSC command /control/playandautostep which plays the item, then selects the next item in the list.

The only slight limitation to this control mechanism is if someone makes another program the focused task on the client computer. The actions do not reach their intended destination. There is a special client widget called the Playout Command. I create a rundown that has several instances of the playout command tool. Each entry has a unique UID. The action of the Playout Command is selected from a drop down box in the inspector. So I have cmd01 set as a STOP command, cmd02 as a play command etc. I then send osc messages such as /control/cmd01/play and this issues a stop request on the item selected in the active rundown. This trigger always fires even when CasparCG client is not the focussed application.

I have a slightly more extensive example of using Stream Deck and Companion in my Introduction to CasparCG book available here on GitHub. The description starts on page 89. Please note the Companion setup process has slightly changed since I wrote the document, but the principles should be covered. Appendix B lists the available OSC commands for item and rundown control.

3 Likes

@andyw
Really very good documentation.
Very helpful in some points that I didn’t even know about.
If I’d had it earlier, I would have been spared a few grey hairs. :wink:

@GatorChomp
If I understood you correctly, you want to create a simple playlist where the clips are played seamlessly.

I had to build my own playout because we have special requirements here and unfortunately the clients don’t support it or only with effort.

My system is based on PHP/Mysql with a Web-GUI and controls CasparCG. It actually works.

The first clip is started with “PLAY” and plays immediately.
The next clip is then loaded into the background with “LOADBG … AUTO”. The AUTO indicates that the clip is played automatically immediately after the end of the current clip.

Now you have to be careful. The next clip can only be loaded again with LOADBG when the previous clip is just playing. Unfortunately, you can only load one clip in the background and not several like a queue.

At least, my experience has been that the first LOADBG is then overwritten. Unfortunately, I haven’t been able to find out whether there is a better method.
If anyone knows anything, that would be very helpful for me.

You also have to be careful with the timing so that the playout knows exactly when a clip starts and ends. Here you have to evaluate the milliseconds as well as the hour, minute, second, otherwise the whole thing drifts apart. It wasn’t easy to do this, but I’ve got it under control now.

Unfortunately, I haven’t found a way to use a CasparCG command to query which spot is currently running and when it really ends. If there is something, a tip would be helpful.

Here is a schematic of how I do it:
Playout starts

  1. PLAY
  2. LOADBG
  3. LOADBG <wait until LOADBG from Step2. Play and load next clip)
  4. LOADBG <wait until LOADBG from step 3. Play and load next clip)
  5. LOADBG <wait until LOADBG from step 4. Play and load next clip)

(…)

Perhaps it will help someone or inspire them if someone is planning something similar.

Regards

You should be able to use OSC to get the informations, when the loaded clip has started to play.

HI,

yes, that’s also my guess, that you can get more out of OSC. I think you can evaluate it using the frames.

The problem is that I haven’t found anything really well documented on how to integrate it into PHP. I know that there is a library from Cosmonova-RND, which I also use.

But unfortunately the part with the OSC is not so well documented
and still makes errors. I managed to see a datagram, but that’s not enough.

I don’t know much about object-oriented programming, more classical functional. I can handle classes and integrate them, but I don’t tinker with them much myself.

As I said, I’m still looking for a suitable tool so that I can somehow evaluate the OSC datagrams in a readable form with PHP.

If anyone has something that works in PHP, that would be very helpful.

Hey Nytamin thanks for the help! I’ve been playing more with SuperConductor and really like the simplicity of it. I was wondering how to bring live sources into SuperConductor?