[MPlayer-dev-eng] consider making -hr-mp3-seek on by default

Rich Felker dalias at aerifal.cx
Wed Nov 7 20:09:51 CET 2007


After some discussion with a user on IRC, I'd like to propose making
the -hr-mp3-seek enabled by default. This option controls the behavior
of the mp3 audiofile demuxer, making it parse the bitstream (possibly
from the beginning of the file) to seek to the requested destination.
Since mp3 files have no explicit timestamps, such linear-search O(n)
seeking is the only way to reach the correct destination; the default
bitrate-based algorithm is horribly wrong for VBR files and likely
off-by-one in some cases for CBR files.

The discussion on IRC basically went like this:
(1) If you're using -audiofile to provide an alternate audio track to
    a movie, you need -hr-mp3-seek, so performance is irrelevant
(2) For sane-length music files (even up to 20 minutes) the
    performance hit of -hr-mp3-seek is not painful even on my slow k6.
(3) Even for a long movie, -ss 85:00 completed in under a second for
    the user I was discussing this with.

I've had hr-mp3-seek=1 in my config file for several years and always
been pleased with the results for music files as well as more esoteric
uses. On the other hand, the user I was talking with had no idea what
was going wrong initially ("I'm using -audiofile and it desyncs with
my .mp3 file but if I convert it to .wav it works. Do I have to
transcode and ruin quality to make this work?"). So I'd like to
consider enabling this option by default. Any objections? Discussion
welcome.

Rich



More information about the MPlayer-dev-eng mailing list