Fyrd / caniuse

Raw browser/feature support data from caniuse.com
https://caniuse.com
Creative Commons Attribution 4.0 International
5.6k stars 1.38k forks source link

Opus: Need data for MP4 and WebM containers #6805

Open Artoria2e5 opened 1 year ago

Artoria2e5 commented 1 year ago

Opus has an ISOBMFF (MP4) encapsulation defined in 2016. There may be differences in supporting the base Ogg format, in WebM container, and in the MP4/M4A container. MP4 can reasonably used in the \<audio> tag: M4A/AAC files are an example.

I know that Opus WebM with up to 2 channels is okay in safari, but Opus Ogg is not okay in Safari at all.

nihil-admirari commented 9 months ago
  1. Had success opening Opus in MP4 in Safari on iOS 17.
  2. Opus in WebM doesn't work on iOS..
  3. Support depends on Lockdown Mode being disabled. If Lockdown mode is enabled, even Opus in CAF stops working.

Test files are provided by chromium:

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Opus Test</title>
  <style>
    body {
        display: flex;
        flex-direction: column;
    }
  </style>
</head>
<body>
  Opus in WebM:
  <audio controls
         src="https://raw.githubusercontent.com/chromium/chromium/main/media/test/data/bear-opus.webm">
  </audio>
  Opus in MP4:
  <audio controls
         src="https://raw.githubusercontent.com/chromium/chromium/main/media/test/data/bear-opus.m4a">
  </audio>
</body>
</html>
nihil-admirari commented 9 months ago

Apple officially declared support for Opus in WebM and MP4 in Safari 17 Release Notes:

Added support for stereo-only Opus in MPEG-4 and WebM containers on macOS Sonoma. (50994465)

nihil-admirari commented 6 months ago

Opus in WebM does work on iOS 17.4. Tested on https://hpr.dogphilosophy.net/test/.

Artoria2e5 commented 5 months ago

I wonder if they allow VBR in those containers too -- Opus/CAF support was originally limited to CBR. I should really get a Sonoma machine to test with...

wbob commented 3 months ago

@Artoria2e5 as the audio/webm opus file on the sample page used by @nihil-admirari is a not a Hard-CBR file I'd think so. The sample file to test variable frame size (not to be confused with bitrate) at https://github.com/WebKit/WebKit/commit/b41ec215a5167f97c2297bb8d08ae0390444dc06 too is a VBR file

Edit: I did test VBR playback successfully on iOS 17.5 and confirmed that the audio-blob regression in 17.4 is gone too