aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/transcoding
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-08-10 16:05:38 +0200
committerChocobozzz <me@florianbigard.com>2022-08-10 16:05:38 +0200
commit4fd6dcfb4432b71549fb2d4c3cc3b92f34c29665 (patch)
tree4544b2cc4a80ca058669e460b560a3b9924ad8ad /server/lib/transcoding
parent0cfc8c4fe4f44ef98b7be3683dae76da8236e641 (diff)
downloadPeerTube-4fd6dcfb4432b71549fb2d4c3cc3b92f34c29665.tar.gz
PeerTube-4fd6dcfb4432b71549fb2d4c3cc3b92f34c29665.tar.zst
PeerTube-4fd6dcfb4432b71549fb2d4c3cc3b92f34c29665.zip
Fix transcoding of quad audio channels
Diffstat (limited to 'server/lib/transcoding')
-rw-r--r--server/lib/transcoding/default-transcoding-profiles.ts7
1 files changed, 5 insertions, 2 deletions
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
76 76
77 logger.debug('Calculating audio bitrate of %s by AAC encoder.', input, { bitrate: parsedAudio.bitrate, audioCodecName }) 77 logger.debug('Calculating audio bitrate of %s by AAC encoder.', input, { bitrate: parsedAudio.bitrate, audioCodecName })
78 78
79 // Force stereo as it causes some issues with HLS playback in Chrome
80 const base = [ '-channel_layout', 'stereo' ]
81
79 if (bitrate !== -1) { 82 if (bitrate !== -1) {
80 return { outputOptions: [ buildStreamSuffix('-b:a', streamNum), bitrate + 'k' ] } 83 return { outputOptions: base.concat([ buildStreamSuffix('-b:a', streamNum), bitrate + 'k' ]) }
81 } 84 }
82 85
83 return { outputOptions: [ ] } 86 return { outputOptions: base }
84} 87}
85 88
86const defaultLibFDKAACVODOptionsBuilder: EncoderOptionsBuilder = ({ streamNum }) => { 89const defaultLibFDKAACVODOptionsBuilder: EncoderOptionsBuilder = ({ streamNum }) => {