X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;ds=sidebyside;f=server%2Fhelpers%2Fffprobe-utils.ts;h=e15628e2a7ff428251eab933e803e8cc1b800717;hb=795212f7acc690c88c86d0fab8772f6564d59cb8;hp=767f37f9ca3141fbfd539321e1605c42908c1ba0;hpb=10ef089102f2225c5ec3ed426bc612e4f2bc8655;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/helpers/ffprobe-utils.ts b/server/helpers/ffprobe-utils.ts index 767f37f9c..e15628e2a 100644 --- a/server/helpers/ffprobe-utils.ts +++ b/server/helpers/ffprobe-utils.ts @@ -206,7 +206,7 @@ async function getVideoStreamFromFile (path: string, existingProbe?: FfprobeData return metadata.streams.find(s => s.codec_type === 'video') || null } -function computeResolutionsToTranscode (videoFileResolution: number, type: 'vod' | 'live') { +function computeLowerResolutionsToTranscode (videoFileResolution: number, type: 'vod' | 'live') { const configResolutions = type === 'vod' ? CONFIG.TRANSCODING.RESOLUTIONS : CONFIG.LIVE.TRANSCODING.RESOLUTIONS @@ -214,12 +214,13 @@ function computeResolutionsToTranscode (videoFileResolution: number, type: 'vod' const resolutionsEnabled: number[] = [] // Put in the order we want to proceed jobs - const resolutions = [ + const resolutions: VideoResolution[] = [ VideoResolution.H_NOVIDEO, VideoResolution.H_480P, VideoResolution.H_360P, VideoResolution.H_720P, VideoResolution.H_240P, + VideoResolution.H_144P, VideoResolution.H_1080P, VideoResolution.H_1440P, VideoResolution.H_4K @@ -326,7 +327,7 @@ export { getVideoFileFPS, ffprobePromise, getClosestFramerateStandard, - computeResolutionsToTranscode, + computeLowerResolutionsToTranscode, getVideoFileBitrate, canDoQuickTranscode, canDoQuickVideoTranscode,