Skip to main content
Glama
bitscorp-mcp

MCP FFmpeg Video Processor

by bitscorp-mcp

get-ffmpeg-version

Check the installed FFmpeg version to verify compatibility for video processing tasks like resizing and audio extraction.

Instructions

Get the version of FFmpeg installed on the system

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Inline handler function for the get-ffmpeg-version tool. Executes 'ffmpeg -version', parses the version with regex, returns formatted text response with version or error if FFmpeg not found.
    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.` }] }; } } );
  • Registers the get-ffmpeg-version tool on the MCP server with empty input schema and the inline 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.` }] }; } } );
  • Promisified exec function used by the get-ffmpeg-version handler to run the ffmpeg command asynchronously.
    const execAsync = promisify(exec);

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