Audibly glitchy 24 kHz MP3 decoding
Categories
(Core :: Audio/Video: Playback, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox108 | --- | fixed |
People
(Reporter: maikmerten, Assigned: padenot)
References
(Blocks 1 open bug)
Details
Attachments
(4 files)
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:106.0) Gecko/20100101 Firefox/106.0
Steps to reproduce:
Playing back 24 kHz MP3 files. A sample file is available at https://maikmerten.de/public/mp3-decoder-tests/bla24-v7.mp3
Actual results:
Audio playback of the sample file contains high-frequency chirp noises in Firefox. Listening with headphones greatly helps detecting the artifacts.
For reference, a sample decode with degraded audio quality is available at https://maikmerten.de/public/mp3-decoder-tests/decoded-ffmpeg.flac
This is caused by a bug in ffmpeg's MP3 decoder shipping with Firefox. A discussion of the bug is available over at https://hydrogenaud.io/index.php/topic,123198
Expected results:
Playback of the sample MP3 file should not contain high-frequency chirp noises.
For reference, a correctly decoded sample (without high-frequency chirps) is available at https://maikmerten.de/public/mp3-decoder-tests/decoded-lame.flac
The root of the audio quality degradation are incorrect values in a lookup table for the MPEG-2 24 kHz MP3 mode. These have since been corrected in ffmpeg with following commit: https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/37efcb473f2e2e930339c176492fdc45b578448b
Mozilla's copy still has the incorrect values: https://hg.mozilla.org/mozilla-central/file/tip/media/ffvpx/libavcodec/mpegaudiodec_common.c
Comment 1•2 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Audio/Video: Playback' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Reporter | ||
Comment 2•2 years ago
|
||
Analogous Chromium bug is tracked over at https://bugs.chromium.org/p/chromium/issues/detail?id=1376973
Assignee | ||
Comment 3•2 years ago
|
||
Updated•2 years ago
|
Assignee | ||
Comment 4•2 years ago
|
||
Depends on D161161
Assignee | ||
Comment 5•2 years ago
|
||
Depends on D161162
Assignee | ||
Comment 6•2 years ago
|
||
Depends on D161163
Comment 8•2 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/02ab0b6c0713
https://hg.mozilla.org/mozilla-central/rev/f35fdcd00b92
https://hg.mozilla.org/mozilla-central/rev/f446b3e633af
https://hg.mozilla.org/mozilla-central/rev/3ace3ff557d1
Updated•2 years ago
|
Comment 9•2 years ago
•
|
||
Hi, maikmerten! Could you please help us verify this fix on the latest Beta builds?
Unfortunately, I am not hearing any differences when comparing an affected Nightly build (2022-10-20), and latest Beta 108.0b3. I've checked with Win 10 x64, Ubuntu 18.04 x64 and macOS 11.
Reporter | ||
Comment 10•2 years ago
|
||
Hi, I'll gladly give the beta builds a try and report back!
(The difference in audio is rather subtle. Affected decoders sound like https://maikmerten.de/public/mp3-decoder-tests/decoded-ffmpeg.flac and correct decoders sound like https://maikmerten.de/public/mp3-decoder-tests/decoded-lame.flac - one needs headphones to spot the difference.)
Reporter | ||
Comment 11•2 years ago
|
||
Hello, I tried firefox-108.0b3.tar.bz2 and firefox-109.0a1.en-US.linux-x86_64.tar.bz2 on Ubuntu Linux 22.04, downloaded minutes ago. The distortion is still there for both builds. Is Firefox on Linux using a platform MP3 decoder?
Comment 12•2 years ago
|
||
Hi, Paul! Could you please take a look at what maikmerten commented above?
Reporter | ||
Comment 13•2 years ago
|
||
The original ffmpeg bug report (https://trac.ffmpeg.org/ticket/1958) contains a very easy to check test case: https://trac.ffmpeg.org/attachment/ticket/1958/resample_24000_V_0.mp3
This is a frequency sweep. WARNING: Loud and unpleasant. Between seconds ~34 and ~36 affected ffmpeg decoders will emit very audible distortions.
The Linux beta build I downloaded today produces these distortions.
Assignee | ||
Comment 14•2 years ago
|
||
(In reply to maikmerten from comment #11)
Is Firefox on Linux using a platform MP3 decoder?
It's not supposed to, but it does. I'll fix this, thanks for reporting back and verifying carefully.
Description
•