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

Method convertVideoToMp3

convert/convert.ts:196–204  ·  view source on GitHub ↗
(inputPath: string, outputPath: string)

Source from the content-addressed store, hash-verified

194 return fs.existsSync(outputPath);
195 } catch (error) {
196 console.error("Video conversion failed:", error);
197 return false;
198 }
199 }
200
201 async addMetadataAndCover(inputMp3: string, outputPath: string, metadata: SongInfo, coverPath?: string): Promise<boolean> {
202 try {
203 const args: string[] = ["-i", inputMp3, "-c:a", "copy", "-id3v2_version", "3"];
204 if (coverPath) {
205 args.push("-i", coverPath, "-map", "0:a", "-map", "1:v", "-disposition:v:0", "attached_pic");
206 }
207 args.push("-metadata", `title=${metadata.title}`);

Callers 1

handleVideoConversionMethod · 0.80

Calls 2

execFileAsyncFunction · 0.85
errorMethod · 0.80

Tested by

no test coverage detected