How do I install the opus audio encoder?

Solution 1:

The opus audio codecs are installed with the following packages:

  • libogg0 (>= 1.3.0)
  • libopus0
  • opus-tools

All these packages are already built ready to be available for Ubuntu 12.10 alpha and can be downloaded from the mirrors.

However be warned: if you downloaded these not yet fully tested packages and installed them manually in an earlier Ubuntu release you may break your sound system in case there are incompatibilites. This may especially be true for the Ogg library as the upgraded version replaces the previous installed older version.

Solution 2:

This is an older question but times have indeed changes and with Trusty Tahr now you have a few easier choices:

  1. Install the opus-tools package:

    sudo apt-get install opus-tools
    

    and then create opus files from the commandline:

    opusenc --bitrate 128 input.wav output.opus  
    
  2. Install the libav-tools package:

    sudo apt-get install libav-tools
    

    and then create your opus files from the commandline:

    avconv -i input.wav -c:a libopus -b:a 128k output.opus
    

Newer versions of Ubuntu can now use FFmpeg rather than avconv, but still using the external libopus library...