FFmpeg - Encode Theora

From PiRho Knowledgebase
Revision as of 15:55, 14 March 2026 by Dex (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Theora is a free, open, open‑source video codec developed by the Xiph.org Foundation. FFmpeg fully supports encoding to Theora through the libtheora encoder, provided your FFmpeg build is compiled with the correct external libraries.

Basic Usage

The simplest way to encode a video to Theora:

``` ffmpeg -i <input.file> -c:v libtheora -qscale:v 10 <output.file> ```

Recommended Audio Settings (Optional)

If you want to output Ogg Theora + Vorbis:

``` ffmpeg -i <input.file> -c:v libtheora -qscale:v 7 -c:a libvorbis -qscale:a 5 output.ogv ```

Two-Pass Encoding

Pass 1: ``` ffmpeg -i input.mkv -c:v libtheora -qscale:v 7 -pass 1 -an -f ogg /dev/null ``` Pass 2: ``` ffmpeg -i input.mkv -c:v libtheora -qscale:v 7 -c:a libvorbis -qscale:a 5 -pass 2 output.ogv ```

Reference

  • FFmpeg Wiki — A Brief Theora and Vorbis Encoding Guide