We have moved to a new Sailfish OS Forum. Please start new discussions there.

Media player displays wrong duration for variable bitrate mp3 files

asked 2015-04-11 21:07:18 +0300

Self-Perfection gravatar image

updated 2016-06-21 14:01:02 +0300

Here is free track for example. It's real duration is 4:22:

$ ffprobe /tmp/JLTM_-_The_blue_doll.mp3 |& grep Duration
  Duration: 00:04:21.77, start: 0.025056, bitrate: 200 kb/s

But media player shows it's duration in track list as 4:55:

media player screenshot

Note that in playback bar current position is displayed properly and when playback of the track reaches the end seek bar displays 4:22.

The bug is specific to variable bitrate mp3 files, I could not reproduce with ogg vorbis file (one more reason to use free formats but who cares :( ).

edit retag flag offensive close delete


Confirmed. I use Winamp on my Windows PC. Winamp actually reports the track as 4.21 and plays through to 4.21 - nonetheless, your findings are correct; Jolla is clearly not handling vbr correctly.

Spam Hunter ( 2015-04-12 16:37:19 +0300 )edit

QuasarMx reports correct length. MediaInfo as well. Many players/decoders, including for Windows, report inaccurate length for VBR mp3 songs: this is likely to be related with the size of the sample they use to estimate the total duration (as the bits/time ratio isn't constant)

objectifnul ( 2015-04-13 00:33:28 +0300 )edit

This might be related to using an old libav to get the duration of the file.

Could you install libav-tools and try avprobe on the phone?

If it is indeed because of that then perhaps an updated libav should fix it (Should happen during or right after we update to GStreamer 1.x).

MSameer ( 2015-05-18 18:54:10 +0300 )edit

avprobe on the phone gives utterly wrong output. It recognizes this file as 21:49.38 long aac file!

Here is full ffprobe output on the same file for comparison.

BTW, I've carefully picked free track as example, so you might check for yourself. To download the track run curl -JO https://storage-new.newjamendo.com/download/track/1203488/mp32/

Self-Perfection ( 2015-05-18 19:20:49 +0300 )edit

Perhaps we can wait then for the new libav then :(

MSameer ( 2015-05-19 22:14:24 +0300 )edit

1 Answer

Sort by » oldest newest most voted

answered 2018-05-23 09:55:02 +0300

Andy Branson gravatar image

If anyone involved could check this again, I think this should have been fixed in 2.1.3. Tracker had support for Xing metadata frames added, which more accurately reports track duration for VBR mp3 files.

edit flag offensive delete publish link more



That seems to be resolved. I've re-downloaded the track and stock media player shows its duration as 4:21 in track list. OS version: 2.1.4

Self-Perfection ( 2018-05-23 11:00:03 +0300 )edit
Login/Signup to Answer

Question tools



Asked: 2015-04-11 21:07:18 +0300

Seen: 1,317 times

Last updated: May 23 '18