From a32bf8cd20212b903d3fa478e629f051eb77fecc Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 7 Nov 2022 10:25:24 +0100 Subject: Fix running again transcoding on a video only file --- server/helpers/ffmpeg/ffprobe-utils.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'server/helpers') diff --git a/server/helpers/ffmpeg/ffprobe-utils.ts b/server/helpers/ffmpeg/ffprobe-utils.ts index 2c6253d44..8cfdba4f9 100644 --- a/server/helpers/ffmpeg/ffprobe-utils.ts +++ b/server/helpers/ffmpeg/ffprobe-utils.ts @@ -96,8 +96,9 @@ function computeResolutionsToTranscode (options: { type: 'vod' | 'live' includeInput: boolean strictLower: boolean + hasAudio: boolean }) { - const { input, type, includeInput, strictLower } = options + const { input, type, includeInput, strictLower, hasAudio } = options const configResolutions = type === 'vod' ? CONFIG.TRANSCODING.RESOLUTIONS @@ -125,6 +126,8 @@ function computeResolutionsToTranscode (options: { if (input < resolution) continue // We only want lower resolutions than input file if (strictLower && input === resolution) continue + // Audio resolutio but no audio in the video + if (resolution === VideoResolution.H_NOVIDEO && !hasAudio) continue resolutionsEnabled.add(resolution) } -- cgit v1.2.3