The Theora video format, Vorbis audio format, and Ogg container format were developed by Xiph.org as free and open-source media formats. FFmpeg can create these formats by using the external encoding libraries libtheora and libvorbis.
To use these encoders make sure your ffmpeg build has been compiled with --enable-libtheora --enable-libvorbis or see the output of ffmpeg -codecs. If you want to compile ffmpeg to support these encoders see the various FFmpeg Compilation Guides for detailed instructions.
libvorbis is usually recommended over the experimental, native FFmpeg Vorbis audio encoder (-codec:a vorbis -strict experimental) since it does not provide comparable quality to libvorbis.
Variable Bitrate (VBR) ffmpeg -i input.mkv -codec:v libtheora -qscale:v 7 -codec:a libvorbis -qscale:a 5 output.ogvNote: if you omit -codec:a libvorbis then ffmpeg will default to the native FFmpeg flac audio encoder for ogg/ogv output container.