Closed Bug 1778333 Opened 2 years ago Closed 2 years ago

Opus in MP4 / ISOBMFF - MediaSource.isTypeSupported('audio/mp4; codecs="Opus"') return false

Categories

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

Firefox 102
defect

Tracking

()

RESOLVED FIXED
106 Branch
Tracking Status
firefox106 --- fixed

People

(Reporter: john, Assigned: chunmin)

References

Details

Attachments

(2 files)

Steps to reproduce:

The MP4 Registration Authority lists "Opus" as a supported codec (with a capital letter "O"): https://mp4ra.org/#/codecs

RFC 6381 states:

For the ISO Base Media File Format, and the QuickTime movie file format, the first element of a 'codecs' parameter value is a sample description entry four-character code as registered by the MP4 Registration Authority [MP4RA]. Values are case sensitive.

From my reading of this, a correct MIME type for Opus in an MP4 file should use the string 'codecs="Opus"', not 'codecs="opus"'.

To reproduce, open the developer console and paste the following:

MediaSource.isTypeSupported('audio/mp4; codecs="Opus"');

Actual results:

The function returns false.

Expected results:

The function should return true, since "Opus" is the code registered by the MP4 Registration Authority.

I should probably mention, I think the codec name "Opus" should be accepted in any API that accepts "opus", not just MediaSouce.isTypeSupported

The severity field is not set for this bug.
:jimm, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(jmathies)
Assignee: nobody → cchang
Severity: -- → S4
Priority: -- → P2
Flags: needinfo?(jmathies)

I believe what you referred to is https://datatracker.ietf.org/doc/html/rfc6381#section-3.3 and the codecs registered mentioned should be http://mp4ra.org/#/codecs.

MediaSource.isTypeSupported('audio/mp4; codecs="Opus"') fails in Chrome as well, while MediaSource.isTypeSupported('audio/mp4; codecs="opus"') works. That means it can cause a web-compatibility issue if Firefox replaces opus by Opus.

Not sure if it's a historical decision that we should avoid the web-compatibility issue, or the spec is out-dated.

Blocks: media-triage

Chromium has a bug open on the issue - https://bugs.chromium.org/p/chromium/issues/detail?id=1342217&q=opus&can=2

Question: instead of replacing "opus" with "Opus", what about adding it - so that "opus" is accepted for backwards-compatability, as well as "Opus"?

See Also: → 1783453

No updates here, but we've elevated this to our standards group for discussion.

Depends on D156907

No longer blocks: media-triage

The current decision is to accept both Opus and opus. The discussion is here.

Pushed by cchang@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/398caca6d4d7
Replace "opus" by "Opus" in MediaSource's MP4 test r=karlt
https://hg.mozilla.org/integration/autoland/rev/4a2073616531
Accept codecs="Opus" in MP4 r=karlt
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/35854 for changes under testing/web-platform/tests
Status: UNCONFIRMED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 106 Branch
Upstream PR merged by moz-wptsync-bot
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: