# Ubuntu – Ripped mp3 files show wrong track lengths

bansheecdcd-rippingsound-juicer

I have seen this problem both when using Banshee and Sound Juicer. I'm using Ubuntu 12.04 on a Thinkpad 14". I'm not sure about the make of my internal CD drive, but would be glad to provide you with that information if someone tells me how to. I have not had access to an external CD drive so that I could tell if the problem is my internal CD drive.

Anyway, the problem: The mp3 files I have ripped show wrong lengths. For example when I ripped Peacebone by Animal Collective, which's length is 5:13, the file was 25 minutes long, according to my phone and banshee. The players skip to the next song before playing the whole 25 minutes. However, I'm not comfortable not knowing if I'm listening to the whole thing or the real length of the song.

This far the problem has disappeared on a second rip, although the file lengths are still occasionally a few seconds longer than they're supposed to be.

#### Best Answer

Starting around Ubuntu 12.04, when you rip CDs in Ubuntu using Rhythmbox or Sound Juicer the default settings will create VBR MP3s, but the VBR headers don't get added, so just about any program you open the MP3s with will show the incorrect track length, including the default music player (Rhythmbox) and the default file manager (Nautilus).

The easiest solution is to add the VBR header to the MP3s after ripping them:

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


An alternative solution is to change the default preset so that the CDs are ripped as CBR instead of VBR MP3s. There's a pretty good explanation here: https://askubuntu.com/a/154933/18665

A profile 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


As with any bug, if you're experiencing this problem I'd highly recommend you go to the bug report and mark that it affects you (near the top left), so that it gets more attention. The bug report is here: Rhythmbox does not add VBR headers when ripping CDs to MP3