feat: cria nixpacks.toml para instalar o FFmpeg no container e chama executavel no path

This commit is contained in:
2026-06-03 13:32:20 +00:00
parent a03a006b96
commit 180990ea5f
2 changed files with 3 additions and 1 deletions
+2
View File
@@ -0,0 +1,2 @@
[phases.setup]
nixPkgs = ["...", "ffmpeg"]
+1 -1
View File
@@ -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);