ffmpeg -i source.wav -c:audio libfdk_aac -profile:a aac_he_v2 -ab 48k output.m4a (or aac_he_v1)
-c:a libopus -b:a 64k (or 48k)
AAC at 64Kbit sounds more or less like CD audio, Opus at the same bitrate sounds like MP3 at 80Kbit/sec.
You might also want to try out opus-tools instead of libopus in ffmpeg. It might not be using 20ms frames in ffmpeg.
Indeed, ffmpeg uses 10 ms frames for Opus. We do not know why they're doing this, but it's sub-optimal. You can get higher quality with 20 ms frames.
QuoteIndeed, ffmpeg uses 10 ms frames for Opus. We do not know why they're doing this, but it's sub-optimal. You can get higher quality with 20 ms frames.Is there already a bug logged for this at ffmpeg? I'm struggling to find anything on the ffmpeg bug list.
D:\>ffmpeg.exe -i test.wav -c opus test.opus....D:\>opusinfo.exe test.opusProcessing file "test.opus"...New logical stream (#1, serial: f68e8976): type opusEncoded with Lavf55.21.102User comments section follows... encoder=Lavf55.21.102Opus stream 1: Pre-skip: 312 Playback gain: 0 dB Channels: 2 Original sample rate: 48000Hz Packet duration: 20.0ms (max), 20.0ms (avg), 20.0ms (min) Page duration: 1000.0ms (max), 997.1ms (avg), 120.0ms (min) Total data length: 3778579 bytes (overhead: 0.728%) Playback length: 5m:06.102s Average bitrate: 98.75 kb/s, w/o overhead: 98.03 kb/sLogical stream 1 ended
I tested latest ffmpeg from git builded with libopus v1.1-rc. It uses 20ms frames...