Wednesday, September 4, 2013

MP3s ripped from CDs in Ubuntu have incorrect track length

If you rip a CD in Ubuntu 12.04+ using the default program provided for this (Rhythmbox), the track lengths will be incorrect. This is because by default, Ubuntu will rip your mp3s using VBR, but it doesn't add the VBR headers.

Rather than go into the details, here's the easiest way to fix it:
  1. Install vbrfix by running this command in a terminal:
    sudo apt-get install vbrfix

  2. Now CD to the folder where the mp3s are that you need to fix:
    cd /path/to/mp3s

  3. Run this command to add the VBR headers to the mp3s:
    find . -type f -iname '*.mp3' -exec vbrfix {} {} \;

  4. Vbrfix seems to leave behind a couple of temporary files, so clean them up:
    rm vbrfix.log vbrfix.tmp
Another option would be to change the default preset to make it CBR. You can read more about doing that here: How do you edit the “Preferred Format” settings in Rhythmbox? Something like this ought to do the trick (change the bit rate as desired):
[mp3-cbr]
name=lamemp3enc
target=bitrate
bitrate=192
cbr=true
encoding-engine-quality=high
mono=false
You can read the details of the problem at this bug report:
Rhythmbox does not add VBR headers when ripping CDs to MP3

0 comments:

Post a Comment