Closed Bug 1988848 Opened 8 months ago Closed 8 months ago

Support more codecs in Matroska (Opus, Vorbis, VP8, VP9, AV1, and HEVC)

Categories

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

task

Tracking

()

RESOLVED FIXED
145 Branch
Tracking Status
firefox145 --- fixed

People

(Reporter: alwu, Assigned: alwu)

References

(Blocks 1 open bug)

Details

Attachments

(7 files)

Currently we already have AVC and AAC support in Matroska, I'm going to add more codecs in this bug.


In this bug, we will add support for Opus, Vorbis, VP8, VP9, AV1, and HEVC in Matroska. FLAC and MP3 are not included yet, as they require additional plumbing and have very limited usage.

This seems especially important since existing code seems to expect supported codecs to work across all (supported) containers: https://github.com/jellyfin/jellyfin-web/blob/6c3a3a7205e543bca2eece03984a8fc93d9afd89/src/scripts/browserDeviceProfile.js#L614
In this case Jellyfin specifically would assume every codec that works in mp4 also works in matroska. Missing support could therefore break playback in this case at least (not sure about other apps, this is the only peoductive mime checking code I know, but it might also affect other apps). So it might be good to have it done until it ships in non-nightly.

Attached image mkv_codec_usage.png β€”

Per our initial Glean probe, we will start adding HEVC, VPX, Opus, AV1 and Vorbis support in this bug.

Also replace a new test file output_hevc.mkv because the old
one is gbrp which we don't support. The new one is yuv420.

Also change the vp9 test file from grba to yuv420.

Also changed the test file from gbrp to yuv420.

Per [1], x-matroska is a legacy MIME type, and the updated MIME type removes
the x prefix. We should support both.

We’ve also added new test cases to verify that using these MIME types with
HTMLMediaElement.canPlayType() returns the correct result.

[1] https://www.rfc-editor.org/rfc/rfc9559#name-media-types

Pushed by alwu@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/aaeea8540d0a https://hg.mozilla.org/integration/autoland/rev/b25e77301dfc part1 : add opus to Matroska supported codecs. r=media-playback-reviewers,padenot https://github.com/mozilla-firefox/firefox/commit/968994015f08 https://hg.mozilla.org/integration/autoland/rev/842bfea9b76e part2 : add hevc to Matroska supported codecs. r=media-playback-reviewers,padenot https://github.com/mozilla-firefox/firefox/commit/e6a54251e126 https://hg.mozilla.org/integration/autoland/rev/fc1286db447f part3 : add vp8 and vp9 to Matroska supported codecs. r=media-playback-reviewers,padenot https://github.com/mozilla-firefox/firefox/commit/c9dfdedd2212 https://hg.mozilla.org/integration/autoland/rev/ab76a4cb594e part4 : add vorbis to Matroska supported codecs. r=media-playback-reviewers,padenot https://github.com/mozilla-firefox/firefox/commit/c671a8443e9a https://hg.mozilla.org/integration/autoland/rev/a3067fb26c56 part5 : add av1 to Matroska supported codecs. r=media-playback-reviewers,padenot https://github.com/mozilla-firefox/firefox/commit/1ccca6b0ac75 https://hg.mozilla.org/integration/autoland/rev/9f90fc06a565 part6 : ensure both current and legacy Matroska mime type work r=media-playback-reviewers,padenot
Pushed by chorotan@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/7c174f2a0cdc https://hg.mozilla.org/integration/autoland/rev/592f88b586e4 Revert "Bug 1988848 - part6 : ensure both current and legacy Matroska mime type work r=media-playback-reviewers,padenot" for causing xpcshell failures on test_mediasniffer_ext.js

Backed out for causing xpcshell failures

Backout link

Push with failures

Failure log

Flags: needinfo?(alwu)
Flags: needinfo?(alwu)
Pushed by alwu@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/f5d7f93eeccd https://hg.mozilla.org/integration/autoland/rev/b166d3bd8d53 part1 : add opus to Matroska supported codecs. r=media-playback-reviewers,padenot https://github.com/mozilla-firefox/firefox/commit/313ac2e27f5a https://hg.mozilla.org/integration/autoland/rev/e65f4b93eeab part2 : add hevc to Matroska supported codecs. r=media-playback-reviewers,padenot https://github.com/mozilla-firefox/firefox/commit/d34529210eb4 https://hg.mozilla.org/integration/autoland/rev/fa804997096d part3 : add vp8 and vp9 to Matroska supported codecs. r=media-playback-reviewers,padenot https://github.com/mozilla-firefox/firefox/commit/a00f53beaa46 https://hg.mozilla.org/integration/autoland/rev/a524c8ade3d6 part4 : add vorbis to Matroska supported codecs. r=media-playback-reviewers,padenot https://github.com/mozilla-firefox/firefox/commit/03ecf5752ef1 https://hg.mozilla.org/integration/autoland/rev/b9cc4b3c7471 part5 : add av1 to Matroska supported codecs. r=media-playback-reviewers,padenot https://github.com/mozilla-firefox/firefox/commit/2c971d7076cb https://hg.mozilla.org/integration/autoland/rev/cd184ca12a25 part6 : ensure both current and legacy Matroska mime type work r=media-playback-reviewers,padenot
Duplicate of this bug: 1988450
Duplicate of this bug: 1988676
Summary: Support more codecs in Matroska → Support more codecs in Matroska (Opus, Vorbis, VP8, VP9, AV1, and HEVC)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: