From f3521da9c144736baf4d96f31b090d22eb63ab4e Mon Sep 17 00:00:00 2001 From: wukko Date: Sun, 1 Sep 2024 14:09:58 +0600 Subject: [PATCH] api/stream/remux: convert audio to aac to increase compatibility only applies to hls exceptions --- api/src/stream/types.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/api/src/stream/types.js b/api/src/stream/types.js index 0f2d0405..1076468d 100644 --- a/api/src/stream/types.js +++ b/api/src/stream/types.js @@ -158,15 +158,18 @@ const remux = (streamInfo, res) => { args.push( '-i', streamInfo.urls, - '-c', 'copy' + '-c:v', 'copy', ) if (streamInfo.type === "mute") { - args.push('-an') + args.push('-an'); } if (hlsExceptions.includes(streamInfo.service)) { - args.push('-bsf:a', 'aac_adtstoasc') + if (streamInfo.type !== "mute") { + args.push('-c:a', 'aac') + } + args.push('-bsf:a', 'aac_adtstoasc'); } let format = streamInfo.filename.split('.')[streamInfo.filename.split('.').length - 1];