Supporting audio codec Opus in Opera 12

So Opus was finally RFC’d and is a mandatory to implement codec in WebRTC. This is truly great stuff! Opus has long worked in Opera in fact, if your system gstreamer actually supported Opus.

So, since Firefox already supports Opus, how do you get Opus codec support in Opera web browser? Well, just install libopus, and you should be good to go.

GStreamer has to be compiled with support for it though, but hopefully most are. I made a bug in Arch Linux for them to fix it, hopefully it’ll get fixed very soonish now (although they were reluctant at the start).

I have Opus running and working in my Opera 12 here :-)

I wrote this a while ago in fact on myopera:

That does in fact work, and has since the since the stable release of gst-plugins-bad 0.10.23 back in 21st of February. That is, as long as Opera doesn’t already “know” it can’t play it (so it won’t feed it to GStreamer for playback). E.g. if you add ‘audio/ogg;codecs=opus’ to Content-Type or query for that via canPlayType(‘audio/ogg;codecs=opus’).

But if it’s sent with Content-Type audio/ogg like in that demo on Mozilla Hacks, it will feed it to GStreamer, which will play it if a) you have gst-plugins-bad 0.10.23 or newer, and you have libopus/opus installed. Many distros have not that at the time. :-)

Anyway, the keyword here is /native/ support, which Firefox 15 has, and we don’t. E.g., most people won’t get Opus playback out of the box.

Leave a Reply

Your email address will not be published.