Getting MP3 CDs to work with my car stereo

A few years back I bought an Opel Astra H from 2008 and it has the CD30 MP3 audio system. Which means that it will play MP3s burned on a CD. So one of the first things I tried was burning a few albums on a CD and play it in my car. There were some problems. Some of the files wouldn't play correctly and some other wouldn't play at all. Most files would play, but showed a garbled mess where the track name should be.

I naturally tried figuring out how I could make all MP3s (and meta data) work... using linux and a few command line tools!

Opel Astra H

As it turned out, it only supports MP3s encoded with a constant bit rate (CBR) and ID3v1 tags for the meta data. Most MP3s I download are in variable bit rate (VBR) and have ID3v2 tags with propably some album art in it or something.

Fixing the audio

I first tried converting the files to a 192kbps CBR format using avconv:

$ avconv -i filename-in.mp3 -codec:a libmp3lame -b:a 192k -vn filename-out.mp3

This made sure that the audio would always play correctly, but the meta data would still not be shown correctly. I knew I needed to convert it to ID3v1 and strip off all the rest.

Stripping off the rest

I found another tool which can manipulate and strip off id3-tags and other meta data from MP3s: eyeD3. You can delete anything you don't need on your car stereo using the following commands:

$ eyeD3 --remove-comments --remove-lyrics --remove-images filename-out.mp3
$ eyeD3 --to-v1.1 filename-out.mp3
$ eyeD3 --remove-v2 filename-out.mp3

This also fixed the meta data problem.

Speeding it up

When I finally had all of this working, I had it set up so that I could drop some files in a folder, run a script and receive the converted files in another folder. The script only processed the files sequentially. I noticed that only one of my CPU cores was occupied when converting the files, so I knew that this could be sped up by making use of all cores.

I found another cool little cool called GNU Parallel which very simply enabled this for me:

$ find "in" -type f | parallel ./ "{}"

Now it runs about four times faster since I have four logical CPU cores in my PC.

Find the scripts on GitHub

I've put the final scripts on GitHub. Just throw some albums or random MP3 files in the in directory, run ./ and, once the script is done, they'll be converted and ready in the out directory.

Tuesday, 7 March 2017, 23:17 Bert Hekman

Easy Twig: Create static twig websites with ease

About a year ago we were about to create our new company website. My colleague Jeroen, who is on front-end development, was assigned with this task. Jeroen also wanted to learn more about the Twig template engine at that time.

I figured I could kill two birds with one stone by quickly creating a framework which made it very easy for Jeroen to create the website using Twig. Easy Twig is what I've come up with. It allows you to very quickly build static websites in the same way you would when using plain HTML, but with the advantage of Twig. That means that you can make use of template inheritance, includes, macros, and more!

Check the project out on Github. Also check out my companies shiny website, which is built using Easy Twig!

Saturday, 9 July 2016, 21:20 Bert Hekman

Redone my whole website!

It has been quite some time (five years!) since I last posted something here, but here it is. I've completely redone my website, made it responsive, added in some Symfony and Bootstrap love and it should now be ready for the future.

I've also updated a lot of the outdated pages that are on here. Replaced a lot of links from SVN to GIT and from SourceForge to GitHub!

Maybe I'll be posting some more stuff here as well!

Tuesday, 5 July 2016, 23:56 Bert Hekman

New version for Music Importer

I've made a few changes to Music Importer again. The album artist field can now be edited and used for restructuring. This is very handy if you are to restructure compilation albums. Check it out on the Music Importer page.

Wednesday, 23 March 2011, 09:47 Bert Hekman

A new Smash Battle release in a long while

It has been a long time since we last released a Smash Battle update, but here it is! All the updates in the new release are a bit old ones too. The snow levels, new soundtrack, laser and shield power-ups have been in the repository for over a year. Download it from the Smash Battle website or from sourceforge and let me know if you think.

Thursday, 24 February 2011, 10:53 Bert Hekman