Skip to main content
Glama
bitscorp-mcp

MCP FFmpeg Video Processor

by bitscorp-mcp

get-ffmpeg-version

Retrieve the installed FFmpeg version on your system to ensure compatibility and functionality for video processing tasks under the MCP FFmpeg Video Processor.

Instructions

Get the version of FFmpeg installed on the system

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Executes 'ffmpeg -version' command, extracts the version number using regex, formats and returns the version info and full output as text content. Returns error response if command fails or FFmpeg not found.
    async () => { try { const { stdout, stderr } = await execAsync('ffmpeg -version'); // Extract the version from the output const versionMatch = stdout.match(/ffmpeg version (\S+)/); const version = versionMatch ? versionMatch[1] : 'Unknown'; return { content: [{ type: "text" as const, text: `FFmpeg Version: ${version}\n\nFull version info:\n${stdout}` }] }; } catch (error) { const errorMessage = error instanceof Error ? error.message : String(error); return { isError: true, content: [{ type: "text" as const, text: `Error getting FFmpeg version: ${errorMessage}\n\nMake sure FFmpeg is installed and in your PATH.` }] }; } }
  • Registers the 'get-ffmpeg-version' tool with McpServer.tool(), providing tool name, description, empty parameter schema {}, and inline async handler function.
    server.tool( "get-ffmpeg-version", "Get the version of FFmpeg installed on the system", {}, async () => { try { const { stdout, stderr } = await execAsync('ffmpeg -version'); // Extract the version from the output const versionMatch = stdout.match(/ffmpeg version (\S+)/); const version = versionMatch ? versionMatch[1] : 'Unknown'; return { content: [{ type: "text" as const, text: `FFmpeg Version: ${version}\n\nFull version info:\n${stdout}` }] }; } catch (error) { const errorMessage = error instanceof Error ? error.message : String(error); return { isError: true, content: [{ type: "text" as const, text: `Error getting FFmpeg version: ${errorMessage}\n\nMake sure FFmpeg is installed and in your PATH.` }] }; } } );
  • Empty schema object indicating the tool takes no input parameters.
    {},
  • Promisified version of Node.js child_process.exec() used by the tool handler to asynchronously execute the FFmpeg version command.
    const execAsync = promisify(exec);

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/bitscorp-mcp/mcp-ffmpeg'

If you have feedback or need assistance with the MCP directory API, please join our Discord server