aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-11-07 10:25:24 +0100
committerChocobozzz <me@florianbigard.com>2022-11-07 10:25:24 +0100
commita32bf8cd20212b903d3fa478e629f051eb77fecc (patch)
tree2a0372477ae2d76c31fc749054e78f1d067807d3 /server/helpers
parent11ae7e2917ddf6e3c8e53d0855fd786163112d59 (diff)
downloadPeerTube-a32bf8cd20212b903d3fa478e629f051eb77fecc.tar.gz
PeerTube-a32bf8cd20212b903d3fa478e629f051eb77fecc.tar.zst
PeerTube-a32bf8cd20212b903d3fa478e629f051eb77fecc.zip
Fix running again transcoding on a video only file
Diffstat (limited to 'server/helpers')
-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 }