mirror of https://github.com/Chocobozzz/PeerTube
Fix level for AV1
parent
ec8c188b14
commit
01ec3975e0
|
@ -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}`
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue