Free time hacking

So in my spare tme, I have been hacking on a couple of new projects. The first is a web based video switch controller for the mosque. We have an Autopatch 16 input 48 output video matrix switch, and the APControl software that comes with it just does not suit our workflow at all with macros being tedious to setup and figure out which to run due to the complexities of our programmes. It is also limited to running on one computer. So about 9 months ago I started on a web based replacement called Zap but development had stalled. The idea was that there would be 2 views. One was a matrix view which let you see status and switch manually small changes. The other was a view with inputs and zones where you select one input and multiple zones (each zone consists of a set of outputs). I chose Django to make the administration of the data corresponding to the inputs, outputs and zones easy and for an easy data model to expose the initial views to the web. Orbited was used so there is dynamic feedback from any changes on the videoswitch to the UI (very cool to see on the matrix view, instantaneously changes other people have made either through zap, the original APControl or even from the lcd and physical buttons on the switch). I feed those changes and accept change requests over STOMP to/from the web pages from/to a daemon using twisted’s serialport handling. This Ramadhan, I set myself a deadline of the 15th Ramadhan which is today to get it in a working state so it could be deployed at the mosque. Thankfully, I had it ready and working last weekend and deployed it on Monday. All the other users now seem used to it and I am just working on little tweaks here and there.

The other project I have been working on is for a charity TV station who approached me to see if I knew of any open source playout server software. I didn’t but the playout server concept, we have in Flumotion as a playlist producer. So I ripped out the playlist producer code from Flumotion and made it render the graphics on screen and the sound through the soundcard. Of course this is not enough, the TV station want an overlayed logo. Initially I thought about using videomixer from GStreamer but on SD PAL, it is really CPU intensive. Then I thought, clutter would do this really easily. So I went on the clutter irc channel and asked for a simple example in pyclutter for playing a video with a custom gstreamer pipeline and overlaying an image on top. To my delight, someone wrote one on the spot and pastebin’d it for me. I integrated it all, tested it and kept Emanuele Bassi awake helping me by creating a jhbuild for clutter. Fedora 11 has only clutter 0.8.x which meant that it would not do the hardware colorspace conversion and also has an open bug with pyclutter segfaulting on “import clutter” on x86_64. I showed a proof of concept on a meeting on Friday evening and it worked nicely so Clutter/GStreamer/Gnonlin may well be powering a TV channel’s broadcast pretty soon. Thank you to the Clutter guys who helped me so much this week! The code for this project, I have pushed to github here: http://github.com/zaheerm/zplayout/tree/master. So the idea is that the output of the computer will be fed as SDI (either with an SDI output gfx card or through a DVI to SDI converter) and uplinked to the provider who would then put it in their hardware MPEG2 encoder and transport stream muxer and out onto the satellite itself. What the code now does, is watch a directory for playlist files which have entries saying something like file A is to be played at time x starting from y seconds into the file and for a duration of z seconds. The code then adds this into the GNonlin compositions and at the expected time it would start playing back. Clutter is doing the overlaying of the logo. In the future, playlist items would include live feeds from their studio through firewire or SDI input into the machine, live relay from DVB-S capturing a video feed and sending it out, and live titling, tickers etc. that could be done easily through Clutter I think. Pretty exciting stuff, I think. So thanks to the rest of the GStreamer and GNonlin guys for making this even possible, Flumotion for having a ready codebase to start from, the Clutter guys for having such an easy to code with platform for cool 2D stuff with video support and all their patient and great support for someone who has only listened to talks about Clutter at Guadec/GCDS and never got round to playing with it!

4 Responses to “Free time hacking”

  1. Emmanuele Bassi Says:

    glad to hear that it all worked out fine :-)

  2. Jean Daniel Browne Says:

    It is fascinating to read what how you integrated these free softwares. It is great that it serves the mosque and the charity TV.

  3. Dan Dennedy Says:

    There is a relatively well-known open source playout server at http://www.mltframework.org/. Furthermore, it already supports direct output through two models of SDI cards. You will get poor results trying to use some X11-based output with SDI. It also handles the playlist, titling, and compositing functions as well. But, yeah, I admit, it does not drink the gstreamer koolaid. However, it would not be too difficult to make a gstreamer playbin-based source plugin. On the contrary, It would be an interesting and welcome addition.

  4. admin Says:

    @Dan Dennedy

    Thanks a lot! Not sure why open source or free playout server searches found me very little on Google. This saves me a lot of work which we could put towards other things.

Leave a Reply