aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts/create-transcoding-job.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 /scripts/create-transcoding-job.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 'scripts/create-transcoding-job.ts')
-rwxr-xr-xscripts/create-transcoding-job.ts10
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)