aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts/create-transcoding-job.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-11-05 14:17:19 +0100
committerChocobozzz <me@florianbigard.com>2021-11-05 14:19:42 +0100
commit8aad7ae413e58ae2ef847c5e12419c45f4ff55be (patch)
treecece146fcd6bfa544893db9303955b5b2da995c2 /scripts/create-transcoding-job.ts
parentd91b23b11ca46debfee320ce5c5dfaeae5811bb7 (diff)
downloadPeerTube-8aad7ae413e58ae2ef847c5e12419c45f4ff55be.tar.gz
PeerTube-8aad7ae413e58ae2ef847c5e12419c45f4ff55be.tar.zst
PeerTube-8aad7ae413e58ae2ef847c5e12419c45f4ff55be.zip
Fix transcoding job with resolution
Diffstat (limited to 'scripts/create-transcoding-job.ts')
-rwxr-xr-xscripts/create-transcoding-job.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/create-transcoding-job.ts b/scripts/create-transcoding-job.ts
index 30846cd15..fe3bd26de 100755
--- a/scripts/create-transcoding-job.ts
+++ b/scripts/create-transcoding-job.ts
@@ -55,7 +55,7 @@ async function run () {
55 // Generate HLS files 55 // Generate HLS files
56 if (options.generateHls || CONFIG.TRANSCODING.WEBTORRENT.ENABLED === false) { 56 if (options.generateHls || CONFIG.TRANSCODING.WEBTORRENT.ENABLED === false) {
57 const resolutionsEnabled = options.resolution 57 const resolutionsEnabled = options.resolution
58 ? [ options.resolution ] 58 ? [ parseInt(options.resolution) ]
59 : computeResolutionsToTranscode(resolution, 'vod').concat([ resolution ]) 59 : computeResolutionsToTranscode(resolution, 'vod').concat([ resolution ])
60 60
61 for (const resolution of resolutionsEnabled) { 61 for (const resolution of resolutionsEnabled) {
@@ -75,7 +75,7 @@ async function run () {
75 type: 'new-resolution-to-webtorrent', 75 type: 'new-resolution-to-webtorrent',
76 videoUUID: video.uuid, 76 videoUUID: video.uuid,
77 isNewVideo: false, 77 isNewVideo: false,
78 resolution: options.resolution 78 resolution: parseInt(options.resolution)
79 }) 79 })
80 } else { 80 } else {
81 if (video.VideoFiles.length === 0) { 81 if (video.VideoFiles.length === 0) {