X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fhelpers%2Fffprobe-utils.ts;h=ef2aa3f890e0a36856ca9aa87b300e30f0a513cd;hb=1f256e7d3cf056c2d999260155cdba58ae1b878b;hp=fefed25ae18599c4609dd4b4ba0da799ce59b72b;hpb=789951460bf724ac6a2f18097878fc735269ea71;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/helpers/ffprobe-utils.ts b/server/helpers/ffprobe-utils.ts index fefed25ae..ef2aa3f89 100644 --- a/server/helpers/ffprobe-utils.ts +++ b/server/helpers/ffprobe-utils.ts @@ -1,6 +1,5 @@ import * as ffmpeg from 'fluent-ffmpeg' -import { VideoFileMetadata } from '@shared/models/videos/video-file-metadata' -import { getMaxBitrate, VideoResolution } from '../../shared/models/videos' +import { getMaxBitrate, VideoFileMetadata, VideoResolution } from '../../shared/models/videos' import { CONFIG } from '../initializers/config' import { VIDEO_TRANSCODING_FPS } from '../initializers/constants' import { logger } from './logger' @@ -92,6 +91,7 @@ async function getVideoStreamCodec (path: string) { const videoCodec = videoStream.codec_tag_string if (videoCodec === 'vp09') return 'vp09.00.50.08' + if (videoCodec === 'hev1') return 'hev1.1.6.L93.B0' const baseProfileMatrix = { avc1: { @@ -262,6 +262,10 @@ async function canDoQuickAudioTranscode (path: string, probe?: ffmpeg.FfprobeDat const maxAudioBitrate = getMaxAudioBitrate('aac', audioBitrate) if (maxAudioBitrate !== -1 && audioBitrate > maxAudioBitrate) return false + const channelLayout = parsedAudio.audioStream['channel_layout'] + // Causes playback issues with Chrome + if (!channelLayout || channelLayout === 'unknown') return false + return true }