api/stream/remux: convert audio to aac to increase compatibility

only applies to hls exceptions
This commit is contained in:
wukko 2024-09-01 14:09:58 +06:00
parent ccdcd4cb09
commit f3521da9c1
No known key found for this signature in database
GPG key ID: 3E30B3F26C7B4AA2

View file

@ -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];