From: Chocobozzz Date: Fri, 3 Apr 2020 12:06:31 +0000 (+0200) Subject: Fix video codec in HLS playlist X-Git-Tag: v2.2.0-rc.1~281 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=a2b6ec7c3f6176ac7028b1f23899ebec3217c8cd;p=oweals%2Fpeertube.git Fix video codec in HLS playlist --- diff --git a/server/helpers/ffmpeg-utils.ts b/server/helpers/ffmpeg-utils.ts index e0e408ea0..9dac4448e 100644 --- a/server/helpers/ffmpeg-utils.ts +++ b/server/helpers/ffmpeg-utils.ts @@ -125,7 +125,8 @@ async function getVideoStreamCodec (path: string) { baseProfile = baseProfileMatrix['High'] // Fallback } - const level = videoStream.level.toString(16) + let level = videoStream.level.toString(16) + if (level.length === 1) level = `0${level}` return `${videoCodec}.${baseProfile}${level}` }