RUST · MEDIA & AI AGENTS

ffmpeg-skill-rs — Deterministic FFmpeg Media Pipeline Engine for AI Agents

ffmpeg-skill-rs is a memory-safe Rust CLI and MCP tool server that lets autonomous AI coding agents inspect, transcode, trim, and composite audio and video reliably. It validates filtergraphs before execution, probes stream metadata in microseconds, and eliminates fragile shell-escaped FFmpeg strings.

$ cargo install ffmpeg-skill-rs
GitHub ↗

Architected for Speed & Reliability

Engineered from the ground up in memory-safe Rust with zero unnecessary dependencies.

⚡

Sub-Millisecond AI Dispatch

Compiles into a single lightweight binary (ffmpeg-skill / fms). AI pair programmers can execute media inspections, conversions, and transcode plans without waiting for Python or virtualenv initialization.

🔌

Native MCP Server Built-in

Built-in Model Context Protocol (MCP) stdio server directly integrates with Claude Desktop, Cursor, Antigravity, and Open WebUI with zero configuration.

🚀

Hardware Acceleration First

Automatically negotiates hardware-accelerated video encoders: Apple Silicon VideoToolbox (h264_videotoolbox, hevc_videotoolbox), Nvidia NVENC, or Linux VAAPI.

🛡️

Strict JSON Contract Guarantee

Guarantees structured, machine-parseable JSON stdout output with standard error codes and contract versioning, eliminating brittle shell regex parsing for LLMs.

✂️

Intelligent Media Utilities

Native tools for fast video inspection, high-speed audio waveform rendering, smart thumbnail extraction, lossless stream concatenation, and keyframe-accurate trimming.

🦀

Memory-Safe Systems Core

100% memory-safe pure Rust architecture with zero unsafe memory leaks, deterministic process isolation, and cross-platform support across macOS, Linux, and Windows.

Get Started in Seconds

Install via Cargo and run immediately on macOS, Linux, or Windows.

Terminal
# Install with Cargo
cargo install --git https://github.com/bhubbard/ffmpeg-skill-rs

# Inspect any video with structured JSON output
fms inspect input.mp4 --json

# High-speed web-optimized conversion with hardware acceleration
fms convert input.mov output.mp4 --preset web-fast

# Start the native Model Context Protocol (MCP) server for AI assistants
fms mcp

Engine Architecture

Streamlined execution pipeline with deterministic memory isolation and zero runtime overhead.

Pipeline Flow
┌───────────────────────────────────────────────────────────┐
│               AI Coding Agents / Claude / Cursor          │
└─────────────────────────────┬─────────────────────────────┘
                              │ JSON-RPC (MCP) / CLI Flags
┌─────────────────────────────▼─────────────────────────────┐
│                 ffmpeg-skill-rs Engine                    │
│  ┌──────────────────┐  ┌──────────────────┐  ┌──────────┐ │
│  │ Contract Enforcer│  │ Hardware Detector│  │ MCP Host │ │
│  │ (Strict JSON v1) │  │(VideoToolbox/NV) │  │ (Stdio)  │ │
│  └──────────────────┘  └──────────────────┘  └──────────┘ │
└─────────────────────────────┬─────────────────────────────┘
                              │ Safe Process Pipeline
┌─────────────────────────────▼─────────────────────────────┐
│               Underlying System FFmpeg / ffprobe          │
└───────────────────────────────────────────────────────────┘