X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fhelpers%2Fffmpeg%2Fffprobe-utils.ts;h=2c6253d44fc50ca576c7ddccc1f2abbbda70985c;hb=91a4893063402d7beabb3104f9b989b8f88b6038;hp=8ef42e792445d7f56ea5fb5a496b23a022fad36c;hpb=01ec3975e0775163740607b45e5a35ffc25b55ed;p=github%2FChocobozzz%2FPeerTube.git 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}` }