From 4fd6dcfb4432b71549fb2d4c3cc3b92f34c29665 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 10 Aug 2022 16:05:38 +0200 Subject: Fix transcoding of quad audio channels --- server/lib/transcoding/default-transcoding-profiles.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'server/lib/transcoding') diff --git a/server/lib/transcoding/default-transcoding-profiles.ts b/server/lib/transcoding/default-transcoding-profiles.ts index 8f01f57a5..f47718819 100644 --- a/server/lib/transcoding/default-transcoding-profiles.ts +++ b/server/lib/transcoding/default-transcoding-profiles.ts @@ -76,11 +76,14 @@ const defaultAACOptionsBuilder: EncoderOptionsBuilder = async ({ input, streamNu logger.debug('Calculating audio bitrate of %s by AAC encoder.', input, { bitrate: parsedAudio.bitrate, audioCodecName }) + // Force stereo as it causes some issues with HLS playback in Chrome + const base = [ '-channel_layout', 'stereo' ] + if (bitrate !== -1) { - return { outputOptions: [ buildStreamSuffix('-b:a', streamNum), bitrate + 'k' ] } + return { outputOptions: base.concat([ buildStreamSuffix('-b:a', streamNum), bitrate + 'k' ]) } } - return { outputOptions: [ ] } + return { outputOptions: base } } const defaultLibFDKAACVODOptionsBuilder: EncoderOptionsBuilder = ({ streamNum }) => { -- cgit v1.2.3