7

How can I get Audacity to work with Opus files? Is there a plugin I can get?

I've heard that I can point Audacity to a framework for encoding/decoding and delegate the work to the framework, since Audacity doesn't support .opus yet.

How should I go about adding .opus support to Audacity?

Edit 0: (After trying the external program and the file not appearing): Export Audio Program Output

Edit 1: After Recompiling A file with the file name now appears in the folder, but it appears to be unplayable. After Recompiling

Sarah Szabo
  • 1,513
  • 8
  • 30
  • 59

3 Answers3

6

As Doug has pointed out Audacity has the ability to easily import Opus files under Ubuntu 17.04 and also the ability to export as Opus with a small work around. To illustrate:

1. Importing Opus Files with Audacity

Audacity easily imports Opus files either by:

  1. Drag and drop the Opus files directly onto the main Audacity window
  2. File --> Import --> Audio from the Audacity main window

This has tested without flaw on my installation of Audacity 2.1.2 under Ubuntu 17.04.

2. Exporting Opus Files with Audacity

Audacity can export as Opus but does not have the capability to directly export as Opus or to use the conventional 'Custom FFmpeg Export' setting.

Instead go to:

File --> Export --> External Program

and change the Command options to something like the following:

enter image description here

And to make copying and pasting a little easier here is the command line:

ffmpeg -i - -c:a libopus -b:a 128k "%f"

And this should give you the results you are after...

Notes:

andrew.46
  • 39,359
2

There is need for ffmpeg to export opus. First, install opus-tools with:

sudo apt install opus-tools

Then, one can simply use something like:

opusenc --bitrate 192 - "%f".ogg

instead of the ffmpeg command.

This works fine with Audacity 2.1.3 and opusenc 0.1.9.

EDIT

ffmpeg does not support quality settings for opus. Here is part of the output using today's 3.4 git snapshot of ffmpeg when trying something like

ffmpeg -i - -c:a libopus -q:a 7  "%f"

as command:

[libopus @ 0x3f065c0] No bit rate set. Defaulting to 96000 bps.
[libopus @ 0x3f065c0] Quality-based encoding not supported, please specify a bitrate and VBR setting.
hanky
  • 31
-1

The simple method I use on pc is (this is my method, it hasn't been copied from elsewhere, and I'm on Windows 10 not Ubuntu, but this may help someone):

  • Open Audacity
  • Open your file browser and navigate to the audio file in the Whatsapp Audio folder (whether the file is on your pc, tablet or phone)
  • Click the red record button in Audacity
  • Play the audio file
  • When recording stops, click the square Stop button (important)
  • File / Export / Export as WAV / Save to your computer

If this doesn't work for you, you need to search online re how to set up Audacity to record through your speakers or headset.

Zanna
  • 72,312