From cc5f412ac8f429a4a1a4be7584f57822cf753b60 Mon Sep 17 00:00:00 2001 From: lifegpc Date: Thu, 24 Oct 2024 13:27:21 +0800 Subject: [PATCH] Fix bug --- thumbnail/ffmpeg_binary.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/thumbnail/ffmpeg_binary.ts b/thumbnail/ffmpeg_binary.ts index e72908f..65a8dcf 100644 --- a/thumbnail/ffmpeg_binary.ts +++ b/thumbnail/ffmpeg_binary.ts @@ -101,8 +101,13 @@ export async function fb_generate_thumbnail( `${cfg.quality}`, "-qmax", `${cfg.quality}`, - o, + "-f", + "image2", ]; + if (fmt == ThumbnailFormat.WEBP) { + args.push("-quality", "100"); + } + args.push(o); const cmd = new Deno.Command(p, { args, stdout: "null", stderr: "piped" }); const c = cmd.spawn(); const s = await c.output();