Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have a number of songs in my Music library that display incorrect duration values, and so play only partially in Clementine. In Banshee and some other players they show different duration values and sometimes play the full song.

Is there a way to fix this without having to "re-encode" the song?

share|improve this question
add comment

1 Answer

up vote 6 down vote accepted

MP3 Diags can fix incorrect durations (and other errors). It is open source and in the repositories. It is a GUI Tool.

Installation

sudo apt-get install mp3diags mp3diags-doc

Another option might be MP3val (a command line tool):

Installation

sudo apt-get install mp3val 

Usage example

mp3val damaged.mp3 -f -t

-f: fix errors, -t: keep original timestamp

share|improve this answer
    
This worked for me. I use cat to combine audiobook parts into one file (cat 1.mp3 2.mp3 > out.mp3) and that works great for playback but almost every player gets wacky with the timestamps and even mediainfo shows the duration from the first file rather than the combined. –  brettof86 Nov 2 '13 at 19:48
    
cat is less than ideal for tasks like combining mp3s. A better way: http://superuser.com/questions/314239/how-to-join-merge-many-mp3-files –  phoibos Nov 2 '13 at 20:48
    
Why do you think that? MP3 files aren't much more than raw streams and they're almost the perfect candidate for cat aside from trivial side effects solved with a simple reassessment of Xing header data. Even without the mp3val the files still play in every player I've sent them through. cat is extremely efficient and MUCH faster than re-encoding with ffmpeg. Even with the added mp3val command. –  brettof86 Nov 3 '13 at 5:03
    
ffmpeg with concat and -acodec copy does not re-encode - it just copies the streams (so it's fast), but creates a proper file in the first place (without useless header & tag data appearing multiple times in the resulting files). –  phoibos Nov 3 '13 at 9:55
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.