GSVideo hacking at Art and Code conference   4 comments

Between March 4th and 8th I was in Pittsburgh, where I met with Ben Fry, Casey Reas, Ira Greenberg and Daniel Shiffman to work in the integration of GStreamer with Processing (among other things), as part of the Oxford Project. Incidentally, the Art and Code conference organized by Golan Levin at CMU was taking place during that time, so it was also a great opportunity to know the creators and developers of amazing tools such as vvvv, openFrameworks, Scratch, Pure Data, Max/MSP, Hackety Hack (by the famous Why The Lucky Stiff) and Ruby-Processing.

Shannon Fry, Ben Fry, Ira Greenberg, Casey Reas, Sebastian Oschatz, Christian McLean, Daniel Shiffman, Andres Colubri

In fact, the progress with GSVideo was quite substantial. I was able to re-implement the MovieMaker class using GStreamer’s AppSrc element, which allows to push pixel buffers from the Processing sketch into the video pipeline. I tested this new feature by creating ogg movie files encoded with the Theora codec. GSMovieMaker also lets you choose the H264 and XVID4 codecs, but at this point don’t seem to work very well.

The other significant step forward was on the Mac front. The latest version of macports (1.7.0) probed to be flawless to compile all the gstreamer modules (gstreamer, gst-plugins-base, gst-plugins-good, gst-plugins-base, gst-plugins-bad, gst-plugins-ugly and gst-ffmpeg). One issue however is that the default portfiles include a lot of unneeded dependencies on things like gnome-vfs and gtk+. The solution to this problem is to create a local repository of portfiles with these dependencies removed. You can download the portfiles I used from here. Also, I included in the resulting binaries the osxvideosrc plugin to do camera capture with the GSCapture object.

I still need to do some more work to create a stand-alone pkg installer of gstreamer for Mac OSX, and also to release anew release of GSVideo that bundles the new gstreamer binaries. However, you can try these preliminary versions:

The first file is just the gsvideo library package, which goes into Processing’s library folder.  The second zip file contains gstreamer binaries, and it should be unzipped into the root folder of the main hard drive.

The included examples require a little hack in order to work properly, which is the following: before running any gsvideo function, add the following line:

GSVideo.forceGlobalGstreamer = true;

For example, you could add this line right after the size() function:

void setup() {

size(640, 480);

GSVideo.forceGlobalGstreamer = true;

mov = new GSMovie(…

This ensures that gsvideo finds the gstreamer binaries in /opt/local. This hack won’t be needed once the new version of gsvideo is “officially” released. Another caveat is that the only resolution supported by GSCapture  is 640×480, and probably won’t work on any webcam but the iSights built into the macbooks. These limitations reflect the preliminary stage of the osxvideosrc plugin.

About these ads

Posted March 15, 2009 by ac in Conferences

Tagged with , , , , ,

4 responses to “GSVideo hacking at Art and Code conference

Subscribe to comments with RSS.

  1. Thanks for this. I was able to install accorinding to the instructions in this post. Unfortunately the examples all show reverse video (or at least strangely color-shifted?). I’ll try downloading it again in the future. (I’m using MacOS 10.5.7)

  2. Thank you very much for the portfiles. I was already installing gstreamer when I was reading your post, and was wondering if it really needed all those extra libraries.

    A quick question:
    Mac OS X already comes with gzip, zlib and libxml2 installed. Is it possible to simply use the preinstalled versions?

    • I think that macbuilds only works with the versions of the libraries that downloads automatically during the compilation process. I don’t know if it possible to override this mechanism.

      As another possible build mechanism on OSX, you might want to check out the ossbuild project. I’m currently collaborating to this project, which has been tested on windows and Linux. I’m adapting the Linux compilation scripts to work on OSX as well.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Get every new post delivered to your Inbox.

Join 55 other followers

%d bloggers like this: