Back to Home
Sujal261 icon

ffmpeg-mcp-server

by Sujal261

Overview

The FFmpeg MCP Server provides programmatic FFmpeg-based video and audio processing capabilities to LLMs, enabling tasks like format conversion, trimming, and merging.

Installation

Run Command
python server.py

Environment Variables

  • FFMPEG_EXECUTABLE

Security Notes

The server executes FFmpeg commands using `subprocess.run` where various input parameters (e.g., `video_path`, `txtfile_path`, `audio_format`, `preset`, `crf`, `framerate`, `start_time`, `end_time`, `scale` components) are directly taken from the `data` dictionary (user input) and interpolated into the command arguments. While `subprocess.run` with a list (rather than a shell string) mitigates simple shell injection, it does not prevent command injection if crafted input arguments are interpreted maliciously by FFmpeg itself. A significant risk is present in the `video_merge` tool, which uses `'-safe', '0'` with the `concat` demuxer. This option explicitly disables path validation, making it vulnerable to arbitrary file access or manipulation if the `txtfile_path` or its contents are user-controlled and contain paths to sensitive files or external commands that FFmpeg might process.

Similar Servers

Stats

Interest Score0
Security Score3
Cost ClassHigh
Avg Tokens50
Stars0
Forks0
Last Update2025-12-15

Tags

FFmpegVideo ProcessingAudio ProcessingMCPLLM Tools