Closed Bug 1211802 Opened 9 years ago Closed 9 years ago

Firefox does not sniff MP4 files whose main brand is "isom"

Categories

(Core :: Audio/Video: Playback, defect, P2)

41 Branch
defect

Tracking

()

RESOLVED FIXED
mozilla45
Tracking Status
firefox45 --- fixed

People

(Reporter: rukmi.patel, Assigned: jhlin)

References

Details

(Keywords: regression)

Attachments

(2 files, 1 obsolete file)

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:41.0) Gecko/20100101 Firefox/41.0
Build ID: 20150929144111

Steps to reproduce:

1) Create simple HTML page.
2) Create Video Tag and add source tag to it. <source src="http://a35080557e7a03b9f1f1-86aee789662273f4e4ffb1bc62c5c3ee.r62.cf3.rackcdn.com/1444113172a.mp4" type='video/mp4' />
3) Run this in mozilla 41.


Actual results:

Mozilla v41 Does not load/Play video in HTML5 video tag. 


Expected results:

It should support Rackpsace CDN URL and play video in HTML5 video tag.
Severity: normal → blocker
Has Regression Range: --- → yes
Severity: blocker → normal
Status: UNCONFIRMED → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
Reopening because bug 975809 is supposed to be fixed.
Status: RESOLVED → UNCONFIRMED
Resolution: DUPLICATE → ---
Component: Untriaged → Audio/Video: Playback
Product: Firefox → Core
Confirmed in Firefox 41.0.1, i think that not reconize the format.

I've only opened the url in a new window.
Status: UNCONFIRMED → NEW
Ever confirmed: true
(In reply to Daniele "Mte90" Scasciafratte from comment #3)
> I've only opened the url in a new window.

It doesn't make sense. Firefox (and other browsers) will sniff in a different manner when the resource is loaded via <video> tag.
Your jsfiddle is wrong. The <source> element must be enclosed with the <video> element.
Looks like this MP4 file has "isom" main brand. According to the mimesniff standard, our current behavior is correct. But...
Summary: HTML 5 Video Tag + Rackspace CDN url is not working → Firefox does not sniff MP4 files whose main brand is "isom"
Update jsfiddle: https://jsfiddle.net/x9bf382s/1/
On Chrome work but not on Firefox
Bug 868333 removed "isom" from the signature table. Why did we remove it?
Blocks: 868333
Flags: needinfo?(jolin)
Keywords: regression
Attached patch Recognize 'avc?' as mp4 video (obsolete) — Splinter Review
(In reply to Masatoshi Kimura [:emk] from comment #9)
> Bug 868333 removed "isom" from the signature table. Why did we remove it?

 From my understand, 'isom' alone doesn't identify specific file type [1].

 However, 1444113172a.mp4 lists 'avc1' as compatible brand and IMHO can be considered as a legitimate mp4 video [2]. Let's add it to the pattern matching table.

[1] http://standards.iso.org/ittf/PubliclyAvailableStandards/c061988_ISO_IEC_14496-12_2012.zip, Appendix E.
[2] ISO/IEC 14496 Part 15.
Flags: needinfo?(jolin)
Attachment #8672466 - Flags: review?(cpearce)
Comment on attachment 8672466 [details] [diff] [review]
Recognize 'avc?' as mp4 video

Review of attachment 8672466 [details] [diff] [review]:
-----------------------------------------------------------------

-> jya, who has more MP4 expertise than I.
Attachment #8672466 - Flags: review?(cpearce) → review?(jyavenard)
Priority: -- → P2
Comment on attachment 8672466 [details] [diff] [review]
Recognize 'avc?' as mp4 video

Review of attachment 8672466 [details] [diff] [review]:
-----------------------------------------------------------------

Sorry for the delay.

I don't understand why we would reach the sniffer code when the mimetype is clearly defined. Seems totally redundant to me with the work performed by the MP4Metadata class (and it does a much more thorough job at testing the MP4)

So on that basis, whatever is in nsMediaSniffer for MP4 is IMHO irrelevant and should be removed.
Attachment #8672466 - Flags: review?(jyavenard) → review+
(In reply to Jean-Yves Avenard [:jya] from comment #12)
> I don't understand why we would reach the sniffer code when the mimetype is
> clearly defined. Seems totally redundant to me with the work performed by
> the MP4Metadata class (and it does a much more thorough job at testing the
> MP4)
> 
> So on that basis, whatever is in nsMediaSniffer for MP4 is IMHO irrelevant
> and should be removed.

No, this behavior matches the spec (except that "avc?" is not defined as the signature for MP4).
The type element of the source attribute is used by the user-agent to determine if the resource is supported *before* fetching the resource [1]. Once the resource is loaded, the format is determined by the mimesniff spec [2]. The sniffed mime type takes precedence over the supplied mime type in audio or video context unless the supplied MIME type is an XML type [3].

[1] https://html.spec.whatwg.org/multipage/embedded-content.html#loading-the-media-resource:attr-source-type
[2] https://html.spec.whatwg.org/multipage/embedded-content.html#loading-the-media-resource:media-resource-4
[3] https://mimesniff.spec.whatwg.org/#sniffing-in-an-audio-or-video-context
John - is there a reason not to land this now?
Flags: needinfo?(jolin)
My bad. I just completely forgot about it since it's not listed in my dashboard. Will take care of it ASAP. Deeply sorry about that.
Flags: needinfo?(jolin)
Attachment #8672466 - Attachment is obsolete: true
Comment on attachment 8686412 [details] [diff] [review]
Recognize 'avc?' as mp4 video. r=jya

Carry r+ from jya.
Attachment #8686412 - Flags: review+
https://hg.mozilla.org/mozilla-central/rev/aeb7ece8cbd4
Status: NEW → RESOLVED
Closed: 9 years ago9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: