From 999a0d0e850e8bb539a7e771feb3b9afeddb26e7 Mon Sep 17 00:00:00 2001 From: orfelorfel23 Date: Sun, 9 Aug 2026 23:38:49 +0200 Subject: [PATCH] Fix FFmpeg WebM VP9 Alpha decoding issue during transcode --- server.mjs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/server.mjs b/server.mjs index caeef9d..c5aac63 100644 --- a/server.mjs +++ b/server.mjs @@ -387,7 +387,12 @@ async function runSequentialEncodes(session, inputVideoPath, inputAudioPath, tar session.currentStatus = `Rendere ${i+1}/${targetFormats.length}: ${formatId.toUpperCase()}...`; saveHistory(); - const ffmpegArgs = ['-y', '-i', inputVideoPath]; + const ffmpegArgs = ['-y']; + if (inputVideoPath.toLowerCase().endsWith('.webm')) { + ffmpegArgs.push('-c:v', 'libvpx-vp9'); + } + ffmpegArgs.push('-i', inputVideoPath); + if (inputAudioPath) { ffmpegArgs.push('-i', inputAudioPath); }