# Remux

> Lossless video and audio container rewrapping using FFmpeg with strict stream integrity verification.

Remux is a free AI agent skill on Agensi by snepssen, in Image & Video. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [snepssen](https://www.agensi.io/creators/snepssen)
- Category: [Image & Video](https://www.agensi.io/skills/image-video)
- Uses: 2
- Version: 1.0
- Last updated: 2026-11-20
- Security: scan passed (2026-11-20); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/remux
- Tags: image, automation, ffmpeg, python, multimedia

## About this skill

Changing a video's container often goes wrong with generic converters: they quietly re-encode, drop subtitle tracks, or keep only the first audio track. This skill copies every stream into the new container unchanged, and refuses when that isn't possible instead of guessing.

The skill itself is just instructions. When a task needs it, your agent fetches the open-source [tools-core](https://github.com/snepssen/tools-core) repository at a pinned commit, checks its SHA-256, and runs `remux` locally with your FFmpeg.

### What it does
- **Lossless rewrapping** copies video, audio and subtitle streams into MKV, MP4, MOV, WebM or M4A without re-encoding.
- **All or nothing**: if any audio, video or subtitle stream can't go into the target container unchanged, it refuses and explains why.
- **Plan first**: a `--plan` run lists every stream it would copy before anything is written.
- **Checked output**: after FFmpeg writes a temporary file, the tool compares every output stream's type and codec with the input before publishing it.
- **Safe writing**: never overwrites an existing file and never touches the source.

### How it works
1. **Fetch.** The agent downloads tools-core at a pinned commit and verifies it.
2. **Plan.** It runs the plan and shows you which streams would be copied, or why the request is refused.
3. **Explain options.** On a refusal (for example SRT subtitles into MP4) it offers real choices instead of working around it.
4. **Remux.** With your go-ahead it writes the new file and checks it before publishing.

### Frameworks & tools
Python 3.8+ (standard library only) driving FFmpeg and ffprobe. The probing code and compatibility table come from [siphon](https://snepssen.github.io/siphon/).

### Why this beats prompting it yourself
Hand-written FFmpeg commands easily drop streams (`-map` mistakes) or re-encode when a codec doesn't fit. This skill copies everything or nothing, and verifies the output's stream inventory before it exists under its final name.

### Use cases
- Rewrap an MKV as MP4 or MOV for QuickTime, Premiere or Final Cut, when its codecs fit.
- Move an MP4 into MKV to keep extra audio and subtitle tracks together.
- Check which containers a file can move to without re-encoding.

### Known limitations
Needs FFmpeg and ffprobe installed. It never re-encodes, removes tracks or converts subtitles, so some requests are refused by design (for example H.264 into WebM, SRT into MP4, or video into M4A). Cover images and data streams are refused for every container. The runtime check compares stream types and codecs, not every packet. Verified on macOS; Windows and Linux have not been exercised yet.

## Requires

- Python 3.8+
- FFmpeg + ffprobe
- curl
- Git

Verified on macOS; built for Linux and Windows too. The skill downloads the open-source tools-core repository from GitHub at a pinned commit, checks its SHA-256, and runs remux locally with your FFmpeg. Your media never leaves your machine.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Remux skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### How does 'remux' differ from a standard video converter?

Unlike standard converters that might re-encode your video and reduce quality, this skill performs bit-perfect copying. It wraps your existing video and audio data into a new container at disk speed, ensuring zero quality loss.

### What happens if my source file has a track that isn't compatible with the target container?

The skill is designed to prioritize data integrity. If a stream (like a specific subtitle format) isn't supported by the target container, the skill will refuse the operation and explain why, rather than silently dropping the track.

### What are the system requirements for running this skill?

You will need Python 3.8 or higher and a working installation of FFmpeg and ffprobe on your system path. The skill uses these tools to handle the underlying stream mapping and verification.

### Can I see what changes will be made before the process starts?

Yes, the skill includes a pre-execution planning phase. It generates a detailed manifest showing exactly how each video, audio, and subtitle stream will be mapped before any data is written.

### What is in the package?

Instructions only: a SKILL.md that tells your agent how to fetch the open-source tools-core repository from GitHub at a pinned commit, verify its SHA-256, and run remux with your own FFmpeg. Nothing is bundled, and your media never leaves your machine.

### Is this skill compatible with my specific AI agent?

This skill is built for any AI agent framework capable of executing Python-based tools. It is ideal for developers building media processing pipelines who want to avoid the common syntax errors associated with manual FFmpeg commands.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
