Converting Videos

From Thrive Developer Wiki
Revision as of 18:35, 6 December 2019 by Hhyyrylainen (talk | contribs) (Created page with "Thrive requires a video to be in a matroska container (.mkv) in av1 video format with vorbis audio. Note: this first approach can result in broken colours. It's possible to d...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Thrive requires a video to be in a matroska container (.mkv) in av1 video format with vorbis audio.

Note: this first approach can result in broken colours. It's possible to do everything with FFmpeg in one go:

ffmpeg -i input_file.mkv -c:v libaom-av1 -crf 32 -b:v 0 -c:a libvorbis -strict experimental -row-mt 1 -tiles 4x1 result.mkv

A more complex, but working approach (you need to find a new enough aomenc from somewhere):

ffmpeg -i some_file.mkv -pix_fmt yuv420p -o temp.y4m
aomenc temp.4ym -o output.webm --threads=10 --cpu-used=5 --tile-columns=2 --cq-level=30
ffmpeg -i output.webm -i some_file.mkv -c:v copy -c:a libvorbis -map 0:v:0 -map 1:a:0 result.mkv

The second command can be substituted with:

or aomenc temp.y4m -o output.webm --threads=10 --cpu-used=5 --tile-columns=2 --cq-level=30 --passes=1

which creates a much lower quality image but doesn't take hours to run.