update readme

This commit is contained in:
2024-06-06 16:36:57 -05:00
parent 210d7061a3
commit 16c7658385
2 changed files with 31 additions and 4 deletions

View File

@@ -1,12 +1,38 @@
# ffmpeg-av1-builder
This repository is a simple collection of bash scripts that:
## General
This repository is a simple collection of bash scripts. Scripts have only been tested using Debian/Ubuntu/Arch. If not using apt/pacman, your dependencies will need to be manually installed. With the scripts, you can:
1. Install required dependencies using `./scripts/install_deps.sh`
2. Build and install ffmpeg from source using `./scripts/build.sh`
3. Benchmark the different encoders using `./scripts/benchmark.sh`
3. Install an encoding script using `./scripts/recc_encode_install.sh`
4. Benchmark the different encoders using `./scripts/benchmark.sh`
Scripts have only been tested using Debian/Ubuntu. If not using apt, your dependencies will need to be manually installed.
## Encode script
The installation of the encoding script creates a symlink to this repo's `./scripts/recc_encode.sh` so do NOT remove this repo or the functionality of `encode` will FAIL. The `encode` script is a very simple way to use SvtAv1 for video and Opus for audio for encoding, which are arguably the most ideal encoders as of writing this. `encode` does the following:
- Maps all streams except image streams (effectively no poster/image in the output)
- Sets the audio bitrate at 64kbps per channel for each audio track
- Formats the audio output channel layout correctly for Opus
- Attempts to encode with Dolby Vision and encodes without if the attempt fails
- Preset 3 and CRF 25 for for SvtAv1
- Enables sane advanced parameters
- Removes video stream title name from output
- Adds track statistics for proper output video/audio bitrate reporting
Read the specifics in the actual file : `./scripts/recc_encode.sh`
```
encode -i input_file [-p true/false] [-g NUM] [output_file_name]
-p print the command instead of executing it [optional]
-g set film grain for encode [optional]
output_file_name if not set, will create at $HOME/ [optional]
```
Example usage:
- `encode -i input.mkv output.mkv` standard usage
- `encode -i input.mkv -p true` prints out what it will do, does not start encoding
- `encode -i input.mkv` no output filename will create an output video in your home folder (~/)
- `encode -i input.mkv -g 20` will encode with film-grain synthesis=20 WITH denoising
## Benchmark script
AV1 encode quality is tested against 5 different open source videos using libsvtav1, librav1e, and libaom.
Netflix's libvmaf is used to analyze quality of the encodes against the original files.

View File

@@ -4,9 +4,10 @@
# do not take this as a holy grail.
usage() {
echo "encode -i input_file [-p true/false] [-g NUM] output_file"
echo "encode -i input_file [-p true/false] [-g NUM] [output_file_name]"
echo -e "\t-p print the command instead of executing it [optional]"
echo -e "\t-g set film grain for encode [optional]"
echo -e "\toutput_file_name if not set, will create at $HOME/ [optional]"
return 0
}