6

AV1 quick encode with SVT-AV1 · GitHub

 1 year ago
source link: https://gist.github.com/mrintrepide/b3009f5d0f08d437ebbb4c17cbf36e18
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

AV1 quick encode with SVT-AV1 · GitHub

AV1 quick encode with SVT-AV1

SVT-AV1 is the fastest multithreaded AV1 encoder
You can download up to date BtbN ffmpeg build with latest STV-AV1 code.

Aom-av1 is the official av1 decoder/encoder but it's the slowest and lacks of a real massive multithreading.
Rav1e is a xiph encoder project. It's also very slow but you can use multithreading with tiles.
Dav1d is a veryfast AV1 VLC decoder project.

Svt-av1 is an heavy multithreading intel decoder and encoder. It produce good quality but bigger file size.
It can produce 8 and 10 bit video with CRF (default), CQP, VBR and CBR (test).
Two pass are also available with standalone SvtAv1EncApp but not in ffmpeg.

Like HEVC and VP9, 8 bit low bitrate video create banding. 10 bit is prefered. Today intel/amd/nvidia/qualcomm/mediatek hardware video decoder support hevc, vp9 and now av1 10 bit. It produce better dark/black anime scene in 10 bit and smaller file size.

Base ffmpeg

Default:
ffmpeg -i "Input.mkv" -c:v libsvtav1 -crf 35 -preset 6 -c:a libopus -b:a 128k -ac 2 -c:s copy Output.mkv

Optimal 8 bit:
ffmpeg -i "Input.mkv" -c:v libsvtav1 -crf 35 -preset 6 -svtav1-params tune=0 -g 240 -c:a libopus -b:a 128k -ac 2 -c:s copy Output.mkv

Optimal with 10 bit:
ffmpeg -i "Input.mkv" -pix_fmt yuv420p10le -c:v libsvtav1 -crf 35 -preset 6 -svtav1-params tune=0 -g 240 -c:a libopus -b:a 128k -ac 2 -c:s copy Output.mkv

-pix_fmt yuv420p10le convert input video to 10 bit format
-g 240 set gop size to 10s for 24 fps video

Speed

-preset set speed (0 to 13), 13 is for test and debug.
6 for medium, 4 for slow
Lower than 3 is extremly slow, higher than 9 are too destructive.

Quality

-crf use value 35 is good, but you can use 32-35 to produce small file

Custom svt-av1 parameters

-svtav1-params specify custom svt-av1 parameters to encoder, use like this tune=0:film-grain=8:fast-decode=0

tune 0 for Visual quality, 1 for PSNR optimisation


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK