MCPcopy Create free account
hub / github.com/TeleBoxOrg/TeleBox_Plugins / safeFilename

Method safeFilename

convert/convert.ts:189–194  ·  view source on GitHub ↗
(filename: string)

Source from the content-addressed store, hash-verified

187 .replace(/\s+/g, "_")
188 .substring(0, 100);
189 }
190
191 async convertVideoToMp3(inputPath: string, outputPath: string): Promise<boolean> {
192 try {
193 await execFileAsync("ffmpeg", ["-i", inputPath, "-vn", "-acodec", "libmp3lame", "-q:a", "2", "-y", outputPath], { timeout: 300000 });
194 return fs.existsSync(outputPath);
195 } catch (error) {
196 console.error("Video conversion failed:", error);
197 return false;

Callers 1

handleVideoConversionMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected