Closed Bug 1100210 Opened 5 years ago Closed 5 years ago

video mp4 file incorrectly assumed to be h264/aac when it's h264/mp3

Categories

(Core :: Audio/Video, defect)

defect
Not set

Tracking

()

VERIFIED FIXED
mozilla39
Tracking Status
firefox38 --- verified
firefox39 --- verified

People

(Reporter: jya, Assigned: jya)

Details

Attachments

(1 file)

Here is an example of mp4 file with h264 and mp3 audio:

http://download.wavetlan.com/SVV/Media/HTTP/MP4/ConvertedFiles/MediaCoder/MediaCoder_test1_1m9s_AVC_VBR_256kbps_640x480_24fps_MPEG2Layer3_CBR_160kbps_Stereo_22050Hz.mp4

MP4Reader pass the mime-type "audio/mp4a-latm" to the audio MediaDataDecoder
this causes errors later, and as such file plays with no audio.
While searching something else, I found this interesting post:
http://stackoverflow.com/questions/3987850/mp4-atom-how-to-discriminate-the-audio-codec-is-it-aac-or-mp3?rq=1

We should determine the type of codec using the first byte of content of the esds atom: the objectTypeIndication
mark mpeg2 L1,L2,L3 as audio/mpeg mimetype
Attachment #8577700 - Flags: review?(ajones)
Assignee: nobody → jyavenard
Status: NEW → ASSIGNED
Attachment #8577700 - Flags: review?(ajones) → review+
https://hg.mozilla.org/mozilla-central/rev/0d271a1f28a0
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla39
marking for uplift approval, allows to play some files we wouldn't have before
Flags: needinfo?(giles)
Comment on attachment 8577700 [details] [diff] [review]
Mark MPEG2 Layer 1,2,3 audio as MP3

Nominating for 38, since this small change improves our playback coverage.

Approval Request Comment
[Feature/regressing bug #]: Video playback
[User impact if declined]: mp4 files with mp3 audio (instead of more common aac) won't play.
[Describe test coverage new/current, TreeHerder]: Landed on m-c, now aurora, some time ago.
[Risks and why]: The main risk that that we will try to play such files and fail, instead of skipping the audio tracks outright. However, our normal decoders handle mp3, so I think the risk of that is low, and such files aren't common to begin with. It's a one-line change and easy to trace and revert in the case of problems.
[String/UUID change made/needed]: None.
Flags: needinfo?(giles)
Attachment #8577700 - Flags: approval-mozilla-beta?
Comment on attachment 8577700 [details] [diff] [review]
Mark MPEG2 Layer 1,2,3 audio as MP3

Should be in 38 beta 3
Attachment #8577700 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Flags: qe-verify+
Reproduced on Nightly 2014-11-16 under Win 7 64-bit.
Verified as fixed using Firefox 38 beta 4 and Developer Edition 39.0a2 2015-04-14, Win 7 64-bit.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.