Is there a converter that can convert MP3 files to Ogg Opus?
Can you recommend one that can do it?
So far I've tried Adobe Audition, Xilisoft Audio Converter Pro, WinAVI Video Converter, and Aimersoft Video Converter Pro. None of them was useful.
Is there a converter that can convert MP3 files to Ogg Opus?
Can you recommend one that can do it?
So far I've tried Adobe Audition, Xilisoft Audio Converter Pro, WinAVI Video Converter, and Aimersoft Video Converter Pro. None of them was useful.
The easiest option is a command like this
ffmpeg -i input.mp3 -c:a libopus output.opus
But there is a selection of parameters you can tweak, all documented here.
E.g. I use the following command to compress audiobooks/podcasts (the resulting ~32 kbps OPUS files sound indistinguishable from 192 kbps MP3):
ffmpeg -i input.mp3 -c:a libopus -b:a 32k -vbr on -compression_level 10 -frame_duration 60 -application voip output.opus
-b:a 32k
sets bitrate to 32 kbps (or about 35 kbps in case of VBR), it can be reasonable to use 128k to compress music given a lossless (or a 320k MP3) original or 64k to compress music given a 192k MP3 original-vbr on
turns variable bitrate mode on (may increase quality at cost of a using some additional kbits for some seconds)-compression_level 10
commands to favour quality over compression speed-frame_duration 60
increases quality at cost of 40 additional milliseconds of latency-application voip
asks to do the best possible to save speech intelligibility, use -application audio
for musicYou can convert a set of many files this way in bash:
for f in *.mp3; do ffmpeg -i "$f" -c:a libopus "${f%.*}.opus"; done
NOTE: FFmpeg multithread -thread n
argument is ignored when encoding OPUS files.
Install GNU parallel, FFmpeg, and MP3 with Opus codecs
sudo apt install -y parallel ffmpeg libmp3lame libopus
Recursive and using all CPUs:
find -iname "*.mp3" -type f
Find all MP3 files in whole directoryparallel -I% --max-args 1
Prepare parallel
to use %
char as argument for file path saving-c:a opus
Set OPUS as encoder-strict -2
Enable FFmpeg to work with OPUS encoder-b:a 128K -vbr on
Set OPUS at 128 KB/s (VBR) that is enough to store stereo music-map_metadata 0
Copy tags from MP3 to OPUS file-compression_level 10
Favour quality over compression speed-y
Overwrite OPUS file if already existstouch -r % %.opus
Use MP3 file's times instead of newly created filesrm -vf %
Remove MP3 filefind -iname "*.mp3" -type f | parallel -I% --max-args 1 \
"ffmpeg -i % -strict -2 -c:a opus -b:a 128K -vbr on -map_metadata 0 -compression_level 10 -y %.opus;touch -r % %.opus;rm -vf %"
NOTE: Don't use -frame_duration
argument for mixing audio purposes
© 2022 - 2024 — McMap. All rights reserved.