aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-09-09 15:02:28 +0200
committerChocobozzz <me@florianbigard.com>2022-09-09 15:02:28 +0200
commit01ec3975e0775163740607b45e5a35ffc25b55ed (patch)
treef79aef97ec196f897676c329a4c171165db4df99 /server/helpers
parentec8c188b144fa710e8c0ccade707e7105f98ae22 (diff)
downloadPeerTube-01ec3975e0775163740607b45e5a35ffc25b55ed.tar.gz
PeerTube-01ec3975e0775163740607b45e5a35ffc25b55ed.tar.zst
PeerTube-01ec3975e0775163740607b45e5a35ffc25b55ed.zip
Fix level for AV1
Diffstat (limited to 'server/helpers')
-rw-r--r--server/helpers/ffmpeg/ffprobe-utils.ts8
1 files changed, 3 insertions, 5 deletions
diff --git a/server/helpers/ffmpeg/ffprobe-utils.ts b/server/helpers/ffmpeg/ffprobe-utils.ts
index 9746c2046..8ef42e792 100644
--- a/server/helpers/ffmpeg/ffprobe-utils.ts
+++ b/server/helpers/ffmpeg/ffprobe-utils.ts
@@ -55,17 +55,15 @@ async function getVideoStreamCodec (path: string) {
55 baseProfile = baseProfileMatrix[videoCodec]['High'] // Fallback 55 baseProfile = baseProfileMatrix[videoCodec]['High'] // Fallback
56 } 56 }
57 57
58 if (videoCodec === 'av01') { 58 let level = videoStream.level.toString(16)
59 const level = videoStream.level 59 if (level.length === 1) level = `0${level}`
60 60
61 if (videoCodec === 'av01') {
61 // Guess the tier indicator and bit depth 62 // Guess the tier indicator and bit depth
62 return `${videoCodec}.${baseProfile}.${level}M.08` 63 return `${videoCodec}.${baseProfile}.${level}M.08`
63 } 64 }
64 65
65 // Default, h264 codec 66 // Default, h264 codec
66 let level = videoStream.level.toString(16)
67 if (level.length === 1) level = `0${level}`
68
69 return `${videoCodec}.${baseProfile}${level}` 67 return `${videoCodec}.${baseProfile}${level}`
70} 68}
71 69