For a long time, I used transKode as my Amarok transcoding script. I’m not sure why but as of last week that script broke and transcoded all my oggs to silent MP3s. They still had the proper length and tags, but filled with nothing but silence. I searched on Amarok’s Wiki for other transcoding scripts and noticed that transKode wasn’t there anymore. Odd.
The most promising script available was amaKode. That statement didn’t really say much though, because the script was partially functional. All it could do was transcode from any format to any other. No tagging though, and sometimes Amarok wouldn’t get the DCOP call right.
Following a suggestion on AmaKode’s kde-apps page I ported AmaKode to use pyKDE and the hacked dcopext.py. That rightly fixed the DCOP problem so all files got moved around right. The only remaining problem was tagging the output files.
Amarok doesn’t have any DCOP functions to query the collection about a specific URL, so I had to resort to using TagLib. Amarok passes the transcoding script a URL, so I needed to manually strip out the ‘file://’ from the URL. It isn’t a very clean hack but it works for 99% of my uses.
I’m not sure why, but my python-taglib installation doesn’t have the TagLib::Tag::duplicate method. Meh.
And for people who just want to upgrade: