Closed Bug 1089159 Opened 7 years ago Closed 7 years ago
Decoder Module uses incorrect sampling rate for AAC SBR tracks
Wrong sample rate I guess. Happened on http://www.colts.com/videos/videos/Name_That_Colt_Who_Can_Speak_4_Languages/9cfb0bb3-b51f-43e7-9cbc-00f8cd730a0d
The metadata we get in AudioDecoderConfig claims the audio is 1 channel, 16bit, 22k. But clearly that's not accurate. On some loads I get an ad that plays before the actual video with the same metadata but it sounds fine.
OK, the video in question here is mono/44k and MP4Reader claims it is mono/22k.
Summary: Audio sounds like it's playing in slow motion → MP4Reader gives wrong sample rate (22k instead of 44k)
Component: General → Video/Audio
Product: Firefox for Android → Core
Hardware: Other → All
MPEG4Extractor seems to see the 22k sample rate in two places: the sawb chunk, and the esds (based on frequency index 7). Somehow Quicktime and VLC get 44k.
Alright, think I have this figured out. This is a SBR track, and there is some mode here where the decoded output is double the sample rate of the input. It looks like MediaFormat has some stuff we can use to figure this out.
Nevermind, the MediaFormat stuff is only used during encoding. Is there a way the MPEG4Extractor can get this? (Edwin, see prior comments re: SBR mode)
Attachment #8512948 - Flags: review?(cpearce) → review+
Summary: MP4Reader gives wrong sample rate (22k instead of 44k) → AndroidDecoderModule uses incorrect sampling rate for AAC SBR tracks
I needed to back this out in https://hg.mozilla.org/integration/mozilla-inbound/rev/716fba2842f9 for build failures on android: https://treeherder.mozilla.org/ui/logviewer.html#?job_id=3410662&repo=mozilla-inbound
Oops, the debug build was hosed. Repushed with the typo fixed. https://hg.mozilla.org/integration/mozilla-inbound/rev/8638faa1a83b
tracking-fennec: ? → 36+
Assignee: nobody → snorp
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
Comment on attachment 8512948 [details] [diff] [review] Correctly use MediaCodec's audio output format Approval Request Comment [Feature/regressing bug #]: bug 1014614 [User impact if declined]: Improper audio playback of some AAC files [Describe test coverage new/current, TBPL]: Nightly for a week [Risks and why]: Low risk, uses known correct sample rate from decoder [String/UUID change made/needed]: None
Looks like snorp landed this on Aurora and forgot to mark the bug. https://hg.mozilla.org/releases/mozilla-aurora/rev/ba9a79c05e9a
You need to log in before you can comment on or make changes to this bug.