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

Method convertWithLowerQuality

gif/gif.ts:303–317  ·  view source on GitHub ↗
(inputFile: string, outputFile: string)

Source from the content-addressed store, hash-verified

301 }
302 }
303
304 private async convertWithLowerQuality(inputFile: string, outputFile: string): Promise<void> {
305 const lowerQuality = Math.min(31, this.config.quality + 10);
306 await execFileAsync("ffmpeg", [
307 "-i", inputFile,
308 "-t", this.config.maxDuration.toString(),
309 "-vf", "scale=320:320:force_original_aspect_ratio=decrease",
310 "-c:v", "libvpx-vp9",
311 "-crf", lowerQuality.toString(),
312 "-b:v", "0",
313 "-an",
314 "-f", "webm",
315 "-y",
316 outputFile
317 ]);
318 }
319
320 private async sendAsSticker(originalMsg: Api.Message, stickerFile: string): Promise<void> {

Callers 1

convertWithFFmpegMethod · 0.95

Calls 1

execFileAsyncFunction · 0.85

Tested by

no test coverage detected