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 --- scripts/create-transcoding-job.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'scripts') diff --git a/scripts/create-transcoding-job.ts b/scripts/create-transcoding-job.ts index ffdf55ae4..c77a5805f 100755 --- a/scripts/create-transcoding-job.ts +++ b/scripts/create-transcoding-job.ts @@ -49,11 +49,14 @@ async function run () { const dataInput: VideoTranscodingPayload[] = [] const maxResolution = video.getMaxQualityFile().resolution + // FIXME: check the file has audio + const hasAudio = true + // Generate HLS files if (options.generateHls || CONFIG.TRANSCODING.WEBTORRENT.ENABLED === false) { const resolutionsEnabled = options.resolution ? [ parseInt(options.resolution) ] - : computeResolutionsToTranscode({ input: maxResolution, type: 'vod', includeInput: true, strictLower: false }) + : computeResolutionsToTranscode({ input: maxResolution, type: 'vod', includeInput: true, strictLower: false, hasAudio }) for (const resolution of resolutionsEnabled) { dataInput.push({ @@ -61,7 +64,7 @@ async function run () { videoUUID: video.uuid, resolution, - hasAudio: true, + hasAudio, copyCodecs: false, isNewVideo: false, @@ -77,8 +80,7 @@ async function run () { createHLSIfNeeded: true, - // FIXME: check the file has audio - hasAudio: true, + hasAudio, isNewVideo: false, resolution: parseInt(options.resolution) -- cgit v1.2.3