From 180990ea5fdd32fec72fd4646c3d00ea4aad5088 Mon Sep 17 00:00:00 2001 From: admtracksteel Date: Wed, 3 Jun 2026 13:32:20 +0000 Subject: [PATCH] feat: cria nixpacks.toml para instalar o FFmpeg no container e chama executavel no path --- nixpacks.toml | 2 ++ server.js | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 nixpacks.toml diff --git a/nixpacks.toml b/nixpacks.toml new file mode 100644 index 0000000..68b5f4c --- /dev/null +++ b/nixpacks.toml @@ -0,0 +1,2 @@ +[phases.setup] +nixPkgs = ["...", "ffmpeg"] diff --git a/server.js b/server.js index 182ddb6..e556879 100644 --- a/server.js +++ b/server.js @@ -490,7 +490,7 @@ app.post('/api/comics/generate-video', requireAuth, async (req, res) => { const totalDuration = frames.length * duration; // Comando FFmpeg: concatena as imagens, adiciona o áudio, ajusta o codec para h264/aac e encerra na duração final - const ffmpegCommand = `/usr/bin/ffmpeg -y -f concat -safe 0 -i "${concatFilePath}" -i "${bgMusicPath}" -c:v libx264 -pix_fmt yuv420p -c:a aac -shortest -t ${totalDuration} "${outputFilePath}"`; + const ffmpegCommand = `ffmpeg -y -f concat -safe 0 -i "${concatFilePath}" -i "${bgMusicPath}" -c:v libx264 -pix_fmt yuv420p -c:a aac -shortest -t ${totalDuration} "${outputFilePath}"`; console.log('[FFmpeg] Executando comando de vídeo:', ffmpegCommand);