fix(media): encode gif-to-video WebM as yuv420p

GIFs decode to bgra/gbrap (alpha); libvpx-vp9 rejects those pixel formats so the encoder never opened (ffmpeg exit 234), breaking GIF->WebM for essentially every GIF. Flatten to yuv420p in the webm branch, matching what the mp4 branch already does.
This commit is contained in:
SnapOtter
2026-06-17 14:22:16 +08:00
parent 3120e6708d
commit e96c314ab9
@@ -34,6 +34,10 @@ export function registerGifToVideo(app: FastifyInstance) {
"0",
"-crf",
"32",
// GIFs decode to bgra/gbrap (alpha); libvpx-vp9 rejects those pixel
// formats, so flatten to yuv420p just like the mp4 branch does.
"-pix_fmt",
"yuv420p",
"-an",
out,
];