A framework solution to load and play movies or other live material inside Qlab using syphon.

qlab syphon

Qlab provides Syphon Server and Client. You can easily insert a Syphon footage with a camera cue. But if you want to mix a camera or video cue from Qlab with your syphon source you are in trouble. You could try to send your video cue to a syphon output, mix it or blend it with the other source and return it using syphon target (camera cue), but this is not a great solution and you will end up with strange effects.

Basically this framework will send the camera/video cue to a Quartz custom composition using the video effects tab and then mix it with the syphon source returning the image using the same channel.

The main goal of this framework is to be able to mix live images with other live or recorded sources. You can mix the image from a camera with a video using luma key or chroma key.

Qlab  3 uses Quartzcomposer as an image processor and not a video processor disabling the rendering of sprites, billboards, video importers and many other objects. This framework provides a workaround to this kind of limitations. Although i provide a solution to import a video, you can actually send graphic shapes from quartz composer via syphon, or a 3D graphics from Unity yo be blended with your cameras inside Qlab.

You can download all the files above (press more)

You need Qlab and Quartz Composer. Then you need to create a Qlab video/camera cue with a custom composition in the video effects tab. Drag the [Q-VideoClient.qtz] composition to the empty field (custom composition);

s2

Open [Q-VideoServer.qtz], this composition will act as a syphon server to load the desire movie. To interact with Q-VideoServer you can send OSC messages. This messages work like a remote controller, so you can say “load movie” or “start syphon”. To enable this “talk” you need to define a custom port in the OSC settings from “Workspace Settings” in Qlab (View). I found issues using the 53000 standard port from Qlab, so i now use the 60000 port without any problem.

s3

Now, it is possible to send OSC messages from inside Qlab to the Q-VideoServer.qtz composition.  To load a new movie you have to create an OSC cue using custom message with the address “/filme”  fowled by the path to the movie. If you use the “~” you are defining the shortcut to your user path, but you can use the full path reference. If you unzip my project into the desktop you can simply write this text “/filme ~/Desktop/Syphon-Movie/mar.m4v”

s4

Don´t forget to change the OSC Destination port to the new Localhost: 60000. But you can use any other port, but you must define it in the workspace settings and change it in your syphon server.
Finally you must turn on or enable the syphon server from Qlab. This is just a performance procedure, to prevent the machine of a possible overload. You should create an OSC cue with a custom message “/activo 1” to enable and “/activo 0” to disable syphon.

s5

Even if you create several cues with this quartz composition there will be only one syphon movie running, but you can easily change the movie using the load function.

We did not use this solution in our project “Peregrinação” because we had to use Qlab Syphon output. We also found some issues when using several video cameras cues in conduction with fade cues and syphon composition in video effects. Probably we have pushed to much 😉

—————————————————————————————————————
[Q-VideoServer.qtz]

Q-VideoServer is a Quartzcomposer patch responsible to load and play a video file to a syphon server.

s6

OSC Receiver object listens to the OSC port 60000 for messages with the fowling address “/filme” and “/activo”.  The address “/filme <path>” defines a string with the path and filename for the movie we want to load, i.e. “/filme ~/Desktop/Syphon-Movie/mar.m4v”. The “/activo” function enables or disables the syphon server, a boolean value, 0 to stop and 1 sot start. A movie importer object receives the movie location from the “/filme” message output and sends the result to the image input of the syphon object. To activate the Syphon Server to start sending the video to client applications the message we send a OSC message “/activo 1” enabling the syphon server.

—————————————————————————————————————
[Q-VideoClient.qtz]

Q-VideoClient is a custom syphon client composition to be loaded from inside Qlab.

s7

A Syphon Server List provides a structured list to constraint the input to our syphon server. The main ideia, is to stop any kind of interference from other syphon servers. The Syphon Client sends the movie to the first input of a Source Atop object mixing with the image sent from Qlab. The result composition is sent to Qlab via Image object.

The Qlab project above, as a video cue that uses the Q-VideoClient composition  (it does not work with a image cue). This composition enables the mixing with another video from an external source. Then you must send a OSC message to load your movie and another OSC message to start syphon. I use the OSC port 60000 because the port 53000 is already opened by Qlab.

[wpdm_file id=1]

total size 4.1 Mbytes
files inside the zip:

background.mp4
mar.m4v
Q-SyphonVideo.cues
Q-VideoClient.qtz
Q-VideoServer.qtz

please contact me if you have any comments or doubts: virtual.marionette@grifu.com