Closed Bug 1985336 Opened 10 months ago Closed 10 months ago

Sniff Matroska content to set correct mime type

Categories

(Core :: Audio/Video: Playback, task, P1)

task

Tracking

()

RESOLVED FIXED
144 Branch
Tracking Status
firefox144 --- fixed

People

(Reporter: alwu, Assigned: alwu)

References

(Blocks 2 open bugs)

Details

Attachments

(4 files)

We need to let nsMediaSniffer know how to detect Matroska content.

Depends on: 1985164

We can use nestegg to sniff the doc type and determine
whether the content is Matroska. However, at this stage we
cannot distinguish between audio and video; that will be handled
during demuxing. For now, we always return a video MIME type.

Since MKV cannot yet be demuxed, we are unable to record codec usage in the codec_used [1] probe.
That probe will only reflect MKV usage once the MKV demuxer is implemented.

For now, we introduce a temporary probe to collect MKV usage data. This probe can be removed once codec_used includes MKV.

[1] https://searchfox.org/firefox-main/rev/856a307913c2b73765b4e88d32cf15ed05549cae/dom/media/metrics.yaml#690-706

This file contains a Matroska doc type but uses a .webm extension.
Before adding Matroska sniffing, the correct MIME type could not be
determined by nsMediaSniffer, so it defaulted to the extension (.webm).

After the change, it will be detected as Matroska, which results in
playback failure since Matroska is not yet supported.

As this file is essentially Matroska, it should be re-enabled in bug
1985419 once Matroska support is implemented.

Blocks: 1985419
Pushed by smolnar@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/1d12198024e9 https://hg.mozilla.org/integration/autoland/rev/f16328906b1d Revert "Bug 1985336 - part3 : disable `bug1377278.webm`. r=media-playback-reviewers,padenot" for causing xpc failures @ test_mediasniffer_ext.js
Flags: needinfo?(alwu)
Regressions: 1986414
See Also: → 1718468
Duplicate of this bug: 1718468
No longer duplicate of this bug: 1718468
QA Whiteboard: [qa-triage-done-c145/b144]
See Also: → 2010461
See Also: → 2016198
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: