#av1 #vmaf

app ab-av1

AV1 encoding with fast VMAF sampling

26 releases

0.7.9 Nov 10, 2023
0.7.7 Apr 15, 2023
0.7.6 Mar 31, 2023
0.6.0 Dec 9, 2022
0.3.1 Mar 17, 2022

#6 in Video

Download history 42/week @ 2023-08-13 65/week @ 2023-08-20 87/week @ 2023-08-27 50/week @ 2023-09-03 11/week @ 2023-09-10 11/week @ 2023-09-17 27/week @ 2023-09-24 15/week @ 2023-10-01 16/week @ 2023-10-08 22/week @ 2023-10-15 21/week @ 2023-10-22 51/week @ 2023-10-29 42/week @ 2023-11-05 14/week @ 2023-11-12 49/week @ 2023-11-19 120/week @ 2023-11-26

226 downloads per month

MIT license

125KB
3K SLoC

ab-av1

AV1 video encoding tool with fast VMAF sampling & automatic encoder crf calculation. Uses ffmpeg, svt-av1 & vmaf.

Also supports other ffmpeg compatible encoders like libx265 & libx264.

Command: auto-encode

Automatically determine the best crf to deliver the min-vmaf and use it to encode a video or image.

Two phases:

  • crf-search to determine the best --crf value
  • ffmpeg to encode using the settings
ab-av1 auto-encode [OPTIONS] -i <INPUT> --preset <PRESET>

Interpolated binary search using sample-encode to find the best crf value delivering min-vmaf & max-encoded-percent.

Outputs:

  • Best crf value
  • Mean sample VMAF score
  • Predicted full encode size
  • Predicted full encode time
ab-av1 crf-search [OPTIONS] -i <INPUT> --preset <PRESET>

Command: sample-encode

Encode short video samples of an input using provided crf & preset. This is much quicker than full encode/vmaf run.

Outputs:

  • Mean sample VMAF score
  • Predicted full encode size
  • Predicted full encode time
ab-av1 sample-encode [OPTIONS] -i <INPUT> --crf <CRF> --preset <PRESET>

Command: encode

Invoke ffmpeg to encode a video or image.

ab-av1 encode [OPTIONS] -i <INPUT> --crf <CRF> --preset <PRESET>

Command: vmaf

Full VMAF score calculation, distorted file vs reference file. Works with videos and images.

  • Auto sets model version (4k or 1k) according to resolution.
  • Auto sets n_threads to system threads.
  • Auto upscales lower resolution videos to the model.
  • Converts distorted & reference to appropriate format yuv streams before passing to vmaf.
ab-av1 vmaf --reference <REFERENCE> --distorted <DISTORTED>

Install

Arch Linux

Available in the AUR.

Windows

Pre-built ab-av1.exe included in the latest release.

Using cargo

Latest release

cargo install ab-av1

Latest code direct from git

cargo install --git https://github.com/alexheretic/ab-av1

Requirements

ffmpeg newer than git-2022-02-24 with libsvtav1, libvmaf, libopus enabled.

ffmpeg should be in $PATH.

Minimum supported rust compiler

Maintained with latest stable rust.

Dependencies

~10–25MB
~327K SLoC