Audio crackling with a specific mp4 file with AAC
Categories
(Core :: Audio/Video: Playback, defect, P3)
Tracking
()
People
(Reporter: me, Assigned: kinetik)
References
(Blocks 1 open bug)
Details
(Keywords: parity-chrome, testcase)
Attachments
(2 files)
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:84.0) Gecko/20100101 Firefox/84.0
Steps to reproduce:
Open a specific mp4 file using firefox (see attachment).
Actual results:
Audio is crackling.
Expected results:
Audio not crackling.
The audio is played correctly when opening the file using vlc, ffplay, mplayer or chrome. If you extract the AAC stream using ffmpeg -i output.mp4 -vn -acodec copy output.aac firefox correctly plays the audio without crackling.
Comment 1•5 years ago
|
||
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:83.0) Gecko/20100101 Firefox/83.0
20201112153044
Comment 2•5 years ago
|
||
kinetik,
Is there a way to check if the mp4 is demuxed correctly?
I've also recently run into this same issue, and have been able to reproduce it on at least three different machines - the video consistently has audio crackling in firefox but plays fine everywhere else. I haven't been able to find anything specifically odd about the encoding.
I'll attach the example I've run into as output-second-repro.mp4
Thanks!
Comment 5•3 years ago
|
||
Hi,
This problem is still present with Firefox 103. Is it possible to increase its priority?
Thanks in advance.
Best regards.
This problem still exists in Firefox 145.0.1. Both previously posted mp4 files are causing audio crackling.
It would be great if this issue could be fixed in a future update, thanks!
Updated•7 months ago
|
| Assignee | ||
Comment 7•4 months ago
|
||
Going through ni backlog with fresh eyes.
Looked at both attached files (output.mp4 from comment 0, output-second-repro.mp4
from comment 4). Both have well-formed AAC LC ES_Descriptors and mp4parse
demuxes them correctly: audio_object_type=2 (LC), audio_sample_rate=44100,
audio_channel_count=2, DSI 12 10 56 e5 00 (AOT=2 / sfi=4 / chan=2 + SBR
syncExtensionType=0x2B7). ESDS side is fine.
The crackling comes from the mp4's stts table. Standard AAC LC has 1024
samples per frame, always, but these files' stts entries alternate
between 1024, 1026, 1027, 1031, 1032, 1034, 1035 — up to ~0.78% drift
per frame from the AAC natural frame size. The reporter's
ffmpeg -acodec copy workaround extracts the raw AAC and sidesteps the
stts entirely, which is why that plays fine.
Other demuxers (ffmpeg/VLC/Chrome) appear to ignore stts for AAC and
use the natural 1024-samples-per-frame timing. Firefox's MP4Demuxer
trusts the stts durations, so per-frame drift accumulates and the
audio pipeline either glitches or resamples, producing the crackle.
Description
•