This guide explains how to set up and run Auto-Boost-Av1an on Ubuntu.
Pick based on your content type and desired quality:
| Script | Quality | Description |
|---|---|---|
run_linux_anime_crf30.sh |
Standard | β Recommended starting point |
run_linux_anime_crf25.sh |
High | Higher quality, larger files |
run_linux_anime_crf18.sh |
Archival | Maximum quality, largest files |
| Script | Quality | Description |
|---|---|---|
run_linux_live_crf30.sh |
Standard | β Recommended starting point |
run_linux_live_crf25.sh |
High | Higher quality, larger files |
run_linux_live_crf18.sh |
Archival | Maximum quality, largest files |
| Script | Quality | Description |
|---|---|---|
run_linux_sports_crf33.sh |
Optimized | β Best for high-motion content |
| Script | Quality | Description |
|---|---|---|
Progression-Boost-SSIMU2-anime.sh |
Auto | Analyzes each scene and optimizes settings for Anime |
Progression-Boost-SSIMU2-liveaction.sh |
Auto | Analyzes each scene and optimizes settings for Live Action |
Note: Progression Boost uses SSIMULACRA2 metrics to target a visual quality score (Default: 82), adjusting bitrate (crf) on a per scene basis to target that quality score. It benchmarks your CPU/RAM on first run to set optimal workers.
TIP: Start with CRF 30. If quality isn't sufficient, try CRF 25. For archival purposes, use CRF 18.
CRF stands for "Constant Rate Factor." It determines the balance between Video Quality and File Size:
- Lower CRF (e.g., 18) = Higher Quality, Larger File Size
- Higher CRF (e.g., 30) = Lower Quality, Smaller File Size
For a detailed list of versions and software installed, see DEPENDENCIES.md.
We have provided a modular setup script to install or uninstall dependencies individually or in bulk. This script needs to be run as root.
chmod +x setup.sh
sudo ./setup.shThe script will launch an interactive menu where you can:
- Install All: Setup everything in one go (Recommended).
- Selective Install: Install specific tools (e.g., Av1an, SVT-AV1) by entering their numbers (e.g.,
1 3 5). - Uninstall: Switch to Uninstall mode (Press T) to remove specific tools or everything.
CLI Mode: You can also run it without the menu:
sudo ./setup.sh --install A # Install Everything
sudo ./setup.sh --install av1an # Install Av1an only
sudo ./setup.sh --uninstall A # Uninstall EverythingIf you prefer to install manually, follow the steps below.
Install basic tools, FFmpeg, and x264 (required for scene detection):
sudo apt update
sudo apt install -y ffmpeg x264 mkvtoolnix mkvtoolnix-gui python3 python3-pip git curlInstall VapourSynth and its Python bindings.
For Ubuntu, you might need to add the vs-repo or use the default repositories if available (Ubuntu 24.04+ has newer versions).
sudo apt install -y vapoursynth libvapoursynth-dev python3-vapoursynthInstall the required Python packages:
pip3 install vsjetpack numpy rich vstools psutilThe automatic installer uses the latest version from Git for feature parity. Manual install:
cargo install --git https://github.com/rust-av/Av1an.gitThe automated installer compiles this native Rust tool for identical Windows parity. Manual install:
cargo install --git https://github.com/gianni-rosato/fssimu2.gitThe automated installer compiles this from source for GPU-accelerated metrics. Requires NVIDIA (CUDA) or AMD (HIP) drivers. Manual install: See Line-fr/Vship
The automatic installer compiles SVT-AV1-PSY (Psycho-visual fork) with Clang and PGO/LTO optimizations for best quality and speed on Linux. Manual install (Recommended Build Command):
git clone https://github.com/5fish/svt-av1-psy
cd svt-av1-psy
mkdir -p Build/linux && cd Build/linux
cmake ../.. -G"Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DSVT_AV1_PGO=ON -DSVT_AV1_LTO=ON
make -j $(nproc)
sudo make installEnsure SvtAv1EncApp is in your PATH.
The script relies on the following plugins:
- FFMS2: For video loading.
- WWXD: For scene detection (required by
Progressive-Scene-Detection.py). - VSZIP: For metrics calculation (fallback if
fssimu2is missing).
Install FFMS2:
sudo apt install -y libffms2-4 libffms2-dev
# OR compile from source (recommended for latest ffmpeg support)Install WWXD (Critical Fix): You MUST link against the math library.
git clone https://github.com/dubhater/vapoursynth-wwxd.git
cd vapoursynth-wwxd
gcc -o libwwxd.so -fPIC -shared -O3 -Wall -Wextra -I. -I/usr/local/include/vapoursynth src/*.c -lm
sudo cp libwwxd.so /usr/local/lib/vapoursynth/Install VSZIP (Metrics): We recommend using the automated build script provided in the repository.
git clone https://github.com/dnjulek/vapoursynth-zip.git vszip
cd vszip/build-help
chmod +x build.sh
./build.sh
# Ensure the plugin is in your VapourSynth path (e.g., /usr/local/lib/vapoursynth)
sudo cp ../zig-out/lib/libvszip.so /usr/local/lib/vapoursynth/Alternatively, you can install the fssimu2 binary and place it in your PATH to avoid needing vszip.
To verify that the installation was successful, run the following commands:
# Check Core Tools
ffmpeg -version | head -n 1
mkvmerge --version
python3 --version
mediainfo --version
# Check VapourSynth
vspipe --version
python3 -c "import vapoursynth; print(f'VapourSynth Core: {vapoursynth.core.version()}')"
# Check Encoders
av1an --version
SvtAv1EncApp --help | grep "SVT"
# Check Metrics Tools
zig version
fssimu2 --version || echo "fssimu2 not installed (optional - will use vs-zip fallback)"
FFVship --help | head -n 1 || echo "FFVship (GPU) not installed"
# Check VapourSynth Plugins
python3 -c "from vapoursynth import core; print('WWXD:', hasattr(core, 'wwxd')); print('VSZIP:', hasattr(core, 'vszip'))"- Place your source files (e.g.,
.mkvor.mp4) into theInput/folder.- Note: The script will create this folder automatically if it doesn't exist.
- Note: Files do NOT need to be renamed to
*-source.mkvanymore.
- Make the scripts executable (if not already):
chmod +x run_linux_anime_*.sh chmod +x run_linux_live_*.sh
- Run the script variant of your choice.
- Your final encoded files will appear in the
Output/folder. We provide variants based on content type (Anime vs Live Action) and quality. All scripts support Auto-BT.709 Detection.
- Your final encoded files will appear in the
Anime Variants:
- Standard (CRF 30):
./run_linux_anime_crf30.sh- Balanced speed/quality (Tune 3). - High (CRF 25):
./run_linux_anime_crf25.sh- Slower, Tune 0. - Highest (CRF 18):
./run_linux_anime_crf18.sh- Aggressive boosting.
Live Action Variants (Auto-Crop Enabled):
- Standard (CRF 30):
./run_linux_live_crf30.sh- Auto-crop, Tune 3. - High (CRF 25):
./run_linux_live_crf25.sh- Tune 3, Variance Boost 2. - Highest (CRF 18):
./run_linux_live_crf18.sh- Maximum fidelity.
Sports / High-Motion Content:
- Low Quality (CRF 33):
./run_linux_sports_crf33.sh- Optimized for high-motion content with extra temporal filtering.
The script will:
- Detect Scene Changes.
- Start Av1an with the optimized parameters.
- Automatically calculate worker count based on your hardware (on first run).
- Run Auto-Boost-Av1an (Fast Pass -> Metrics -> Zones -> Final Encode).
- Mux audio/subtitles back.
- Tag the output file.
- Cleanup temporary files.
- Final outputs are in the
Output/folder.
We include an audio-encoding/ folder for batch audio conversion workflows:
| Script | Description |
|---|---|
encode-ac3-audio.sh |
Converts audio tracks to AC3 (Dolby Digital) - for legacy devices |
encode-eac3-audio.sh |
Converts audio tracks to EAC3 (Dolby Digital Plus) - recommended |
encode-eac3-audio.sh |
Converts audio tracks to EAC3 (Dolby Digital Plus) - recommended |
encode-opus-audio.sh |
Converts audio tracks to Opus - best quality/size ratio |
2.1 Channel Support:
encode-opus-audio.sh(192k) andencode-ac3-audio.sh(320k) now support 2.1 channel detection and optimization.
Usage:
cd audio-encoding
# Place your .mkv files in this folder
./encode-eac3-audio.shSettings files (settings-encode-*.txt) control bitrates per channel configuration.
We include an extras/ folder with helper scripts for advanced workflows:
| Script | Description |
|---|---|
encode-opus-audio.sh |
Legacy audio encoding (use audio-encoding/ instead) |
lossless-intermediary.sh |
Converts video to lossless 10-bit x265 intermediates |
compare.sh |
Generates comparison screenshots via comp.py |
light-denoise.sh |
Applies DFTTest denoise + x265 lossless encoding |
light-denoise-nvidia.sh |
GPU-accelerated NVEncC denoise (NVIDIA required) |
forced-aspect-remux.sh |
Copies aspect ratio from source to encoded output |
disk-usage.sh |
Reports disk usage (Linux replacement for NTFS compress) |
Usage:
cd extras
./light-denoise.shThe prefilter/ folder contains scripts for applying deband filters before encoding:
| Script | Description |
|---|---|
nvidia-deband.sh |
NVIDIA GPU deband using NVEncC + libplacebo |
x265-lossless-deband.sh |
CPU deband using VapourSynth + x265 lossless |
Edit prefilter/settings.txt to customize filter settings.
Requirements:
- For NVIDIA scripts: NVEncC installed and in PATH
- For x265 scripts: VapourSynth with placebo plugin, x265
- Missing Tools: Ensure
av1an,SvtAv1EncApp,ffmpeg,mkvmerge,mkvpropeditare in your PATH. - VapourSynth Errors: Ensure you have the required plugins (
ffms2) installed and accessible to VapourSynth. - Permissions: Ensure you have write permissions in the folder.