]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/helpers/ffmpeg/ffprobe-utils.ts
Merge branch 'release/4.3.0' into develop
[github/Chocobozzz/PeerTube.git] / 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}`
 }