# ffmpeg-mcp [Health: Active]

**Category:** 🎥 Multimedia Process  
**Repository:** https://github.com/PedroMarianoAlmeida/ffmpeg-mcp  
**GitHub Stars:** 2  
**npm Downloads (last month):** 1445  
**Views:** 14  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/ffmpeg-mcp

## Description
FFmpeg video/audio tools: cut, convert, concat, remove silence, and raw commands.

## Tools
Capabilities this server exposes over MCP:

- **cut_video** — Extract a segment from a video using start time and duration
- **image_to_video** — Convert a static image to a video with fixed duration
- **concat_videos** — Join multiple videos into one
- **convert** — Convert between media formats (auto-detects from file extension)
- **remove_silence** — Detect and remove silent segments from video
- **ffmpeg_raw** — Run a restricted local FFmpeg command

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "ffmpeg-mcp": {
    "command": "npx",
    "args": ["ffmpeg-mcp-server"],
    "env": {
      "FFMPEG_MCP_WORKSPACE": ""
    }
  }
}
```

**Requires environment variables:** `FFMPEG_MCP_WORKSPACE` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What ffmpeg-mcp does

ffmpeg-mcp exposes common FFmpeg workflows as MCP tools for local video and audio files. It can extract a segment from a video, convert media between formats, join multiple videos, create a video from a still image, and detect and remove silent portions from video. The format conversion tool uses file extensions to determine the input and output formats, supporting workflows such as MOV-to-MP4 conversion or extracting MP3 audio from a video.

The server also provides `ffmpeg_raw` for selected FFmpeg operations that do not fit the higher-level tools. This is not an unrestricted shell interface: the command is limited to local inputs, one final local output, and supported codec and timing options.

## How it works

MCP clients invoke the registered tools with file paths and operation parameters. FFmpeg processing runs locally, using the binary bundled through `ffmpeg-static`. Inputs and outputs must be located within the workspace selected by `FFMPEG_MCP_WORKSPACE`; when that variable is not set, the process working directory serves as the workspace.

Before accessing a path, the server resolves symlinks and checks that it remains inside the workspace. URL schemes, traversal outside the workspace, and symlink-based output paths are rejected. Output directories need to exist before a tool is called.

Silence removal uses automatic detection. Its documented example configuration detects silence longer than two seconds at a threshold of -30 dB by default.

## Setup and configuration

Install the published package globally with:

```bash
npm install -g ffmpeg-mcp-server
```

Alternatively, clone the source repository, install dependencies, and build it with `npm install` followed by `npm run build`. MCP clients can launch the package with `npx ffmpeg-mcp-server`.

Set `FFMPEG_MCP_WORKSPACE` to an absolute media directory when you want to explicitly constrain file access. A typical stdio configuration is:

```json
{
  "mcpServers": {
    "ffmpeg": {
      "command": "npx",
      "args": ["ffmpeg-mcp-server"],
      "env": {
        "FFMPEG_MCP_WORKSPACE": "/absolute/path/to/media-workspace"
      }
    }
  }
}
```

The same launch pattern is documented for Claude Desktop and Claude Code.

## Tools and capabilities

- `cut_video`: extracts a video segment using a start time and duration.
- `image_to_video`: turns a still image into a video with a fixed duration.
- `concat_videos`: joins multiple video files into one output.
- `convert`: converts between media formats and infers formats from file extensions.
- `remove_silence`: detects and removes silent sections from video.
- `ffmpeg_raw`: runs a constrained local FFmpeg command with approved inputs, output paths, codecs, and timing options.

## Limitations and notes

Processing is local by default, and paths must remain inside the configured workspace. The raw tool excludes filters, forced formats, arbitrary FFmpeg flags, network protocols, and options that could load additional files. This restriction means specialized FFmpeg commands may need to be expressed through the higher-level tools or may not be available through the raw interface.

_Full upstream README: https://allmcps.com/mcp/ffmpeg-mcp/readme_

