]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Don't use hexa for av01 codec
authorChocobozzz <me@florianbigard.com>
Mon, 12 Sep 2022 08:15:42 +0000 (10:15 +0200)
committerChocobozzz <me@florianbigard.com>
Mon, 12 Sep 2022 08:15:42 +0000 (10:15 +0200)
server/helpers/ffmpeg/ffprobe-utils.ts

index 8ef42e792445d7f56ea5fb5a496b23a022fad36c..2c6253d44fc50ca576c7ddccc1f2abbbda70985c 100644 (file)
@@ -55,14 +55,17 @@ async function getVideoStreamCodec (path: string) {
     baseProfile = baseProfileMatrix[videoCodec]['High'] // Fallback
   }
 
-  let level = videoStream.level.toString(16)
-  if (level.length === 1) level = `0${level}`
-
   if (videoCodec === 'av01') {
+    let level = videoStream.level.toString()
+    if (level.length === 1) level = `0${level}`
+
     // Guess the tier indicator and bit depth
     return `${videoCodec}.${baseProfile}.${level}M.08`
   }
 
+  let level = videoStream.level.toString(16)
+  if (level.length === 1) level = `0${level}`
+
   // Default, h264 codec
   return `${videoCodec}.${baseProfile}${level}`
 }