QLab Black Magic Video Routing

As part of my job, I help run a small community cinema every now and again. Being a small community cinema, we don’t have all the fancy show control that the big guys do- But that’s not to say we don’t have enough toys to get the job done. Our system has, at it’s heart, a Black Magic Design 20×20 Smart Video Hub. If you’ve never worked with it before, it’s great, easily one of my favorite pieces of gear in any video workflow. It’s core feature is connecting any input to any number of outputs. This is really important for us, as our movies come on a variety of formats, Blu-Rays from distributers, a black box media server/player, Netflix (did you know they did professional movie distribution?), Etc. So for our space, we use the hub to matrix all those inputs to our main projector, front desk feeds, and our audio processing. But all this routing combined with the pre-show features (supplied by an iMac with QLab) makes for a very stressful 30 seconds as almost 6 inputs need to be routed simultaneously, which got me thinking…

“Can I change Videohub routing with QLab?”

Some Guy

After a few minutes of googling, I found no solutions to this problem. So I plowed on to make my own. A quick look into the manual shows that the Videohub will take commands through a TCP interface. That’s great! I’ll just make a network cue in QLab, and….

Well shit.

Ok, ok, well maybe I can’t do it through a network cue, but QLab supports AppleScript right? As I found later on, OSX actually has a command-line utility to send TCP packets. So I found an AppleScript that just sends a string to the command line. This ended up being my final script:

AppleScript
tell application id "com.figure53.QLab.4" to tell front workspace
     do shell script "echo \"VIDEO OUTPUT ROUTING:
     10 10
     14 10
     18 10
     19 10
     
     \" | nc -w 0 <VIDEOHUB_IP_HERE> 9990"
end tell

The API for the Videohub is pretty straightforward, the command, in all caps, followed by a colon (In this case it’s “VIDEO OUTPUT ROUTING:”). A newline denotes the end of the command. Then the arguments, in this command, it is:

Plaintext
OUTPUT-1 INPUT-1

That minus one is a programmer thing, it really means the number of the output, and the number of the input. But as if you’re counting from zero, instead of one. So to route input 5 to output 8 the AppleScript would look like:

AppleScript
tell application id "com.figure53.QLab.4" to tell front workspace
     do shell script "echo \"VIDEO OUTPUT ROUTING:
     7 4

     \" | nc -w 0 <VIDEOHUB_IP_HERE> 9990"
end tell

Boom, Videohub routing in QLab.

Applications

One particularly nice application is to use this in conjunction with video coming from QLab. Say for example you’re operating a broadcast with sponsor spots in the middle. You could make a QLab cart with a group to fire a command to switch the routing, play the spot, then switch back to the program.

Conclusion

This is definitely going to be an ongoing series with show automation. It’s a topic I’ve been interested in for years, and I would love to tackle some more projects. Feel free to leave a comment with another automation idea/dream and I’ll see if I can get something working.

Happy Automating!

Pup Atlas, Chief Good Boy

Leave a Reply

Your email address will not be published. Required fields are marked *