55 lines
2.4 KiB
Markdown
55 lines
2.4 KiB
Markdown
# SVT-AV1-Essential-helper
|
|
|
|
A batch-processing tool for MKV files, designed for high-quality AV1 video encoding and efficient audio handling. This script is tailored for anime and similar content, with a focus on automation, quality, and flexibility.
|
|
|
|
## Features
|
|
|
|
- **Batch processing** of MKV files in the current directory
|
|
- **Automatic VFR to CFR** conversion using HandBrakeCLI (if needed)
|
|
- **UTVideo intermediate** for lossless video processing
|
|
- **AV1 encoding** via ffmpeg piped to SvtAv1EncApp2 (SVT-AV1-Essential fork)
|
|
- **Audio extraction, normalization, and Opus encoding** (with optional downmixing)
|
|
- **Remuxing of supported audio codecs** (AAC, Opus) without conversion
|
|
- **Optional autocrop detection** using ffmpeg cropdetect
|
|
- **Per-file logging** and organized output directories
|
|
- **Automatic cleanup** of temporary files
|
|
|
|
## Requirements
|
|
|
|
- Python 3.7+
|
|
- The following tools must be in your PATH:
|
|
- `ffmpeg`, `ffprobe`
|
|
- `mkvmerge`, `mkvpropedit`
|
|
- `sox`, `opusenc`
|
|
- `mediainfo`, `HandBrakeCLI`
|
|
- `SvtAv1EncApp2` (SVT-AV1-Essential fork, must be named exactly as such)
|
|
|
|
## Usage
|
|
|
|
```sh
|
|
python anime_audio_helper.py [--no-downmix] [--autocrop] [--speed <value>] [--quality <value>] [--grain <value>]
|
|
```
|
|
|
|
- `--no-downmix` : Preserve original audio channel layout (do not force stereo)
|
|
- `--autocrop` : Automatically detect and crop black bars from video
|
|
- `--speed` : Set the encoding speed. Possible values: `slower`, `slow`, `medium`, `fast`, `faster`.
|
|
- `--quality` : Set the encoding quality. Possible values: `lowest`, `low`, `medium`, `high`, `higher`.
|
|
- `--grain` : Set the film-grain value (number). Adjusts the film grain synthesis level.
|
|
|
|
Place your `.mkv` files in the script directory. Processed files will be moved to `completed/`, and originals to `original/`. Logs are saved in `conv_logs/`.
|
|
|
|
## Configuration
|
|
|
|
- **Audio remuxing**: Edit the `REMUX_CODECS` set at the top of the script to control which codecs are remuxed instead of converted.
|
|
- **SVT-AV1 parameters**: Edit the `SVT_AV1_PARAMS` dictionary at the top of the script to adjust encoding quality, speed, and other options.
|
|
|
|
## Notes
|
|
|
|
- The script expects the SVT-AV1-Essential fork binary to be named `SvtAv1EncApp2`.
|
|
- All video encoding is 10-bit for maximum quality.
|
|
- Scene change detection, auto-tiling, and other advanced options are enabled by default.
|
|
- The script is designed for automation and minimal manual intervention.
|
|
|
|
## License
|
|
|
|
See `LICENSE` for details. |