From d3793c7a548432f05bd8fffba1892ffa957428c6 Mon Sep 17 00:00:00 2001 From: wukko Date: Tue, 24 Jun 2025 20:46:14 +0600 Subject: [PATCH] api/ffmpeg: map video and audio in remux() with one main input cuz otherwise if a video has subtitles, then only subtitles get mapped to the output file --- api/src/stream/ffmpeg.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/api/src/stream/ffmpeg.js b/api/src/stream/ffmpeg.js index d8e69676..3e05d072 100644 --- a/api/src/stream/ffmpeg.js +++ b/api/src/stream/ffmpeg.js @@ -118,6 +118,8 @@ const remux = async (streamInfo, res) => { '-c:v', 'copy', ); } else { + args.push('-map', '0:v:0'); + args.push('-map', '0:a:0'); args.push('-c:v', 'copy'); }