From dbd52189396b9f1d8a91067eb6c261cadf7d8815 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=82=AB=E7=82=AB?= <2066855608@qq.com> Date: Tue, 24 Dec 2024 21:08:21 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=8A=96=E9=9F=B3=E5=90=88=E8=BE=91?= =?UTF-8?q?=E8=A7=86=E9=A2=91=E5=90=88=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/module/utils/FFmpeg.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/module/utils/FFmpeg.ts b/src/module/utils/FFmpeg.ts index 4bb2d71..baaac78 100644 --- a/src/module/utils/FFmpeg.ts +++ b/src/module/utils/FFmpeg.ts @@ -103,7 +103,7 @@ class FFmpeg { case '视频*3 + 音频': { const result = await ffmpeg(`-y -stream_loop 2 -i ${opt.path} -i ${opt.path2} -filter_complex "[0:v]setpts=N/FRAME_RATE/TB[v];[0:a][1:a]amix=inputs=2:duration=shortest:dropout_transition=3[aout]" -map "[v]" -map "[aout]" -c:v libx264 -c:a aac -b:a 192k -shortest ${opt.resultPath}`, { booleanResult: true }) result ? logger.mark('视频合成成功!') : logger.error('视频合成失败!') - await opt.callback(result) + await opt.callback(result, opt.resultPath) return result as unknown as MergeFileResult // 布尔类型 } case '获取指定视频文件时长': {