Skip to main content
Glama

MCP FFmpeg Helper

file.ts788 B
import { existsSync } from "fs"; import { dirname } from "path"; import { mkdir } from "fs/promises"; /** * Helper function to ensure a directory exists */ export async function ensureDirectoryExists(filePath: string): Promise<void> { const dir = dirname(filePath); try { await mkdir(dir, { recursive: true }); } catch (error) { // Directory already exists or cannot be created if ((error as any).code !== 'EEXIST') { throw error; } } } /** * Helper function to validate file path */ export function validatePath(path: string, isInput: boolean = false): string { if (!path) { throw new Error("File path is required"); } if (isInput && !existsSync(path)) { throw new Error(`Input file does not exist: ${path}`); } return path; }

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/sworddut/mcp-ffmpeg-helper'

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