Convert audio to OGG format via Terminal Is there an app or a method that I can use from Terminal to convert audio files to the OGG format?

I know about afconvert but that doesn't provide the ogg format that I want.
Ogg is a container format. It typically uses the Vorbis audio codec. You can download a static build of ffmpeg and use the bundled libvorbis encoder:

ffmpeg -i input.wav -c:a libvorbis -qscale:a 5 output.ogg


According to the Vorbis encoding guide, the quality range is from 0–10, where 10 is the highest quality and 3–6 are a good range to try. In the above example we used 5 as quality.