(inputFile: string, outputFile: string)
| 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> { |
no test coverage detected