From 31951badb3f0582bb0c8b7cfc81ade438af824b7 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 12 Sep 2022 10:15:42 +0200 Subject: Don't use hexa for av01 codec --- server/helpers/ffmpeg/ffprobe-utils.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'server/helpers/ffmpeg/ffprobe-utils.ts') diff --git a/server/helpers/ffmpeg/ffprobe-utils.ts b/server/helpers/ffmpeg/ffprobe-utils.ts index 8ef42e792..2c6253d44 100644 --- a/server/helpers/ffmpeg/ffprobe-utils.ts +++ b/server/helpers/ffmpeg/ffprobe-utils.ts @@ -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}` } -- cgit v1.2.3