X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fhelpers%2Fffmpeg%2Fffprobe-utils.ts;h=2c6253d44fc50ca576c7ddccc1f2abbbda70985c;hb=91a4893063402d7beabb3104f9b989b8f88b6038;hp=c45f9ec99c2850c5314842b65f9f9071d59290e8;hpb=5e2afe4290103bf0d54ae7b3e62781f2a00487c9;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/helpers/ffmpeg/ffprobe-utils.ts b/server/helpers/ffmpeg/ffprobe-utils.ts index c45f9ec99..2c6253d44 100644 --- a/server/helpers/ffmpeg/ffprobe-utils.ts +++ b/server/helpers/ffmpeg/ffprobe-utils.ts @@ -56,16 +56,17 @@ async function getVideoStreamCodec (path: string) { } if (videoCodec === 'av01') { - const level = videoStream.level + 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` } - // Default, h264 codec let level = videoStream.level.toString(16) if (level.length === 1) level = `0${level}` + // Default, h264 codec return `${videoCodec}.${baseProfile}${level}` } @@ -163,7 +164,7 @@ async function canDoQuickAudioTranscode (path: string, probe?: FfprobeData): Pro const channelLayout = parsedAudio.audioStream['channel_layout'] // Causes playback issues with Chrome - if (!channelLayout || channelLayout === 'unknown') return false + if (!channelLayout || channelLayout === 'unknown' || channelLayout === 'quad') return false return true }