Page MenuHomePhabricator

Support for Opus audio format
Closed, ResolvedPublic

Description

“Opus is an open and royalty-free lossy audio compression format.” [1] Since 2012-09, it is an IETF standard.

Support in MediaWiki would be awesome.

[1] https://en.wikipedia.org/wiki/Opus_%28audio_format%29


Version: unspecified
Severity: enhancement

Related Objects

StatusSubtypeAssignedTask
ResolvedNone
ResolvedNone
ResolvedRobH
Resolved brooke
Resolved brooke
OpenNone
ResolvedTheDJ
ResolvedNone
ResolvedNone
ResolvedNone
ResolvedNone
Resolvedhashar
ResolvedNone
ResolvedNone
ResolvedNone
ResolvedNone
ResolvedNone
ResolvedNone
ResolvedNone
ResolvedNone
ResolvedNone
ResolvedNone
ResolvedNone
ResolvedNone
ResolvedNone
ResolvedNone
ResolvedNone
ResolvedNone
Resolved brooke
Resolved brooke
ResolvedNone
Resolved brooke
ResolvedJoe
Resolved tstarling
ResolvedJoe
Resolved brooke

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 12:49 AM
bzimport set Reference to bz40193.
bzimport added a subscriber: Unknown Object (MLST).

Couple of things to do here probably:

  • add the .opus extension & "audio/ogg; codecs=opus" mime type to our lists
  • make sure that .opus files that get uploaded keep their .opus extensions and don't get renamed as .ogg or something
  • support in TimedMediaHandler to play them in supporting browsers (how to check?)
  • support in TimedMediaHandler to transcode .opus to other format(s) for non-supporting browsers

And of course.... deploy TimedMediaHandler (bug 27699).

mdale wrote:

As of firefox 15:

var dummyvid = document.createElement( "video" );
dummyvid.canPlayType( 'audio/ogg;codecs=opus' );
"probably"

Yes, once we get 27699 out of the way, we can enable opus, mp3 and h.264 transcodes and playback relatively easily, since the mechanics for source stream switching and client feature support detection are already supported for the existing set of codecs that we support.

Since TMH is deployed, is Opus transcode and playback possible?

Opus can now be forced into the OGG container, but the Wiki servers have problems detecting the codec. Also playback is limited in some browsers (chrome at least).

https://commons.wikimedia.org/wiki/File:Sound_of_the_bells_of_Sveta_Nedelya_in_Sofia_2012_PD.ogg

(In reply to Marco from comment #4)

Opus can now be forced into the OGG container, but the Wiki servers have
problems detecting the codec. Also playback is limited in some browsers
(chrome at least).

https://commons.wikimedia.org/wiki/File:
Sound_of_the_bells_of_Sveta_Nedelya_in_Sofia_2012_PD.ogg

Note that Chrome as of version 38 plays this opus-in-ogg file natively just fine. Yay upgrades over time!

I also have Opus support in ogv.js, so once that lands we should have working playback in Safari 6.1+ and IE 10+ as well, with or without Vorbis transcodes.

You can upload the file here
https://commonsarchive.wmflabs.org

And add the template:
{{Commons Archive|My_raw_file.opus}}

in your media in commons, look this example with NEF file:
https://commons.wikimedia.org/w/index.php?title=File:Agraulis_vanillae_at_Isla_Margarita.jpg&action=edit

You can upload the file here ...

Which completely mitigates the advantages of opus. commonsarchive should only be used to archive raw data like hdr for images (or zip archives are allowed as well,I think)
But you can already upload raw wave files directly to commons so commonsarchive is not useful for audio files.

TheDJ set Security to None.
TheDJ moved this task from To sort to Format support on the TimedMediaHandler board.

Ok, so these days everything works with Opus-in-Ogg uploaded as .ogg or .oga extension, but we don't accept the .opus extension. Should be an easy fix.

Change 248703 had a related patch set uploaded (by TheDJ):
Add file extension mapping for opus

https://gerrit.wikimedia.org/r/248703

Change 248704 had a related patch set uploaded (by TheDJ):
Add opus to accepted file extensions

https://gerrit.wikimedia.org/r/248704

Change 248703 merged by Brion VIBBER:
Add file extension mapping for opus

https://gerrit.wikimedia.org/r/248703

Change 248704 merged by jenkins-bot:
Add opus to accepted file extensions Depends on: I7c3cba909

https://gerrit.wikimedia.org/r/248704

Ok this is merged. :D Should go out next week or the week after (I'm a little vague on deployment schedules this month, there's US Thanksgiving holiday later in the month)

  NODES
Note 4
Project 6