Page MenuHomePhabricator

Support upload of audio-only WebM files (Vorbis audio track but no video)
Closed, ResolvedPublic


Currently the WebM handling seems to assume there will be a video stream; however .webm files may be audio-only as well (in which case it's a Vorbis, or potentially maybe Opus audio track with no video).

Currently I can upload such a file, but I get some bad behavior as a result.

Compare audio-only .webm:

versus audio-only .ogg:
  • Nasty warnings visible during display of the file page, and parsing of a page that embeds:

    Notice: Undefined index: video in /srv/vagrant/mediawiki/extensions/TimedMediaHandler/handlers/WebMHandler/WebMHandler.php on line <i>123</i>
  • File page's info marks it as 'audio/video file' and gives empty dimensions where it should be 'audio file' with no dimensions

    "(WebM audio/video file, Vorbis, length 5 min 19 s, 0 × 0 pixels, 256 kbps overall)"
  • Embedded player is marked as video, has a tiny audio icon thumbnail, and seems to be not initialized properly
  • Media type returned from API is 'VIDEO', not 'AUDIO':

  • No .ogg transcode is made (not sure if that's really necessary; I can extend ogv.js to support webm containers for the browsers that don't do WebM natively)

Version: unspecified
Severity: normal



Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:48 AM
bzimport set Reference to bz72996.
bzimport added a subscriber: Unknown Object (MLST).
brion created this task.Nov 5 2014, 12:32 AM

1: Warnings, fixed by Reedy due from Bug 73112
2: The MimeMagic.php of core is not able to recognize the contents of WebM files and thus will always set video/webm, VIDEO, it does not have a separate desc. for <audio> variants of webm.
3: Got a patch coming up
4: See 2
5: No idea...

Change 174325 had a related patch set uploaded by TheDJ:
Support WebM Vorbis files in the player

Change 174325 merged by jenkins-bot:
Support WebM Vorbis files in the player

So 3 is solved now !

We probably have a few more codec variants like webm opus with similar problems, and that whole part of the code for 'player selection' seems a bit shaky to me to begin with...

Brion, would you have a webm opus example ?

Also, for VP9 (bug 61805) a similar patch as for 3 is likely required.

Gilles triaged this task as Low priority.Nov 24 2014, 1:36 PM
Gilles added a subscriber: Gilles.
Jdforrester-WMF moved this task from Untriaged to Backlog on the Multimedia board.Sep 4 2015, 6:08 PM
Restricted Application added subscribers: Matanya, Aklapper. · View Herald TranscriptSep 4 2015, 6:08 PM
brion closed this task as Resolved.Oct 12 2015, 4:01 AM
brion claimed this task.

Ok since we got opus infrastructure up, this works now with both vorbis- and opus-encoded audio-only webms :D

Closing resolved.