]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Fix broken HLS playback with some audio streams
authorChocobozzz <me@florianbigard.com>
Tue, 2 Feb 2021 10:19:46 +0000 (11:19 +0100)
committerChocobozzz <me@florianbigard.com>
Tue, 2 Feb 2021 10:19:46 +0000 (11:19 +0100)
server/helpers/ffprobe-utils.ts

index fefed25ae18599c4609dd4b4ba0da799ce59b72b..d2476606e8edc51a9bee759b9d5de00a948fbea8 100644 (file)
@@ -262,6 +262,10 @@ async function canDoQuickAudioTranscode (path: string, probe?: ffmpeg.FfprobeDat
   const maxAudioBitrate = getMaxAudioBitrate('aac', audioBitrate)
   if (maxAudioBitrate !== -1 && audioBitrate > maxAudioBitrate) return false
 
+  const channelLayout = parsedAudio.audioStream['channel_layout']
+  // Causes playback issues with Chrome
+  if (!channelLayout || channelLayout === 'unknown') return false
+
   return true
 }