1
0
Fork 0

Don't use hexa for av01 codec

This commit is contained in:
Chocobozzz 2022-09-12 10:15:42 +02:00
parent cef2306a1e
commit 31951badb3
No known key found for this signature in database
GPG key ID: 583A612D890159BE

View file

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