Syphon for Linux - A Missing Link

Image by macrovector - www.freepik.com

Often, it’s only when something stops working that you are reminded how much you use it and how important it is. Syphon - the open-source frame-sharing system for MacOS* is one of those things for me.

*There is a similar frame sharing framework available on Windows called Spout / Spout2.

In my case, Syphon has never not worked - it’s so solid - but as I slowly work towards trying to use Linux more and more, I’m realising that not having a Syphon alternative for Linux is not only holding me back, but also likely hampering the adoption of Linux by creative coders and video artists.

Syphon’s website states that:

Syphon provides an ecosystem for sharing imagery between applications and new media development environments.

In so many cases the word ‘ecosystem’ is misused but in the case of Syphon, it feels right. By incorporating support for Syphon (using Syphon’s SDK), an application can share frames with any other Syphon compatible application. Just look at the number of video applications make use of Syphon
apps-that-use-syphon.png

The above software is a mix of both end-user applications with GUIs like QLab, and creative coding frameworks and languages like openFrameworks, Processing, Cinder and visual programming apps like Max / Jitter and Pure Data.

Another key line from Syphon’s website is

You can mix these tools and more to find unique solutions to your creative problems.

I feel like this is what has helped live video artists and creative coders flourish on the Mac platform in recent years. It enables artists to assemble complex and specific video pipelines and workflows that can’t - and arguably shouldn’t - be possible with a single application. Creative programmers can focus their time on what makes their work unique and then share it into playback, mapping or effects software with Syphon. Software companies can focus on what they do best and what their users want, while knowing their users can leverage other applications up / downstream of theirs in a way that benefits everyone… an ecosystem.

As an interesting aside, I recently learned that QLab (3, not sure about 4) uses Syphon internally as part of their rendering pipeline. I wonder if other Mac-based media server software uses Syphon in a similar way? My guess is that VDMX might, as it’s the only other significant Mac-only live video server. They also sponsor Syphon, which is great.

An Example #

If you haven’t used Syphon, an example should give you an idea of how useful it is.

Say you are using QLab for your video playback because you like how suited it is to stage productions. However, your current project requires a lot of projection mapping and would benefit from a dedicated mapping tool. Thanks to Syphon, you can use something like Madmapper and simply ‘pipe’ the video output from QLab into Madmapper and do lots of complex mapping there. There’s a detailed guide to doing just this in QLab’s ‘cookbook’. I have another post in the works that details another great use of Syphon to make a video camera feed available to more than one application simultaneously.

Which came first #

The first public beta of Syphon was released in November 2010. While live video servers have been around since before then, they were pretty basic and certainly couldn’t share frames through the GPU. e.g. QLab 2, released in 2009 introduced support for video cues. The massive growth in such applications on Mac and their interoperability is surely in-part down to Syphon.

So while video art and creative coding projects can and will continue to be made with Linux, I think a Syphon-like service for Linux could be a real catalyst for people to develop applications and in turn entice more artists and designers to adopt Linux for their work.

Is there really no option for Linux? #

The closest I have found is VirtualVideo that uses v4l2loopback - a kernel module that allows you to create “virtual video devices that allow applications to essentially share video. But as Syphon co-creator Tom Butterworth (aka Bangnoise) explains here:

Syphon shares a texture on the GPU between processes. I’m not familiar with v4loop, but I’m guessing it shares regular memory, which is never going to come anywhere near the performance of a shared GPU resource. Yes, it is technically possible to get an image out of one process and into another, no, it isn’t the same as Syphon (or Spout).

I’ve used CPU based video sharing before and the difference between them and Syphon is night and day - also, Syphon supports sharing video with an alpha channel.

Also in the same topic in the Syphon forum is this from other Syphon creator Anton Marini (aka Vade):

Linux requires a collaborative effort between the kernel developers and the hardware /GPU driver teams, and an agreed upon API to access GPU memory across process boundaries.

Apple was able to do that via IOSurface for us. I believe that it required specific collaboration with Nvidia, intel, ATI, Imgtec, and other GPU vendors in Apples ecosystem to ensure it works.

I don’t believe linux/the community has this capability, or a need / desire for it.

If anyone knows about this is, it would be the incredibly talented and prolific artists / developers bangnoise and vade. But that was 2016, and lots has happened with Linux since then like in terms of big strides in GPU support, gaming and viable MacOS replacement contenders like Pop! OS, Elementary OS and Ubuntu Studio. I’d really like to think that between these developments and the trends Apple are continuing in terms of the sweeping changes to API support and pricing, that maybe the time is right to revisit this and get a conversation going.

Teeny tiny survey #

This is a new blog and I get only a handful of readers, but I thought I’d make a tiny (2 question) survey in case anyone has an overwhelming urge to express their dream of a Syphon equivalent for Linux. That and it’d be nice to know I’m not alone in this dream!

Cover image created by macrovector - www.freepik.com

 
13
Kudos
 
13
Kudos

Now read this

Making Pandemic-proof Theatre

This post is about the video processing and distribution side of a recent live-streamed stage production To Be A Machine, and its new German-language Austrian version Die Maschine in Mir. In a future post, I’ll go into more detail about... Continue →