Present Perfect


Picture Gallery
Present Perfect

I get such a kick…

Filed under: Flumotion,Python — Thomas @ 18:21


... out of watching Flumotion's interface for the streamer components when a big event is going on. The platform's launching streamers all over, and as soon as a new one starts, you just see the numbers flying up. Look, another one just started, and in its first minute it went up to 280 connections, and still climbing. For a 500 kbit/sec stream that means it goes from 0 to 140 Mbit/sec on that machine just for this stream.

We jumped up in a few hours to a good 14 Gbit/sec, which is still climbing.

The event in question, of course, is one of hope for the future - Obama's inauguration - streamed with Python, Twisted, and GStreamer.

Waiting for a midnight kiss

Filed under: movies — Thomas @ 00:06


I must admit this movie's title didn't exactly fill my heart with anticipation. Sounded like another sappy romcom. But hey, one of my 2008 New Year Resolutions that I kept for this new year is to go out and see movies, so when a friend wanted to go, so did I.

It got better reading the description, which mentioned the still-excellent Clerks as a reference point. And the rest sounded good too.

Well, I must admit I was blown away by the end. And so was the audience - I don't think I've ever heard an audience clap at a regular movie showing. I can see the Clerks reference, being shot in black and white and linking both juvenile and acid-black humor contrasting well with the actual story. The dialogue is excellent, the tempo is high, weird things happen, and you feel the connection they're making. It definitely helps that these are mostly unknown actors and that they went for a realistic style.

The description also mentioned Before Sunset, but I haven't seen that one (out of romcom fear). It did recall both Manhattan (which I didn't like that much) and Chasing Amy (which is still in my top 5). It is a rare movie that can make sex on screen look realistic or tender, and this movie pulls off both.

There's two particular things that grabbed my attention. The first is that at some point they're discussing (without mentioning the name) PostSecret, an awesome project I've been following up on for a while. Last Christmas I got some of his books, a few for me and a few to give away to some friends. PostSecret's idea is so incredibly simple yet powerful, it's one of those rare ideas I wish I had had. As an idea, just as powerful as (but awesomely more artful than) the Million dollar homepage.

The second one was the orphaned shoes bit. If it's true that lost shoes only show up alone, then yeah, taking pictures of abandoned shoes for an art website is an awesome idea. (It also speaks to my particular fascination with shoe separation, for those of you who know me personally)

So, in short, a romantic comedy that is actually funny and appeals to my sense of romance. I'm sure there's people who'll find reasons to hate this movie, but if you've liked any of the aforementioned movies, I'm sure you'll leave the theatre with just as big a grin on your face as I did.

WordPress frustrations

Filed under: Hacking — Thomas @ 10:59


For all the love wordpress gets from people who care about usability I still get surprised at how incredibly unusable wordpress can sometimes be.

Since last week I was unable to log in to my WordPress installation. You'd click login, and you'd end up on the same page, and there'd be no way to log in.

Yesterday I googled a little, and apparently this is so common that there is a whole page dedicated to this.

Step 2 on that page is:
Some WordPress Plugins may interfere with the login process. Disable all of your WordPress Plugins, either through the admin panel or by removing them from the /wp-content/plugins/ folder, so they will not be recognized by the program.

Excuse me ? You create a whole eco-system built on allowing anyone to code up a plugin for your system, but you allow your system to fail silently when said anyone makes a mistake ? I am surprised I wasn't bitten by this before, but granted, I have few plugins and definitely didn't touch them the last few months.

How WordPress cannot do some simple logging or error handling when it loads up random plugins during the login process is simply beyond me.

I moved the plugins/ directory out of the way and login worked. That was the extent of the help that debug page provided - of course it doesn't tell you how you can figure out which plugin is causing the problem.

In the end it was a file called markdown.cache - yes, just the cache file. Sigh.

Way to reassure us!

Filed under: Fun — Thomas @ 01:11


LiveJournal.com is currently unavailable due to emergency maintenance. Don't worry, this has nothing to do with our recent company layoffs! It's a technical problem, not a lack-of-personnel problem.

Thank you for your patience.

GStreamer, appsink and CRC32

Filed under: GStreamer,Hacking,Python — Thomas @ 10:50


Slowly flexing my GStreamer muscles again in preparation for a real application.

Yesterday I wanted something that allowed me to calculate CRC's of decoded audio files, to be able to calculate the CRC of a ripped file.

There's a few ways to do this using GStreamer, none of them code-free.

I assume the 'correct' way would be to write a filter element that calculates the CRC as buffers come in. In the olden days this would involve a lot of boiler plate code in C, and a small processing function.

Today, in C, this would be easier, since you could probably simply subclass basetransform.

You could write either in Python as well these days.

Then there's the 'get data out of GStreamer' approach. This used to be done using identity and the handoff signal.

The new, approved, API-stable way is to do this using appsink, one of two elements (with a helper library, of which I don't yet see the point) recently moved to gst-plugins-base.

Using appsink is probably the approach that involves the least code to write. You can set up a pipeline, set it to PLAYING, and just pull buffers in a blocking fashion (which is easier code to write, but harder to slap a GUI on later)

Here's the example code. You might note that there is an ugly try/except which I suspect is some bad handling inside gst-python or pygtk for errors during signal handling/emission.

It is a deceptively simple way to get data out of a pipeline and processed, and I'm glad we have a guaranteed way of doing this sort of operation now for the many people who want to dip their toes into GStreamer instead of diving in. I do hope they will at least consider the full dive still though.

Side note 1: GStreamer heads are free to share their opinion on what *should* be the correct way for data analysis operations like this. Years of brainwashing still lead me to believe that the answer would be 'write a filter element'.

Side note 2: I've been toying with the idea of making a python class for 'asynchronous operations' that would wrap a GObject main loop doing the processing, and implementations can then subclass and implement some simple methods. This would make it easy to attach that operation to a GUI element (for example, a progress bar) automatically, or adapt it into a linear, blocking operation for command line applications. I can't imagine this would be a novel idea, I'm sure someone else has done this already, anyone know what I'm talking about or have any suggestions ?