AAC decoding trimming improvements
Categories
(Core :: Web Audio, defect, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox83 | --- | affected |
People
(Reporter: jujjyl, Assigned: padenot)
References
Details
It looks like Web Audio backend is no longer properly implementing seamless looping of WebAudio AudioBufferSourceNodes, when playing back .mp3 or .m4a (AAC) files.
STR: Visit http://clb.confined.space/audio_test_suite/8bit_detective/8bit_detective.html and click on either of the buttons
8bit_detective_8000hz_11kbs_mono_ffmpeg2.2.2_aac.m4a
8bit_detective_8000hz_8kbs_mono_lame3.99.mp3
under the "Play uncompressed" section. Notice that the looping is not seamless. Playing back the same files either in Google Chrome or Audacity does reproduce seamlessly looped playback.
I write regressed, because I am quite sure that when I originally wrote the audio test suite, that seamless looping was working in Firefox. (although it's been a long ago, not 100% sure - but if it had not worked then, I am sure I would have reported a bug)
The STR repository can be also found in https://github.com/juj/audio_test_suite
Assignee | ||
Comment 1•4 years ago
|
||
The mp3 case is handled by bug 1566389, that is landing today. I'll have a look at the AAC case.
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 2•4 years ago
|
||
The cause for this is likely to be encoder delay. This is fixed for mp3, on nightly, and improved by 1669503 for the particular test case here, that contains a weird file where the encoder padding spans two mp3 packets, but only when encoded using Audacity, not when using ffmpeg
or lame
on the command line.
AAC is known to be a mess (maybe even more than mp3), and the way to find the amount of frames to trim can be specified in multiple ways. This needs investigation.
Assignee | ||
Updated•4 years ago
|
Comment 3•3 years ago
|
||
Hi,
Could you check if the issue still occurs on the latest Firefox?
I'm not entirely sure how to reproduce this.
Thank you!
Assignee | ||
Comment 4•3 years ago
|
||
This is being handled in bug 1703812 -- almost done there. This still is an issue in current Firefox release.
Reporter | ||
Comment 5•3 years ago
|
||
I realize there is a better test case in the audio_test_suite repo for this than the 8bit_detective audio clip. Updated STR:
- Visit http://clb.confined.space/audio_test_suite/car_acceleration_high/car_acceleration_high.html
- Click on any of the buttons on the page.
Expected:
Under the "Uncompressed" section, for all files, there should be a seamlessly looping audio playing back of a car engine revving up, and then down.
Under the "Compressed" section, for all files, there should be a seamlessly looping audio playing back of a car engine running at constant pitch.
Observed:
Both in the uncompressed and compressed sections, the .m4a file format playback contains pauses in the audio loop.
In the compressed section, the .mp3 file format playback contains pauses in the audio loop.
Tested today on Windows 10 and Firefox 92.0.
Assignee | ||
Comment 6•3 years ago
|
||
I'm almost done with this, but had to delay finishing the patch set up because of other, more important things. I should get back to it, there's not much left to do.
Description
•