For testing, I want to convert an MP3 and WAV file I have to Opus, what are the steps to doing this?
Per default the audio converter shipped with the opus-tools can convert audio in raw, wave or AIFF format. The minimal syntax uses default settings:
We may want to add a better bitrate as the default 96 kbps with the option
To convert mp3 "on the fly". i.e. without creating a temporary file we can pipe the output from avconv to opusenc like this:
Ubuntu 14.04 and Debian 8 ship with version 9 of
Example 1: Reencode an audio file as opus
With version 9 of
What the options do
Example 2: Grab the audio from a video file and encode it as opus
Take the second stream of the first input (
With the package
Opus on 12.04
On 12.04 (Precise), however, there are dependency problems with installing the opus codecs and tools, so I have found by far the best solution is the one that has become available very recently: compile the opus audio encoder and decoder as noted here, and build
I know that
When converting files with
You can then test the file created with
There's no need to reproduce the guide here in its entirety, but it's worth noting one or two things:
That's how I do it:
It's super fast! Less than 8 seconds with a complexity of 10 (Encoding computational complexity (0-10, default: 10). Zero gives the fastest encodes but lower quality, while 10 gives the highest quality but slower encoding) and a maximum delay time of 10ms (Maximum container delay in milliseconds (0-1000, default: 1000)), so if you skip time in a song, the clipping effect will have a duration of 10ms so it is inperceptible (try with 1000 and hear the difference skipping time with your mouse). Bitrate is VBR by default. 320kbps worked for me so is optional, play with this number:
By the way, encoding from MP3 to OPUS is not a good idea, it's not going to sound better, their compression algorithms are way too different. But from FLAC or WAV or any other Lossless Audio Format, that's another story.
Note: To encode another file, just press the Up Arrow in the same terminal to call the last command and change the name of the input and output files.