Files
av1-go/README.md
2025-12-05 21:56:57 +01:00

54 lines
1.5 KiB
Markdown

# AV1 Opus Encoder (Go Port)
This is a Go port of the `av1_opus_encoder.py` script, designed to be compiled into a standalone executable.
## Prerequisites
- **Go 1.21+**: Required to compile the code.
- **External Tools**: The following tools must be in your system `PATH`:
- `ffmpeg`
- `ffprobe`
- `mkvmerge`
- `mkvpropedit`
- `opusenc`
- `mediainfo`
- `av1an`
- `HandBrakeCLI`
- `ffmsindex`
## Building
1. Open a terminal in this directory.
2. Run `go mod tidy` to ensure dependencies are resolved (standard library only, but good practice).
3. Build the executable:
- **Windows**: `go build -o av1-encoder.exe .`
- **Linux**: `go build -o av1-encoder .`
## Usage
Place the executable in the directory containing your `.mkv` files and run it.
```bash
./av1-encoder [flags]
```
### Flags
- `--no-downmix`: Preserve original audio channel layout (default: false, downmixes >5.1 to stereo/5.1 based on logic).
- `--autocrop`: Automatically detect and crop black bars (default: false).
- `--speed`: Set SVT-AV1 preset (e.g., `slower`, `slow`, `medium`, `fast`).
- `--quality`: Set SVT-AV1 quality (e.g., `medium`, `high`).
- `--grain`: Set film-grain synthesis level (int).
## Moving to a New Git Repo
This directory is self-contained. You can move the entire `av1-go` folder to a new location and initialize a new git repository:
```bash
mv av1-go /path/to/new/location
cd /path/to/new/location
git init
git add .
git commit -m "Initial commit"
```