updated "readme" for better formating

This commit is contained in:
2025-07-17 10:48:37 +02:00
parent 09f5aa2d38
commit 7c3d079cbe

View File

@@ -2,13 +2,13 @@
## Overview
anime_audio_encoder.py is a comprehensive batch-processing script for MKV files, specifically tailored for modern anime encoding workflows. It automates the entire pipeline, including advanced video encoding with AV1 (via av1an), sophisticated audio conversion to Opus, and intelligent handling of both Variable Frame Rate (VFR) and Constant Frame Rate (CFR) sources. To ensure transparency and aid in debugging, the script also preserves detailed, per-file logs of the entire conversion process.
`anime_audio_encoder.py` is a comprehensive batch-processing script for MKV files, specifically tailored for modern anime encoding workflows. It automates the entire pipeline, including advanced video encoding with AV1 (via `av1an`), sophisticated audio conversion to Opus, and intelligent handling of both Variable Frame Rate (VFR) and Constant Frame Rate (CFR) sources. To ensure transparency and aid in debugging, the script also preserves detailed, per-file logs of the entire conversion process.
## Features
* **Advanced Video Encoding:** Uses a robust VapourSynth-based pipeline with av1an and SVT-AV1 for efficient, high-quality AV1 video encoding.
* **Advanced Video Encoding:** Uses a robust VapourSynth-based pipeline with `av1an` and SVT-AV1 for efficient, high-quality AV1 video encoding.
* **VFR Handling:** Automatically detects Variable Frame Rate (VFR) sources using mediainfo and converts them to Constant Frame Rate (CFR) with HandBrakeCLI before encoding, ensuring broader playback compatibility.
* **VFR Handling:** Automatically detects Variable Frame Rate (VFR) sources using `mediainfo` and converts them to Constant Frame Rate (CFR) with `HandBrakeCLI` before encoding, ensuring broader playback compatibility.
* **Detailed Logging:** Creates a separate, detailed log file for each processed MKV in the `conv_logs/` directory, capturing the full terminal output for easy review.
@@ -16,51 +16,51 @@ anime_audio_encoder.py is a comprehensive batch-processing script for MKV files,
* **File Organization:** Keeps your workspace tidy by automatically moving original files to `original/` and completed encodes to `completed/`.
* **Resumable & Efficient:** The script processes files one by one and uses av1an's resume feature, making it easy to continue an encoding batch if it's interrupted.
* **Resumable & Efficient:** The script processes files one by one and uses `av1an`'s resume feature, making it easy to continue an encoding batch if it's interrupted.
## Requirements
The following command-line tools must be installed and available in your system's PATH:
* ffmpeg
* `ffmpeg`
* ffprobe
* `ffprobe`
* mkvmerge
* `mkvmerge`
* mkvpropedit
* `mkvpropedit`
* sox
* `sox`
* opusenc
* `opusenc`
* mediainfo
* `mediainfo`
* av1an
* `av1an`
* HandBrakeCLI
* `HandBrakeCLI`
## Usage
1. Place your `.mkv` files in the same directory as the script.
2. Make the script executable by running `chmod +x anime_audio_encoder.py`.
2. Make the script executable (on Linux/macOS) by running `chmod +x anime_audio_encoder.py`.
3. Execute the script from your terminal:
```bash
./anime_audio_encoder.py
```
```bash
./anime_audio_encoder.py
```
### Optional Arguments
* `--no-downmix`: By default, the script downmixes surround sound audio (e.g., 5.1) to stereo. Use this flag to preserve the original audio channel layout.
Example:
Example:
```bash
./anime_audio_encoder.py --no-downmix
```
```bash
./anime_audio_encoder.py --no-downmix
```
## Output
@@ -72,6 +72,8 @@ Example:
## Notes
* The script will check if a file can be decoded by ffmpeg before processing and will skip corrupted or unsupported files.
* The script is primarily designed for **Linux/macOS** environments.
* The script will check if a file can be decoded by `ffmpeg` before processing and will skip corrupted or unsupported files.
* The entire process, especially scene detection and AV1 encoding, can be very time-consuming and CPU-intensive.