37
rated 0 times
[
37]
[
0]
/ answers: 1 / hits: 45569
/ 1 Year ago, thu, january 19, 2023, 1:06:10
For testing, I want to convert an MP3 and WAV file I have to Opus, what are the steps to doing this?
More From » conversion
For testing, I want to convert an MP3 and WAV file I have to Opus, what are the steps to doing this?
In newer Ubuntu releases the Opus codec is included in the libavcodec libraries that will be installed with ffmpeg. Audio encoding is then done with
ffmpeg -i infile.ext <options> outfile.opus
The audio converter shipped with the opus-tools can convert audio in raw, wave or AIFF format. The minimal syntax uses default settings:
opusenc input.wav output.opus
We may want to add a better bitrate as the default 96 kbps with the option --bitrate N.nnn
(for all options consult the manpage for opusenc).
To convert mp3 "on the fly". i.e. without creating a temporary file we can pipe the output from ffmpeg to opusenc like this:
ffmpeg -i input.mp3 -f wav - | opusenc --bitrate 256 - output.opus