1

I have one strange problem which I can't figure out and it really drives me crazy. I was searching from a long time for this, but didn't find any adequate answers. It is about the time duration of converted mp3s with ffmpeg or avconv. I'm using Download helper in Firefox to download and even convert any video file to mp3.. Everything is going fine except the duration time of the mp3s in any music player (i tried audacious, qmmp)... When I convert a video which is 3mins long in the player it shows around 18mins long. Another thing i noticed is the wrong bitrate. It shows something around 32kbps, but i'm using 192kbps when i convert the file...

I tried VLC which i use for video files and it shows the time correctly, but the bitrate in the codec section is also showing 32kbps. I noticed at first when i open the file with VLC is little kinda buffering the time but at last it shows it correctly.

Another thing I tried is the command ffmpeg -i file.mp3 which also shows the correct time duration and bitrate.

The strange fact is when i export the same converted file with audacity without change anything it correctly appears in audacious with the correct time duration. May be audacity uses some other libs which corrects that bug.

For information i have installed ffmpeg, libavcodec-extra-53.

ffmpeg -version

ffmpeg 0.8.10-6:0.8.10-0ubuntu0.13.10.1
libavutil    51. 22. 2 / 51. 22. 2
libavcodec   53. 35. 0 / 53. 35. 0
libavformat  53. 21. 1 / 53. 21. 1
libavdevice  53.  2. 0 / 53.  2. 0
libavfilter   2. 15. 0 /  2. 15. 0
libswscale    2.  1. 0 /  2.  1. 0
libpostproc  52.  0. 0 / 52.  0. 0

Using Kubuntu 13.10 i386.

Thanks in advance :)

edit:

Ok... The solution was really simple.. As LordNeckbeard said, I just downloaded the version from the official FFmpeg site and everything is correct now.

I purge the repository version first and then just copy the version from the official site into /usr/bin/...

  • I think that something is going wrong with the ffmpeg conversion.. – m1nev Mar 30 '14 at 11:11
  • 1
    Instead of providing ffmpeg from FFmpeg, Ubuntu uses a fork that supplies avconv and a fake "ffmpeg" which are often buggy. What happens if you download a recent build of ffmpeg from FFmpeg (just download, extract, and execute) and then manually use it to convert to MP3? Does the resulting file display the correct information in the players? – llogan Mar 30 '14 at 17:43
  • Yesss :) You are right! Actually that was the last thing i was read and didn't tried. Thank you very much. I'll write the answer below... – m1nev Mar 30 '14 at 20:43
  • Glad it worked. You can provide and accept a full answer to your own question so others know a solution was found. I don't recommend /use/bin/ for your binary. You can put it in /usr/local/bin/ instead (or elsewhere in your PATH) and then you can keep the fake "ffmpeg" package for other dependent packages. – llogan Mar 31 '14 at 17:42
1

Ok... The solution was really simple.. As LordNeckbeard said, I just downloaded the version from the official FFmpeg site and everything is correct now.

I purge the repository version first and then just copy the version from the official site into /usr/bin/...

|improve this answer|||||
0

The reason for the incorrectly displayed duration of a mp3 file is an issue in the header of the file. The mp3 file in question is probably vbr encoded.

The header can be reparied with the utility

vbrfix

It is available in the Ubuntu repository:

sudo apt-get install vbrfix

Then use it to fix one mp3 file:

vbrfix in.mp3 out.mp3

Or fix all the files in a directory:

mkdir backup
for FILE in *.mp3; do
  mv "${FILE}" backup/"${FILE}"
  vbrfix backup/"${FILE}" "${FILE}"
done
rm -rf backup
|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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