From fdb17e08b97d3052eb02869580373aaec5aedf96 Mon Sep 17 00:00:00 2001 From: tamaina Date: Mon, 7 Feb 2022 03:22:00 +0900 Subject: [PATCH] =?UTF-8?q?=E5=8B=95=E7=94=BB=E3=82=B5=E3=83=A0=E3=83=8D?= =?UTF-8?q?=E3=82=A4=E3=83=AB=E3=81=AFjpeg=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../backend/src/services/drive/generate-video-thumbnail.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/backend/src/services/drive/generate-video-thumbnail.ts b/packages/backend/src/services/drive/generate-video-thumbnail.ts index 439079196..c3ff98bc3 100644 --- a/packages/backend/src/services/drive/generate-video-thumbnail.ts +++ b/packages/backend/src/services/drive/generate-video-thumbnail.ts @@ -1,6 +1,6 @@ import * as fs from 'fs'; import * as tmp from 'tmp'; -import { IImage, convertToWebp } from './image-processor'; +import { IImage, convertToJpeg } from './image-processor'; import * as FFmpeg from 'fluent-ffmpeg'; export async function GenerateVideoThumbnail(path: string): Promise { @@ -27,7 +27,8 @@ export async function GenerateVideoThumbnail(path: string): Promise { const outPath = `${outDir}/output.png`; - const thumbnail = await convertToWebp(outPath, 498, 280); + // JPEGに変換 (Webpでもいいが、MastodonはWebpをサポートせず表示できなくなる) + const thumbnail = await convertToJpeg(outPath, 498, 280); // cleanup await fs.promises.unlink(outPath);