2009-02-21

Synaesthesia resurrection

Synaesthesia may well be the most beautiful and meaningful music visualization I've ever seen.

Unfortunately the project seems abandoned—it's twelve years old and last release was in 2005. As such it's a little bit hard to use nowadays; well, you can pipe sound in just fine, but what really lacks is the ability to record a video of the visualization.

This is especially important for me because I'm using a Polish Twitter-like thingy which makes it much more straightforward to embed videos than sound; every time I find myself wanting to share a song I'm listening to I have to find a video on YouTube, and when there is none, I feel compelled to share a synaesthesia video.

So I took the matter into my own hands and hacked together raw video output for synaesthesia. You can find the code at the repo; feel free to tinker in it, you may even commit anonymously (just use the mob account and branch).

I can now do
mpg123 -s song.mp3 | ./synaesthesia --width 640 --height 360 --output-raw 25 pipe 44100 | nice -n10 mencoder - -demuxer rawvideo -rawvideo w=640:h=360:format=rgb32:fps=25 -oac copy -audiofile song.mp3 -ovc lavc -o song.avi
and get a video like this one:

The only thing that needs doing is making it possible to visualize asynchronically. Currently it still generates the video in real-time while playing and this sometimes causes dropped frames (visible in the video as some hickups, especially at the beginning).

No comments: