Closed Bug 1167647 Opened 10 years ago Closed 9 years ago

cookpad.com videos fail to play in Fennec (give "file is corrupt" message)

Categories

(Firefox for Android Graveyard :: Audio/Video, defect)

defect
Not set
normal

Tracking

(p11+, firefox42 fixed)

VERIFIED FIXED
Firefox 42
Tracking Status
p11 + ---
firefox42 --- fixed

People

(Reporter: miketaylr, Assigned: snorp)

References

()

Details

(Whiteboard: [compat])

Attachments

(5 files)

Originally reported as https://github.com/webcompat/web-bugs/issues/1050. These mp4 videos work in Desktop Firefox, B2G and Chrome Mobile, but Fennec doesn't like them. Media codec logcat details at: https://github.com/webcompat/web-bugs/issues/1050#issuecomment-103923037 One of the cookpad engineers gave the following info about their encoding setup: """ Our video is encoding by [Amazon Elastic Transcoder](http://aws.amazon.com/elastictranscoder). MP4 file detail is... Type | Codec --- | --- Video | H.264 Audio | AAC You can find other videos in http://cookpad.com/videos ex. - http://cookpad.com/videos/933 - https://video.cpcdn.com/cookpad/recipe_video/666/80d40c9c683cb6706db968f2ec33d181/low.mp4 - http://cookpad.com/videos/836 - https://video.cpcdn.com/cookpad/recipe_video/580/1c2304f3170bdd43ef5897cf3c8f328c/low.mp4 """
It's reproducing on Nexus 5 (Android L) and Nexus 7 (KitKat). Nexus S on Android 2.3 doesn't show the video image at all.
I browsed several videos when testing this and saw the same problem everywhere - very consistent at least. If it's some odd feature Amazon's transcoder uses and we don't support or handle well we should give this high pri IMHO.
Screenshot of the settings used by Cookpad.
Attached video fromWebMbitrate80.mp4
OK, vladikoff helped reduce this further. Transcoding a video using Elastic Transcoder using cookpad's video settings is fine, using default AAC audio. But looking at the file itself, it seems they're actually using HE-AAC as their audio codec. Vlad used that, and indeed we get the "Video can't be played because the file is corrupt" message. Firefox Desktop and Chrome Mobile continue to play the file just fine. Source video: http://techslides.com/demos/sample-videos/small.webm Uploading the transcoded result.
JeanYves, can you take a peek at the fromWebMbitrate80.mp4 video?
Whiteboard: [compat]
I see nothing special with that video. I don't have the device to reproduce either. It could be a dupe of bug 1166760
Status: NEW → UNCONFIRMED
Ever confirmed: false
Flags: needinfo?(jyavenard) → needinfo?(bwu)
Thanks for looking Jean-Yves. > I don't have the device to reproduce either It happens on all my Android devices, as well as the other people in this bug who have tried. So setting back to NEW.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Not a dupe of bug 1166760 (`Videos on Facebook play back with extremely slow audio`). In this case the video does not load at all, sometimes says "Unsupported" Screenshot via a simulator: http://v14d.com/i/5571bf94a4651.png Easy video URL to test: http://v14d.com/vid/fromWebMbitrate80.mp4 You don't need a real device to confirm this bug. Use a simulator. To reproduce WITHOUT a device: - Install an Android simulator (I used https://www.genymotion.com/#!/) - Create a device profile ( I used Nexus 4 - Android 4.3 API 18) - Open the simulator, enabled third party sources to install external APKs, open browser, download Fennec Nightly ( I used the Fennec X86 build) - Install Fennec, navigate Fennec to http://v14d.com/vid/fromWebMbitrate80.mp4 - See unsupported screen.
James - any clues?
Flags: needinfo?(snorp)
attachment 8614783 [details] cannot be played on gonk PDM either. I am going to check it.
Flags: needinfo?(bwu)
This file has a HE-AACv2 audio track, with out of band SBR AAC (profile 5). Those can't be encoded in a ADTS container (which only support a profile <= 4)
Sounds like the file is busted. Can we work around that in the parser?
Flags: needinfo?(snorp)
IMO, it seems not a parser problem. It is more likely we don't configure codec in a proper way.
(In reply to Blake Wu [:bwu][:blakewu] from comment #16) > IMO, it seems not a parser problem. It is more likely we don't configure > codec in a proper way. We configure the decoder based on data from the parser, though, so a workaround there would fix it I believe.
(In reply to James Willcox (:snorp) (jwillcox@mozilla.com) from comment #17) > (In reply to Blake Wu [:bwu][:blakewu] from comment #16) > > IMO, it seems not a parser problem. It is more likely we don't configure > > codec in a proper way. > > We configure the decoder based on data from the parser, though, so a > workaround there would fix it I believe. And what could be busted in that file? What work around could be done in the parser when the gonk decoder encapsulate the data in an adts stream a stream that can't be? The decoder receives all the data it needs to take the right action. It receives an AudioInfo with a profile value of 0, and an extended_profile value of 5. The decoder needs to handle raw AAC. If it can't well, it can't play that particular file. But there's nothing you can do in the MP4 Demuxer that can get around this.
James - is it possible convince the decoder to not use ADTS? We had to do that for all the other decoders.
Basically, the decoder/codec Fennec use should be the same to B2G. I have tried to not use ADTS in comment 13 on B2G, so Fennec should be able to decode raw AAC I believe.
(In reply to Blake Wu [:bwu][:blakewu] from comment #20) > Basically, the decoder/codec Fennec use should be the same to B2G. I have > tried to not use ADTS in comment 13 on B2G, so Fennec should be able to > decode raw AAC I believe. to reduce the likelihood of regression, you could still use ADTS if AudioInfo::mExtendedProfile is <= 4 (or if AudioInfo::mProfile != 0), and pass raw aac for others. The vast majority of files I've seend seems to use inband SBR and advertise themselves as AAC-LC (AudioInfo::mExtendedProfile = 2)
See Also: → 1174784
Unsure if Bug 1174784 is caused by the same issue, but it's using AAC (see comment 3) and works on Desktop and not Fennec.
(In reply to Jean-Yves Avenard [:jya] from comment #21) > to reduce the likelihood of regression, you could still use ADTS if > AudioInfo::mExtendedProfile is <= 4 (or if AudioInfo::mProfile != 0), and > pass raw aac for others. We should just stop using ADTS on Fennec like we've done on every other platform.
(In reply to Anthony Jones (:kentuckyfriedtakahe, :k17e) from comment #23) > (In reply to Jean-Yves Avenard [:jya] from comment #21) > > to reduce the likelihood of regression, you could still use ADTS if > > AudioInfo::mExtendedProfile is <= 4 (or if AudioInfo::mProfile != 0), and > > pass raw aac for others. > > We should just stop using ADTS on Fennec like we've done on every other > platform. For omx decoders used by Fennec and Gonk, it needs to know if the data is in ADTS format or not. So it would be better to expose this information via AudioInfo.
Attachment #8627278 - Flags: review?(jyavenard) → review+
Assignee: nobody → snorp
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 42
Karl, can you test on your device please?
Flags: needinfo?(kdubost)
Awesome, thanks.
Status: RESOLVED → VERIFIED
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: