aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/ffmpeg/ffprobe-utils.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/helpers/ffmpeg/ffprobe-utils.ts')
-rw-r--r--server/helpers/ffmpeg/ffprobe-utils.ts5
1 files changed, 4 insertions, 1 deletions
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: {
96 type: 'vod' | 'live' 96 type: 'vod' | 'live'
97 includeInput: boolean 97 includeInput: boolean
98 strictLower: boolean 98 strictLower: boolean
99 hasAudio: boolean
99}) { 100}) {
100 const { input, type, includeInput, strictLower } = options 101 const { input, type, includeInput, strictLower, hasAudio } = options
101 102
102 const configResolutions = type === 'vod' 103 const configResolutions = type === 'vod'
103 ? CONFIG.TRANSCODING.RESOLUTIONS 104 ? CONFIG.TRANSCODING.RESOLUTIONS
@@ -125,6 +126,8 @@ function computeResolutionsToTranscode (options: {
125 if (input < resolution) continue 126 if (input < resolution) continue
126 // We only want lower resolutions than input file 127 // We only want lower resolutions than input file
127 if (strictLower && input === resolution) continue 128 if (strictLower && input === resolution) continue
129 // Audio resolutio but no audio in the video
130 if (resolution === VideoResolution.H_NOVIDEO && !hasAudio) continue
128 131
129 resolutionsEnabled.add(resolution) 132 resolutionsEnabled.add(resolution)
130 } 133 }