aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/live/live-manager.ts
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/lib/live/live-manager.ts
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/lib/live/live-manager.ts')
-rw-r--r--server/lib/live/live-manager.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/lib/live/live-manager.ts b/server/lib/live/live-manager.ts
index 9470b530b..5e459f3c3 100644
--- a/server/lib/live/live-manager.ts
+++ b/server/lib/live/live-manager.ts
@@ -245,7 +245,7 @@ class LiveManager {
245 ) 245 )
246 246
247 const allResolutions = await Hooks.wrapObject( 247 const allResolutions = await Hooks.wrapObject(
248 this.buildAllResolutionsToTranscode(resolution), 248 this.buildAllResolutionsToTranscode(resolution, hasAudio),
249 'filter:transcoding.auto.resolutions-to-transcode.result', 249 'filter:transcoding.auto.resolutions-to-transcode.result',
250 { video } 250 { video }
251 ) 251 )
@@ -460,11 +460,11 @@ class LiveManager {
460 return join(directory, files.sort().reverse()[0]) 460 return join(directory, files.sort().reverse()[0])
461 } 461 }
462 462
463 private buildAllResolutionsToTranscode (originResolution: number) { 463 private buildAllResolutionsToTranscode (originResolution: number, hasAudio: boolean) {
464 const includeInput = CONFIG.LIVE.TRANSCODING.ALWAYS_TRANSCODE_ORIGINAL_RESOLUTION 464 const includeInput = CONFIG.LIVE.TRANSCODING.ALWAYS_TRANSCODE_ORIGINAL_RESOLUTION
465 465
466 const resolutionsEnabled = CONFIG.LIVE.TRANSCODING.ENABLED 466 const resolutionsEnabled = CONFIG.LIVE.TRANSCODING.ENABLED
467 ? computeResolutionsToTranscode({ input: originResolution, type: 'live', includeInput, strictLower: false }) 467 ? computeResolutionsToTranscode({ input: originResolution, type: 'live', includeInput, strictLower: false, hasAudio })
468 : [] 468 : []
469 469
470 if (resolutionsEnabled.length === 0) { 470 if (resolutionsEnabled.length === 0) {