mirror of
https://github.com/wukko/cobalt.git
synced 2024-11-15 04:39:58 +00:00
api/stream/types/merge: encode audio to aac or opus if hls
audio is encoded to opus only if it's a youtube hls stream with webm container
This commit is contained in:
parent
b9a44f81a0
commit
f610058b82
1 changed files with 5 additions and 1 deletions
|
@ -102,7 +102,11 @@ const merge = (streamInfo, res) => {
|
|||
args = args.concat(ffmpegArgs[format]);
|
||||
|
||||
if (hlsExceptions.includes(streamInfo.service) && streamInfo.isHLS) {
|
||||
args.push('-bsf:a', 'aac_adtstoasc')
|
||||
if (streamInfo.service === "youtube" && format === "webm") {
|
||||
args.push('-c:a', 'libopus');
|
||||
} else {
|
||||
args.push('-c:a', 'aac', '-bsf:a', 'aac_adtstoasc');
|
||||
}
|
||||
}
|
||||
|
||||
if (streamInfo.metadata) {
|
||||
|
|
Loading…
Reference in a new issue