magicus Rotating Header Image

Analyzing the Air Video custom ffmpeg

When I compiled the custom ffmpeg as describe in the previous post, I got curious to the custom build of ffmpeg that was used. I did some digging into ffmpeg’s git repository. First I made an intelligent guess on the approximate whereabout of what the custom build was based on, based on the state of the Changelog. Then I did a quick manual bisecting of git commits, coupled with a manual check if the corresponding changes was or was not present in the Air Video custom ffmpeg source.

This left me to conclude that the custom ffmpeg was based on the source including this commit. (The snapshot of the git repository at this commit can be downloaded here.)

Also, the custom source code bundle included libswscale including this commit. (Snapshot here.)

On top of this, they had made some patches to the ffmpeg source code (but none to the libswscale source). I created a patch file, it can be downloaded here: ffmpeg_airvideo.patch

So, what changes have they made?


Air Video on Ubuntu 10.10 (maverick)

I’ve recently gotten myself an iPad. Of course you want to watch videos on an iPad, right? Of couse you want them optimized for the iPad hardware, right? Of course you don’t want to do that ahead of time and transfer to the iPad, but on-the-fly directly from your media library, right?

There’s an app for that! (Surprise…) Probably several. But the one that rocks is Air Video.

Air Video needs a special server, and it need quite competent hardware to do on-the-fly conversion. But the server is only distributed for Windows and Mac OS X (once again: surprise…). Fortunately, it is quite easy to get it running under Linux. This is what I did.


Personal music tag cloud – Last.FM boffin

I just discovered a new program from Last.FM — boffin. It is still in beta, but I encountered no real problems with it (apart from a slight difficulty at installing it in Ubuntu — solution below). Boffin indexes your personal music collection on your computer, and relates it to the tags given to the artists on Last.FM. As a result, you get a tag cloud descibing your local music collection. This would be cool to have, but not very useful. The great thing is that after the categorization, you can select one or more tags, and start playing music — from your own music collection — that matches these tags!

Currently, I’m listening to music tagged ebm or synthpop or darkwave. Music from my own collection. Music I like to listen to, but I never had been able to access in this way.

So, what does my music tag cloud look like? (more…)

Shootout – PDF viewers on Linux

I have recently switched my primary desktop computer at home from Windows XP to Linux (Kubuntu Hardy). One of the things I assumed would work out better, but in fact worked out worse, is PDF viewing.

The Acrobat Reader on Windows is a memory-hungry monster, and I assumed that the Linux desktop would be full of lean-and-mean and cool PDF viewers. I was disappointed. I recently gave up and installed Adobe’s closed-source reader, and it worked better than all the open source readers I tested. I’ve been testing kpdf, kghostview and evince. All of them have rendering issues with different PDF files, downloaded from the Internet. I think the best one have been evince, but not even evince have been without rendering bugs.

And then comes the issue of speed.


How to kill a healthy sentence

I was presented with this example when I was about to write my B.A. thesis in philosophy. It has served me as a good reminder on how not to write good prose. Curiously enough, I couldn’t find this on Google. The meta-search engine Mamma however, could find one instance at

How to kill a healthy sentence

  1. Begin with a sentence that is clear and direct:
    To think clearly, write clearly.
  2. Change its verbs, adjectives, and adverbs into abstract nouns:
    For clarity of thought, seek clarity of writing.
  3. Make the sentence passive:
    For clarity of thought, clarity of writing should be sought. (more…)

Detecting if gdb is attached

When writing programs that should be easy to debug, it is often useful to know if you are running with a debugger attached. In Linux, there is no reliable way of doing this, but you can make a clever hack that is quite okay. gdb and other debuggers work by using ptrace, but in Linux, only one process at a time can ptrace another. So, the trick is to try to ptrace ourselves, and if it fails, we can assume that we are running in a debugger. (Or in strace, for that matter.) Doing this properly requires starting a new thread, however. It’s not very hard, but it’s a bit tricky getting everything right, and Ihave the feeling I’m doing this over and over again.


First post!

So, it seems I’ve gotten myself a blog. Keepin’ up with the times, heh? I’ve tried doing things like this before (even though it wasn’t called “blog” back then), but never succeeded in keeping them updates.

This time, however, I have a somewhat more narrow focus, which will hopefully help me to determine what to post, and when.

My intention is to write about technology; cool technology, new technology, technology with good usability. Ubiquitous technology. And about a hobby of mine: to run Linux on as many weird hardware targets as possible. 🙂