Thursday Night

Paul Betts’s personal website / blog / what-have-you

Fancy new program: gst-music-hash

I wrote a new program to fix my problem with duplicate music files that’s somewhat handy; it uses GStreamer framework to decode a music or movie file, then uses the libfooid library to calculate a unique number based on the contents of a file. Why is this useful? Well, it means that if you converted half your library to M4A for example, you could find the old MP3 files and delete them off the disk. I’m going to write a Ruby script that’ll do just this in the next few days, but in the meantime here’s the program itself.

Source Code: gst_music_hash-0.1.tar.bz2
Debian / Ubuntu package: gst-music-hash_0.1-1_i386.deb

The program is pretty buggy like any other program I just throw together for my own use, it doesn’t handle errors very well. If you put it in a script, it returns 0 on success so you can use that to determine whether the output is a valid hash. Next, I’m going to try to optimize it using the liboil library, but unfortunately I can’t get oprofile to work on my machine so that’s definitely a thorn in my profiling side.

Written by Paul Betts

October 16th, 2006 at 1:01 pm

Posted in Linux,Programming,Ruby