diff options
Diffstat (limited to 'scripts/create-transcoding-job.ts')
-rwxr-xr-x | scripts/create-transcoding-job.ts | 10 |
1 files changed, 6 insertions, 4 deletions
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 () { | |||
49 | const dataInput: VideoTranscodingPayload[] = [] | 49 | const dataInput: VideoTranscodingPayload[] = [] |
50 | const maxResolution = video.getMaxQualityFile().resolution | 50 | const maxResolution = video.getMaxQualityFile().resolution |
51 | 51 | ||
52 | // FIXME: check the file has audio | ||
53 | const hasAudio = true | ||
54 | |||
52 | // Generate HLS files | 55 | // Generate HLS files |
53 | if (options.generateHls || CONFIG.TRANSCODING.WEBTORRENT.ENABLED === false) { | 56 | if (options.generateHls || CONFIG.TRANSCODING.WEBTORRENT.ENABLED === false) { |
54 | const resolutionsEnabled = options.resolution | 57 | const resolutionsEnabled = options.resolution |
55 | ? [ parseInt(options.resolution) ] | 58 | ? [ parseInt(options.resolution) ] |
56 | : computeResolutionsToTranscode({ input: maxResolution, type: 'vod', includeInput: true, strictLower: false }) | 59 | : computeResolutionsToTranscode({ input: maxResolution, type: 'vod', includeInput: true, strictLower: false, hasAudio }) |
57 | 60 | ||
58 | for (const resolution of resolutionsEnabled) { | 61 | for (const resolution of resolutionsEnabled) { |
59 | dataInput.push({ | 62 | dataInput.push({ |
@@ -61,7 +64,7 @@ async function run () { | |||
61 | videoUUID: video.uuid, | 64 | videoUUID: video.uuid, |
62 | resolution, | 65 | resolution, |
63 | 66 | ||
64 | hasAudio: true, | 67 | hasAudio, |
65 | 68 | ||
66 | copyCodecs: false, | 69 | copyCodecs: false, |
67 | isNewVideo: false, | 70 | isNewVideo: false, |
@@ -77,8 +80,7 @@ async function run () { | |||
77 | 80 | ||
78 | createHLSIfNeeded: true, | 81 | createHLSIfNeeded: true, |
79 | 82 | ||
80 | // FIXME: check the file has audio | 83 | hasAudio, |
81 | hasAudio: true, | ||
82 | 84 | ||
83 | isNewVideo: false, | 85 | isNewVideo: false, |
84 | resolution: parseInt(options.resolution) | 86 | resolution: parseInt(options.resolution) |