1
0
Fork 0

Fix level for AV1

This commit is contained in:
Chocobozzz 2022-09-09 15:02:28 +02:00
parent ec8c188b14
commit 01ec3975e0
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 3 additions and 5 deletions

View File

@ -55,17 +55,15 @@ async function getVideoStreamCodec (path: string) {
baseProfile = baseProfileMatrix[videoCodec]['High'] // Fallback baseProfile = baseProfileMatrix[videoCodec]['High'] // Fallback
} }
if (videoCodec === 'av01') { let level = videoStream.level.toString(16)
const level = videoStream.level if (level.length === 1) level = `0${level}`
if (videoCodec === 'av01') {
// 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`
} }
// Default, h264 codec // Default, h264 codec
let level = videoStream.level.toString(16)
if (level.length === 1) level = `0${level}`
return `${videoCodec}.${baseProfile}${level}` return `${videoCodec}.${baseProfile}${level}`
} }