diff options
author | Chocobozzz <me@florianbigard.com> | 2022-09-12 10:15:42 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-09-12 10:15:42 +0200 |
commit | 31951badb3f0582bb0c8b7cfc81ade438af824b7 (patch) | |
tree | 460d799d133390d024ee838c52d716f95d0d7df1 | |
parent | cef2306a1e4410bd7f48e749614be864aa003c3b (diff) | |
download | PeerTube-31951badb3f0582bb0c8b7cfc81ade438af824b7.tar.gz PeerTube-31951badb3f0582bb0c8b7cfc81ade438af824b7.tar.zst PeerTube-31951badb3f0582bb0c8b7cfc81ade438af824b7.zip |
Don't use hexa for av01 codec
-rw-r--r-- | server/helpers/ffmpeg/ffprobe-utils.ts | 9 |
1 files changed, 6 insertions, 3 deletions
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) { | |||
55 | baseProfile = baseProfileMatrix[videoCodec]['High'] // Fallback | 55 | baseProfile = baseProfileMatrix[videoCodec]['High'] // Fallback |
56 | } | 56 | } |
57 | 57 | ||
58 | let level = videoStream.level.toString(16) | ||
59 | if (level.length === 1) level = `0${level}` | ||
60 | |||
61 | if (videoCodec === 'av01') { | 58 | if (videoCodec === 'av01') { |
59 | let level = videoStream.level.toString() | ||
60 | if (level.length === 1) level = `0${level}` | ||
61 | |||
62 | // Guess the tier indicator and bit depth | 62 | // Guess the tier indicator and bit depth |
63 | return `${videoCodec}.${baseProfile}.${level}M.08` | 63 | return `${videoCodec}.${baseProfile}.${level}M.08` |
64 | } | 64 | } |
65 | 65 | ||
66 | let level = videoStream.level.toString(16) | ||
67 | if (level.length === 1) level = `0${level}` | ||
68 | |||
66 | // Default, h264 codec | 69 | // Default, h264 codec |
67 | return `${videoCodec}.${baseProfile}${level}` | 70 | return `${videoCodec}.${baseProfile}${level}` |
68 | } | 71 | } |