- crf-search: Tweak 2nd iteration logic that slices the crf range at the 25% or 75% crf point.
- Widen to 20%/80% to account for searches of the "middle" two subranges being more optimal.
- Disable when using custom min/max crf ranges under half the default.
- Add sample-encode info to crf-search & auto-encode. Show sample progress and encoding/vmaf fps.
- Improve sample-encode progress format consistency.
- Add crf-search
-v
flag to print per-sample results. - Add auto-encode
-v
flag to print per-crf results,-vv
to also print per-sample results.
- Fix stdin handling sometimes breaking bash shells.
- Use default .265, .264 image output extensions for libx265, libx264. Fixes crf-search for images with these codecs.
- Improve
--vfilter
docs, clarify VMAF usage.
- Improve failing ffmpeg stderr printing:
- Don't allow many '\r'-ending updates to cause all other stored info to be truncated.
- Increase max heap storage of output ~4k->32k to allow more complete output in some cases.
- Fix caching unaffected by
--reference-vfilter
usage. - Improve
--vfilter
docs. Describe VMAF usage & mention--reference-vfilter
. - Improve
--vmaf-scale
docs. - VMAF: Remove
-r 24
ffmpeg input. - VMAF: Add new default options "shortest=true", "ts_sync_mode=nearest" and use vfilter "settb=AVTB".
- Fix VMAF score parse failure of certain successful ffmpeg outputs.
- Show full ffmpeg command after errors.
- For *_vaapi encoders map
--crf
to ffmpeg-q
(instead of-qp
). - Set av1_vaapi default
--max-crf
to 255. - Fix sample-encode printing output to non-terminals.
- Omit "Encode with: ..." stderr hint for non-terminals.
- Support logging enabled when stderr is not a terminal or by setting env var
RUST_LOG
. E.g:RUST_LOG=ab_av1=info
"info" level logs various progress results like sample encode infoRUST_LOG=ab_av1=debug
"debug" level logs include ffmpeg calls
- Don't panic on non-zero status exit.
- When unable to parse a vmaf score fail faster and include ffmpeg output.
- Add
--reference-vfilter
arg to sample-encode, crf-search, auto-encode to allow overriding--vfilter
for VMAF. - Add
--sample-duration
arg to configure the duration of each sample. Default 20s.
- Fix bash completions of some filenames.
- Use a single ffmpeg process to calculate VMAF replacing multi process piping.
- Exclude subtitle tracks from samples.
- Add
--keep
option for crf-search & auto-encode.
- Improve eta stability.
- Fix sample-encode caching to consider vmaf args.
- Fix validation preventing use of svt args starting with "-i", "-b".
- Fix validation preventing use of ffmpeg --enc args starting with "-i", e.g. "-init_hw_device".
- Fix ETA calculation overflow panic scenario.
- Add
--video-only
option for encode & auto-encode.
- Fix nested temp directories not being cleaned properly.
- Temp directories will now start with "." and be created in the working dir instead of the input parent (unless setting --temp-dir).
- Add
-e librav1e
support. Map--crf
to ffmpeg-qp
(default max 255),--preset
to-speed
(0-10). - Disallow
--enc svtav1-params=
usage. libsvtav1 params should instead be set with--svt
.
- Add
--encoder
support for qsv family of ffmpeg encoders: av1_qsv, hevc_qsv, vp9_qsv, h264_qsv and mpeg2_qsv. - Enable lookahead mode by default for encoders: av1_qsv, hevc_qsv, h264_qsv.
- Include all other non-main video streams by copying instead of encoding them with the same settings as the main video stream.
- Always copy audio unless
--acodec
or--downmix-to-stereo
are specified. Previously would re-encode to opus when changing container.
- Print failing ffmpeg stderr output.
- Preserve all input file streams (e.g. audio, subs, attachments) into output.
- Support concurrent running processes out of the box by segregating temp-dirs & fixing cache access.
- Improve vmaf accuracy in some cases by forcing 24fps & synchronizing the presentation timestamp.
- Automatically workaround ffmpeg "Can't write packet with unknown timestamp" sample generation failures (typically encountered with old avi files) by using `-fflags +genpts`.
- Fix crf-search incorrectly picking a rate that exceeds the
--max-encoded-percent
. - Improve auto-encode crf float display rounding.
- Use ffmpeg for svt-av1 encodes instead of invoking to SvtAv1EncApp directly. This unifies the handling of
other encoders & allows svt-av1 encoding to benefit from more built-in ffmpeg behaviours like aspect preservation.
An ffmpeg build with libsvtav1 enabled is now required. SvtAv1EncApp is no longer required. - Improve image detection.
- Add
--encoder
support for nvenc family of ffmpeg encoders: av1_nvenc, hevc_nvenc, and h264_nvenc.
- Add sample-encode, crf-search, auto-encode arg
--min-samples
. - Revert libvpx-vp9
--crf-increment
default to 1.
- Support decimal crf values in sample-encode, encode subcommands (note svt-av1 only supports integer crf).
- Add crf-search, auto-encode arg
--crf-increment
. Previously this would always be 1. Defaults to 1. -e libx264, libx265 & libvpx-vp9 default to 0.1. - Add crf-search, auto-encode arg
--thorough
which more exhaustively searches to find a crf value close to the specified min-vmaf. - Cache sample-encode results in $CACHE_DIR/ab-av1 directory. This allows repeated same crf sample encoding
to be avoided when running sample-encode, crf-search & auto-encode. E.g. repeating a crf-search with
a different min-vmaf.
Caching is enabled by default. Can be disabled with--cache false
or setting env varAB_AV1_CACHE=false
. - Use mkv containers for all lossless samples. Previously mp4 samples were used for mp4 inputs, however in all test cases mkv 20s samples were better quality. This change improves accuracy for all mp4 input files.
- Default
--max-crf
to 46 for libx264 & libx265 encoders. - Encode webm outputs with the "cues" seek index at the front to optimise stream usage (as done with mkv).
- Fix ffprobe duration conversion error scenarios panicking.
- Tweak encoded size prediction logic to consider both input file size & encoded sample duration.
- Change encoded size prediction logic to estimate video stream size (or image size) only. This should be much more consistent than the previous method. Change crf-search, sample-encode result text to clarify this.
- Improve video size prediction logic to account for samples that do not turn out as 20s.
- Fix full-pass sample encode progress bar.
- Use label "Full pass" instead of "Sample 1/1" when doing a full pass sample-encode.
- Add VMAF auto model, n_threads & scaling documentation.
- Default to .mkv output format for all inputs (except .mp4 which will continue to output .mp4 by default). This also applies to ffmpeg encoder sample output format. The previous behaviour used the input extension which may not have supported av1 (e.g. .m2ts).
- For auto-encode use the output extension also for ffmpeg encoder sample outputs if applicable.
- When creating lossless samples for encode analysis use .mkv (or .mp4) extension for better ffmpeg compatibility.
- Encode mkv outputs with the "cues" seek index at the front to optimise stream usage.
- Optimise pixel format choice for VMAF comparisons. Can significantly improve VMAF fps. E.g. if both videos are yuv420p use that instead of yuv444p10le.
- When sampling use full input video when sample time would be >= 85% of the total (down from 100%).
- Eliminate repeated redundant ffprobe calls.
- Windows: Support VMAF pixel format conversion for both distorted and reference. Gives more consistently accurate results and brings Windows in line with Linux functionality.
- Windows: ab-av1.exe binaries will now be automatically built and attached to releases.
- Add crf-search, auto-encode, encode & vmaf command support for encoding images into avif.
This works in the same way as videos, example:
The default encoder svt-av1 has some dimension limitations which may cause this to fail.
ab-av1 auto-encode -i pic.jpg
-e libaom-av1
also works and supports more dimensions. - Convert to yuv444p10le pixel format when calculating VMAF for accuracy and compatibility.
- Update to clap v4 which changes help/about output & reduces binary size.
- Print crf-search attempts even when stderr is not a tty.
- Fix terminal breaking sometimes after exiting early.
- Update indicatif dependency to
0.17
.
- For
-e libvpx-vp9
map--preset
number to ffmpeg-cpu-used
(0-5). - When overriding with a ffmpeg encoder avoid setting
b:a
,movflags
orac
if explicitly set via--enc
. - Add error output when using
--enc-input
with the default svt-av1 encoder. - Add errors for
--enc
/--enc-input
args that are already provided by existing args or inferred.
- Add
--encoder
/-e
encoder override. Any encoder ffmpeg supports and that may be controlled using-crf
may be used. - Add
--enc $FFMPEG_ARG
for providing arbitrary output options to the ffmpeg encoder invocation. These only work when overriding the encoder with-e
.
E.g. Set x265 params:-e libx265 --enc x265-params=lossless=1
. - Add
--enc-input $FFMPEG_ARG
for providing ffmpeg input file options, similar to--enc
. --preset
now supports also word presets likeslow
,veryfast
for ffmpeg encoders like libx264.--preset
is no longer required. Default svt-av1--preset
is now 8.- Support setting keyint for
-e
encoders in a similar way as is done for av1. - Add default vp9 & libaom-av1
-b:v 0
setting so constant quality crf based encoding works consistently. - For
-e libaom-av1
map--preset
number to ffmpeg-cpu-used
(0-8). - For *_vaapi encoders map
--crf
to ffmpeg-qp
as crf is not supported. - Shell escape file name in "Encoding ..." output.
- Shell escape file names when hinting commands.
- Show more info when auto-encode fails to find a suitable crf.
- Improve sample generation speed & frame duration accuracy.
- Fix some cases where ffmpeg progress & VMAF score output parsing failed.
- Fix some edge cases where crf-search would succeed exceeding the specified
--max-encoded-percent
.
- Select vmaf model
model=version=vmaf_4k_v0.6.1
for videos larger than 2560x1440 if no other model is specified. This will raise VMAF scores for 4k videos that previously were getting harsher treatment from the 1k model. - Add
--vmaf-scale
option which sets the video resolution scale to use in VMAF analysis.auto
(default) auto scales based on model & resolution,none
no scaling or customWxH
format, e.g.1920x1080
.auto
upscale 1728x972 & smaller to 1080p, preserving aspect, when using the default 1k VMAF model. This will reduce VMAF scores that previously were getting more generous treatment from the 1k model.auto
upscale 3456x1944 & smaller to 4k, preserving aspect, when using the 4k VMAF model.
- Add
--downmix-to-stereo
option, if enabled & the input streams use > 3 channels (dts 5.1 etc), downmix input audio streams to stereo. - After encoding print per-stream sizes in addition to the file size & percent.
- Add predicted video stream percent reduction to auto-encode search progress bar after a successful search.
- Support non-video/audio/subtitle streams from input to output, e.g. attachments.
- When defaulting the output file don't use input extension if it is avi, y4m, ivf, use mp4 instead.
- Fix clearing crf-search progress bar output on error.
- Strip debug symbols in release builds by default which reduces binary size (requires rustc 1.59).
- Add svt-av1 option
--keyint FRAME-OR-DURATION
argument supporting frame integer or duration string. E.g.--keyint=300
or--keyint=10s
. Default keyint to10s
when input duration is over 3m. - Add svt-av1 option
--scd true|false
argument enabling scene change detection. Default scd on when using default keyint & input duration is over 3m. - Add
--svt ARG
for additional args, e.g.--svt mbr=2000 --svt film-grain=30
. - Add
--vfilter ARG
argument to apply a ffmpeg video filter (crop, scale etc) to the input before av1 encoding.
E.g.--vfilter "scale=1280:-1,fps=24"
. - Add
--pix-format ARG
argument supportingyuv420p10le
(default) &yuv420p
. - Add vmaf configuration
--vmaf ARG
, e.g.--vmaf n_threads=8 --vmaf n_subsample=4
. - Rename vmaf command argument
--reference
(was--original
). - Add vmaf command
--reference-vfilter
argument, similar to--vfilter
. - Default vmaf n_threads to the number of logical CPUs.
- Add
--temp-dir
argument to specify storage of sample data. May also be set with env varAB_AV1_TEMP_DIR
. - Add
--sample-every DURATION
argument, default "12m". - Remove 3 sample default, this is now calculated using
--sample-every
12m default. - Create samples concurrently while encoding to reduce io lags waiting to encode.
- crf-search re-use samples for crf analysis.
- Linux: vmaf use fifo to convert both reference & distorted to yuv which fixes vmaf accuracy in some cases.
- Support multiple audio & subtitle streams.
- Use 128k bitrate as a default for libopus audio.
- Remove
--aq
. - Fail fast if ffmpeg cut samples are empty (< 1K).
- Handle input durations lower than the sample duration by using the whole input as a single sample.
- Add command to generate bash,fish & zsh completions
ab-av1 print-completions [SHELL]
.
- Initial release.