Brooklyn b8d9606499 Refactor: Decouple Analyzer/Planner/Executor and Fix Templates
Major architectural overhaul to split the monolithic processing logic into distinct components:

- Analyzer: Standardized MediaMetadata extraction using Ffprobe.

- Planner: New decision engine (BasicPlanner) to handle transcoding logic.

- Executor: Defined Executor trait and implemented FfmpegExecutor.

Fixes:

- Resolved Askama template syntax errors in analytics.html and jobs_table.html.

- Fixed compilation errors related to missing modules and trait bounds.

- Added sqlx migrations execution on startup.

Chore:

- Updated license to GPLv3 as requested.

- Removed legacy lchemist.db handling in favor of migrations.

- Cleaned up unused imports and legacy comments.
2026-01-08 19:07:45 -05:00
2026-01-07 16:13:56 -05:00
2026-01-07 19:26:59 -05:00

Alchemist

Intelligent video transcoding automation with hardware acceleration and CPU fallback

Alchemist is a Rust-based video transcoding system that automatically converts your media library to efficient AV1 format using hardware acceleration (GPU) or software encoding (CPU fallback).

Features

  • Hardware Acceleration: Supports NVIDIA (NVENC), Intel (QSV), AMD (VAAPI), and Apple (VideoToolbox)
  • CPU Fallback: Automatic software encoding with libsvtav1 when GPU is unavailable
  • Intelligent Analysis: Only transcodes files that will benefit from AV1 encoding
  • Web Dashboard: Real-time monitoring and control via Axum/Askama/HTMX-based UI
  • Single Binary: All assets and templates are embedded into the binary for easy deployment
  • Background Processing: Queue-based system with concurrent job support
  • Performance Metrics: Detailed logging and statistics for each transcode job

Quick Start

Prerequisites

  • Rust: 1.75+
  • FFmpeg: With hardware acceleration support and libsvtav1
  • FFprobe: For media analysis

Installation

# Clone the repository
git clone https://github.com/yourusername/alchemist.git
cd alchemist

# Build the project
cargo build --release

# Run the server
./target/release/alchemist --server

Docker Deployment

# Build the Docker image
docker build -t alchemist .

# Run the container
docker run -d \
  -p 3000:3000 \
  -v /path/to/media:/media \
  -v /path/to/output:/output \
  --name alchemist \
  alchemist

Access the web interface at http://localhost:3000

Configuration

Create a config.toml file in the working directory:

[transcode]
size_reduction_threshold = 0.3  # Require 30% size reduction
min_bpp_threshold = 0.1          # Minimum bits per pixel
min_file_size_mb = 50            # Skip files smaller than 50MB
concurrent_jobs = 2              # Number of parallel transcodes

[hardware]
allow_cpu_fallback = true        # Enable CPU encoding if no GPU
allow_cpu_encoding = true        # Allow software encoding
cpu_preset = "medium"            # CPU encoding speed: slow|medium|fast|faster

[scanner]
directories = [                  # Auto-scan directories
    "/media/movies",
    "/media/tvshows"
]

Usage

CLI Mode

# Scan and transcode specific directories
alchemist /path/to/videos /another/path

# Dry run (analyze only, don't transcode)
alchemist --dry-run /path/to/videos

Server Mode

# Start web server on default port (3000)
alchemist --server

License

This project is licensed under the MIT License - see the LICENSE file for details.

Description
THIS IS A MIRROR OF GITHUB. Alchemist is a Rust-based video transcoding system that automatically converts your media library to efficient AV1/HEVC format using hardware acceleration (GPU) or software encoding (CPU fallback).
https://github.com/bybrooklyn/alchemist Readme GPL-3.0 99 MiB
Languages
Rust 57.4%
TypeScript 38.9%
Astro 1.1%
Just 0.9%
CSS 0.8%
Other 0.8%