Opus audio for Haiku

Opus is a totally open, royalty-free, highly versatile audio codec. Opus is unmatched for interactive speech and music transmission over the Internet, but is also intended for storage and streaming applications. It is standardized by the Internet Engineering Task Force (IETF) as RFC 6716 which incorporated technology from Skype’s SILK codec and Xiph.Org’s CELT codec.
Technology

Opus can handle a wide range of audio applications, including Voice over IP, videoconferencing, in-game chat, and even remote live music performances. It can scale from low bit-rate narrowband speech to very high quality stereo music. Supported features are:

Bit-rates from 6 kb/s to 510 kb/s
Sampling rates from 8 kHz (narrowband) to 48 kHz (fullband)
Frame sizes from 2.5 ms to 60 ms
Support for both constant bit-rate (CBR) and variable bit-rate (VBR)
Audio bandwidth from narrowband to fullband
Support for speech and music
Support for mono and stereo
Support for up to 255 channels (multistream frames)
Dynamically adjustable bitrate, audio bandwidth, and frame size
Good loss robustness and packet loss concealment (PLC)
Floating point and fixed-point implementation

You can read the full specification, including the reference implementation, in RFC 6716. An up-to-date implementation of the Opus standard is also available from http://www.opus-codec.org/.

I believe that Opus support comes from FFMPEG…

The first step to getting this included with Haiku is to create a haikuporter recipe for libopus. Once that is available it can be included as a dependency for ffmpeg and thus included into Haiku applications like MediaPlayer.

I don’t think so. Usually ffmpeg has its own codecs, and doesn’t use any of libvorbis, libmpc, and friends.

So, you have two ways to do this: either port a newever version of ffmpeg that has libopus support, and update our ffmpeg add-on to be compatible with it. Or, port libopus and write a media kit decoder using it.

The media decoder side currently has to happen in Haiku sources, as we don’t export the API for these yet. The recipes are done at haikuports.