I know that ffmpeg is deprecated in Ubuntu in favour of Libav, but compiling is a good way to get a fully functioning opus encoder/decoder integrated into ffmpeg itself. You can then use it to convert files (first to wav) and then to .opus. The documentation installed with libopus and ffmpeg will reveal all the options that can be used to convert files.