From 01ec3975e0775163740607b45e5a35ffc25b55ed Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 9 Sep 2022 15:02:28 +0200 Subject: Fix level for AV1 --- server/helpers/ffmpeg/ffprobe-utils.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/server/helpers/ffmpeg/ffprobe-utils.ts b/server/helpers/ffmpeg/ffprobe-utils.ts index 9746c2046..8ef42e792 100644 --- a/server/helpers/ffmpeg/ffprobe-utils.ts +++ b/server/helpers/ffmpeg/ffprobe-utils.ts @@ -55,17 +55,15 @@ async function getVideoStreamCodec (path: string) { baseProfile = baseProfileMatrix[videoCodec]['High'] // Fallback } - if (videoCodec === 'av01') { - const level = videoStream.level + let level = videoStream.level.toString(16) + if (level.length === 1) level = `0${level}` + if (videoCodec === 'av01') { // Guess the tier indicator and bit depth return `${videoCodec}.${baseProfile}.${level}M.08` } // Default, h264 codec - let level = videoStream.level.toString(16) - if (level.length === 1) level = `0${level}` - return `${videoCodec}.${baseProfile}${level}` } -- cgit v1.2.3