Fix video codec in HLS playlist
authorChocobozzz <me@florianbigard.com>
Fri, 3 Apr 2020 12:06:31 +0000 (14:06 +0200)
committerChocobozzz <me@florianbigard.com>
Fri, 3 Apr 2020 12:07:00 +0000 (14:07 +0200)
server/helpers/ffmpeg-utils.ts

index e0e408ea025436f2deab558977a8d2354b452954..9dac4448ec89df290de2ce1d7df2d70e02ceb639 100644 (file)
@@ -125,7 +125,8 @@ async function getVideoStreamCodec (path: string) {
     baseProfile = baseProfileMatrix['High'] // Fallback
   }
 
-  const level = videoStream.level.toString(16)
+  let level = videoStream.level.toString(16)
+  if (level.length === 1) level = `0${level}`
 
   return `${videoCodec}.${baseProfile}${level}`
 }