Simple playlist management

Hello,

I’m looking for some suggestions on how to implement a simple playlist manager using CasparCG. The application should allow an user to select one or more clips, with one or more “cuts” in each, and then order CasparCG to play them sequentially. Something like: play clip A from 00:00:10:00 to 00:00:20:00, then clip B, then C from 00:01:00:00 to 00:02:30:00.

My current implementation looks something like this:

  • Play clip A (using PLAY, SEEK and LENGTH), load clip B in the background (using LOADBG and AUTO);
  • Detect clip B has started playing by looking at frames via OSC;
  • Once clip B has started, load clip C in the background;
  • Repeat indefinitely.

Looking at some other applications out there, I’ve also seen these two approaches:

  • Alternative 1: Play clip A, start a timer, and then stop clip A and start clip B once enough time has elapsed. Won’t this suffer from timing issues, though (as in, clip A plays for too long or its last frame remains in the layer until the next clip eventually starts)?
  • Alternative 2: Play clip A, load clip B in the background, and poll CasparCG constantly to detect B has started.

Are there any “best practices” or known solutions here? Any help would be appreciated.

Thanks!

That is the optimal way to do it. As the INFO command, that you can use to poll the clip, in “Alternative 2” will not made it trough version 2.2.