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

Method transformMedia

rev/rev.ts:268–288  ·  view source on GitHub ↗
(
		inputPath: string,
		outputPath: string,
		flipMode: FlipMode,
		invertColors: boolean,
		isGif: boolean,
		isWebm: boolean
	)

Source from the content-addressed store, hash-verified

266 throw new Error('下载媒体失败,请稍后再试');
267 }
268 }
269
270 private async transformMedia(
271 inputPath: string,
272 outputPath: string,
273 flipMode: FlipMode,
274 invertColors: boolean,
275 isGif: boolean,
276 isWebm: boolean
277 ) {
278 await this.runFfmpegTransform({
279 inputPath,
280 outputPath,
281 flipMode,
282 invertColors,
283 isGif,
284 isWebm,
285 });
286
287 if (!fs.existsSync(outputPath)) {
288 throw new Error('ffmpeg 未生成输出文件');
289 }
290 }
291

Callers 1

Calls 1

runFfmpegTransformMethod · 0.95

Tested by

no test coverage detected