Support for Opus audio codec

Issue #1314 open
Muh Muhten
created an issue

It would be nice to have support for the Opus audio codec.

The big advantage here is that Opus is a pretty good speech codec at moderate bitrates (near-transparency for speech claimed at 24-32kbps), which can save a fair bit of space for voicing.

It also achieves similar quality at substantially lower bitrates vs vorbis &c. for general audio. Some other properties like latency which could plausibly be useful if someone wanted to implement in-game voice chat, I guess.

Some POC integration with OpenAL.

License is identical to Vorbis, so it shouldn't be a problem.

Comments (7)

  1. Muh Muhten reporter

    0001-Add-Opus-decoder.patch implements an Ogg Opus decoder which accepts the "opus" extension and seems to generally work, at least on single-stream files.

    Unfortunately I'm not familiar with the build system or the logistics of dependency management here, so it almost certainly won't build. It requires opusfile and libopus (both Xiph libraries which are probably in your repos) in addition to libogg (which is already required for vorbis).

    0002-Just-enough-Xcode-project-mangling-to-build-with-Opu.patch is a horrible hack to make xcode build using libopusfile from /usr/local (e.g. homebrew). Obviously the resulting app isn't portable. Still not sure how to build a framework.

  2. Bart van Strien

    I did some testing and it seems to work fine, but beware of ffmpeg's encoder. I had a (transcoded) file with a negative start timestamp, which opusfile apparently really doesn't like, adding -avoid_negative_ts make_zero got me a file I could play. Given that the official opusfile rejects it, I'm putting the blame on ffmpeg, though.

  3. Log in to comment