Summary: | Decoding webm file with more than 2 channels will fail | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Jean-Yves Avenard [:jya] <jean-yves.avenard> | ||||
Component: | Web Audio | Assignee: | Jean-Yves Avenard [:jya] <jean-yves.avenard> | ||||
Status: | NEW --- | ||||||
Severity: | Normal | CC: | cdumez, eric.carlson, ews-watchlist, glenn, hartman.wiki, jer.noble, padenot, philipj, sergio, webkit-bug-importer | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | Other | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Bug Depends on: | |||||||
Bug Blocks: | 227111 | ||||||
Attachments: |
|
Description
Jean-Yves Avenard [:jya]
2021-08-20 00:58:21 PDT
Created attachment 437580 [details]
Patch
Comment on attachment 437580 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=437580&action=review > Source/WebCore/platform/graphics/cocoa/WebMAudioUtilitiesCocoa.mm:175 > + setVorbisChannelMap(layout, cookie.channelCount); Why do you set the *Vorbis* channel map with an Opus cookie? A comment would be helpful. Comment on attachment 437580 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=437580&action=review > Source/WebCore/platform/graphics/cocoa/WebMAudioUtilitiesCocoa.mm:176 > + m_channelLayout = layout; https://datatracker.ietf.org/doc/html/rfc7845#section-5.1.1.2 mapping family one uses the vorbis layout. Comment on attachment 437580 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=437580&action=review >> Source/WebCore/platform/graphics/cocoa/WebMAudioUtilitiesCocoa.mm:176 >> + m_channelLayout = layout; > > https://datatracker.ietf.org/doc/html/rfc7845#section-5.1.1.2 > > mapping family one uses the vorbis layout. Yes, my point is that someone unfamiliar with the RFC may be confused by code so a comment would be helpful. This problem still exists: Example: https://upload.wikimedia.org/wikipedia/commons/d/d3/Elephants_Dream_%282006%29.120p.vp9.opus.multichannel.webm No downsampling occurs and video playback fails. Because canPlayType passes, no fallback can occur to another source (like webm vp8, vorbis) either, creating a broken experience for the user. This is unfortunate as multichannel is supported by the format and it means that for Wikimedia we will now have to downsample all our derivatives/transcodes to stereo, if we do not want such files to break on macOS. This denies users of Chrome and Firefox the benefit of proper multichannel sound. Last tested on Safari 15.4 and STP 142, macOS 12.3 on a MacBook Pro from 2021. Wikimedia ticket: https://phabricator.wikimedia.org/T304624 (In reply to Derk-Jan Hartman from comment #6) > This problem still exists: > Example: > https://upload.wikimedia.org/wikipedia/commons/d/d3/ > Elephants_Dream_%282006%29.120p.vp9.opus.multichannel.webm > It still exists because it hasn’t been fixed. The framework decoder unfortunately lacks the ability to decode more than 2 channels file *** Bug 241220 has been marked as a duplicate of this bug. *** |