After hours of trial and error, I've managed to figure it out.
Write a bash script in a separate file, like `ffmpeg-opus.sh`:
#!/bin/bash
for file; do
ffmpeg -i "$file" -ab 128k "${file%.*}".opus
done
And create a command for it in `vifmrc`:
command opus ffmpeg-opus.sh %f