2026-02-05 00:15:54 -05:00
|
|
|
# AVIF Maker
|
|
|
|
|
|
|
|
|
|
A native GUI application to convert images and videos to AVIF format.
|
|
|
|
|
|
|
|
|
|
## Features
|
|
|
|
|
|
|
|
|
|
- **Drag and drop** files or use the file picker
|
|
|
|
|
- **Batch conversion** - queue multiple files
|
|
|
|
|
- **Animated AVIF** - convert GIFs and videos to animated AVIF
|
|
|
|
|
- **Alpha channel support** - preserves transparency from GIF, PNG, and video sources
|
|
|
|
|
- **Configurable quality** - separate quality controls for color and alpha
|
|
|
|
|
- **Speed/quality tradeoff** - encoder speed setting from 0 (best) to 10 (fastest)
|
|
|
|
|
- **Lossless mode** - perfect quality output
|
|
|
|
|
|
|
|
|
|
## Supported Input Formats
|
|
|
|
|
|
|
|
|
|
| Format | Decoder | Alpha Support | Notes |
|
|
|
|
|
| ------------ | ------------------- | ------------- | -------------------------- |
|
|
|
|
|
| GIF | `gif` crate | 1-bit | Animated, frame delays |
|
|
|
|
|
| PNG/APNG | `image` crate | Full | Static images |
|
|
|
|
|
| JPEG | `image` crate | N/A | No alpha |
|
|
|
|
|
| WebP | `image` crate | Full | Static only |
|
|
|
|
|
| MP4/MOV/WebM | `ffmpeg-sidecar` | Codec-dependent | Requires ffmpeg in PATH |
|
|
|
|
|
|
|
|
|
|
## Build Requirements
|
|
|
|
|
|
|
|
|
|
### macOS
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
# Install dependencies
|
|
|
|
|
brew install libavif ffmpeg
|
|
|
|
|
|
|
|
|
|
# Build and run
|
|
|
|
|
cargo build --release
|
|
|
|
|
./target/release/avif-maker
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### Linux (Ubuntu/Debian)
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
# Install dependencies
|
|
|
|
|
sudo apt install libavif-dev ffmpeg
|
|
|
|
|
|
|
|
|
|
# Build and run
|
|
|
|
|
cargo build --release
|
|
|
|
|
./target/release/avif-maker
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### Windows
|
|
|
|
|
|
|
|
|
|
Use vcpkg or pre-built binaries for libavif and FFmpeg.
|
|
|
|
|
|
|
|
|
|
```powershell
|
|
|
|
|
# With vcpkg
|
|
|
|
|
vcpkg install libavif ffmpeg
|
|
|
|
|
|
|
|
|
|
# Set environment variables
|
|
|
|
|
$env:VCPKG_ROOT = "C:\path\to\vcpkg"
|
|
|
|
|
|
|
|
|
|
# Build
|
|
|
|
|
cargo build --release
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
|
|
|
|
|
1. **Add files** - Drag and drop files onto the window, or click to browse
|
|
|
|
|
2. **Configure settings** - Adjust quality, speed, and output options in the left panel
|
|
|
|
|
3. **Convert** - Click "Convert All" to process the queue
|
|
|
|
|
4. **Access outputs** - Click "Open" or "Show in Finder" on completed files
|
|
|
|
|
|
|
|
|
|
## Settings
|
|
|
|
|
|
|
|
|
|
- **Quality (0-100)**: Higher = better quality, larger file. Default: 75
|
|
|
|
|
- **Alpha Quality (0-100)**: Separate quality for transparency. Default: 90
|
|
|
|
|
- **Speed (0-10)**: 0 = slowest/best quality, 10 = fastest. Default: 6
|
|
|
|
|
- **Lossless**: Perfect quality at the cost of file size
|
|
|
|
|
- **FPS Override**: Override detected framerate for video inputs
|
|
|
|
|
- **Output Directory**: Save to same folder as source, or a custom folder
|
|
|
|
|
|
|
|
|
|
## Test Files
|
|
|
|
|
|
|
|
|
|
Three test files are included:
|
|
|
|
|
|
|
|
|
|
- `Highlander-IMustFlip.mp4` - Video (tests ffmpeg decoder)
|
|
|
|
|
- `Highlander-IMustFlipSmaller-OG.gif` - Animated GIF without transparency
|
|
|
|
|
- `BTS-240-art.gif` - Animated GIF with transparency (1-bit alpha)
|
|
|
|
|
|
2026-02-05 09:58:26 -05:00
|
|
|
## Building Distributable Packages
|
2026-02-05 08:21:42 -05:00
|
|
|
|
2026-02-05 09:58:26 -05:00
|
|
|
Build distributable packages for multiple platforms from a single macOS machine.
|
2026-02-05 08:21:42 -05:00
|
|
|
|
|
|
|
|
### Prerequisites
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
# Install build tools
|
2026-02-05 09:58:26 -05:00
|
|
|
cargo install cargo-bundle
|
2026-02-05 08:21:42 -05:00
|
|
|
|
2026-02-05 09:58:26 -05:00
|
|
|
# Ensure Docker Desktop is installed and running (for Linux/Windows builds)
|
2026-02-05 08:21:42 -05:00
|
|
|
docker info
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### Docker Configuration (Apple Silicon Mac)
|
|
|
|
|
|
2026-02-05 09:58:26 -05:00
|
|
|
Before cross-compiling Linux/Windows targets, configure Docker Desktop to share the Homebrew path:
|
2026-02-05 08:21:42 -05:00
|
|
|
|
|
|
|
|
1. Open Docker Desktop
|
|
|
|
|
2. Go to **Settings** → **Resources** → **File Sharing**
|
|
|
|
|
3. Add `/opt/homebrew` to the shared paths
|
|
|
|
|
4. Click **Apply & Restart**
|
|
|
|
|
|
|
|
|
|
### Building
|
|
|
|
|
|
|
|
|
|
```bash
|
2026-02-05 09:58:26 -05:00
|
|
|
# First-time setup: Build Docker images (for Linux/Windows targets)
|
2026-02-05 08:21:42 -05:00
|
|
|
./scripts/build-all.sh --setup-docker
|
|
|
|
|
|
2026-02-05 09:58:26 -05:00
|
|
|
# Build all targets (macOS, Linux, Windows)
|
2026-02-05 08:21:42 -05:00
|
|
|
./scripts/build-all.sh
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### Output
|
|
|
|
|
|
|
|
|
|
After building, packages are in `dist/<version>/`:
|
|
|
|
|
|
|
|
|
|
| Platform | Files | Notes |
|
|
|
|
|
|----------|-------|-------|
|
2026-02-05 09:58:26 -05:00
|
|
|
| macOS | `.dmg`, `.app.zip` | Native build |
|
|
|
|
|
| Linux x86_64 | `.deb`, `.rpm`, `.tar.gz` | Cross-compiled via Docker |
|
|
|
|
|
| Linux ARM64 | — | Build natively on ARM64 Linux |
|
|
|
|
|
| Windows x86_64 | `.zip` | Cross-compiled via Docker |
|
2026-02-05 08:21:42 -05:00
|
|
|
|
|
|
|
|
**Note:** Linux ARM64 cross-compilation is disabled due to an upstream `zune-jpeg` NEON bug. Build ARM64 natively on a Linux ARM64 system.
|
|
|
|
|
|
2026-02-05 00:15:54 -05:00
|
|
|
## Architecture
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
avif-maker/
|
|
|
|
|
├── src/
|
|
|
|
|
│ ├── main.rs # Application entry point
|
|
|
|
|
│ ├── app.rs # Main application state
|
|
|
|
|
│ ├── decoder/
|
|
|
|
|
│ │ ├── mod.rs # Decoder trait and dispatch
|
|
|
|
|
│ │ ├── gif.rs # GIF decoder (pure Rust)
|
|
|
|
|
│ │ ├── image.rs # PNG/JPEG/WebP decoder
|
|
|
|
|
│ │ └── video.rs # FFmpeg-based video decoder
|
|
|
|
|
│ ├── encoder/
|
|
|
|
|
│ │ ├── mod.rs
|
|
|
|
|
│ │ └── avif.rs # libavif encoder wrapper
|
|
|
|
|
│ └── ui/
|
|
|
|
|
│ ├── mod.rs
|
|
|
|
|
│ ├── drop_zone.rs # Drag-and-drop area
|
|
|
|
|
│ ├── settings.rs # Settings panel
|
|
|
|
|
│ └── queue.rs # Job queue display
|
2026-02-05 09:58:26 -05:00
|
|
|
├── resources/
|
|
|
|
|
│ └── AppIcon.icns # macOS app icon
|
2026-02-05 08:21:42 -05:00
|
|
|
├── docker/ # Cross-compilation Dockerfiles
|
|
|
|
|
├── scripts/
|
|
|
|
|
│ └── build-all.sh # Build script for all platforms
|
2026-02-05 00:15:54 -05:00
|
|
|
└── Cargo.toml
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## License
|
|
|
|
|
|
|
|
|
|
MIT
|