aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts/create-transcoding-job.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-08-05 10:36:19 +0200
committerChocobozzz <me@florianbigard.com>2022-08-09 09:18:07 +0200
commit84cae54e7a2595bea0c3ea106a4d111fd11a4ec6 (patch)
tree03fe73edf049ce60df6bbc34dcfb2031c07ea59c /scripts/create-transcoding-job.ts
parent7e0f50d6e0c7dc583d40e196c283eb20dc386ae6 (diff)
downloadPeerTube-84cae54e7a2595bea0c3ea106a4d111fd11a4ec6.tar.gz
PeerTube-84cae54e7a2595bea0c3ea106a4d111fd11a4ec6.tar.zst
PeerTube-84cae54e7a2595bea0c3ea106a4d111fd11a4ec6.zip
Add option to not transcode original resolution
Diffstat (limited to 'scripts/create-transcoding-job.ts')
-rwxr-xr-xscripts/create-transcoding-job.ts6
1 files changed, 2 insertions, 4 deletions
diff --git a/scripts/create-transcoding-job.ts b/scripts/create-transcoding-job.ts
index 8f4d64290..b7761597e 100755
--- a/scripts/create-transcoding-job.ts
+++ b/scripts/create-transcoding-job.ts
@@ -1,6 +1,6 @@
1import { program } from 'commander' 1import { program } from 'commander'
2import { isUUIDValid, toCompleteUUID } from '@server/helpers/custom-validators/misc' 2import { isUUIDValid, toCompleteUUID } from '@server/helpers/custom-validators/misc'
3import { computeLowerResolutionsToTranscode } from '@server/helpers/ffmpeg' 3import { computeResolutionsToTranscode } from '@server/helpers/ffmpeg'
4import { CONFIG } from '@server/initializers/config' 4import { CONFIG } from '@server/initializers/config'
5import { addTranscodingJob } from '@server/lib/video' 5import { addTranscodingJob } from '@server/lib/video'
6import { VideoState, VideoTranscodingPayload } from '@shared/models' 6import { VideoState, VideoTranscodingPayload } from '@shared/models'
@@ -53,7 +53,7 @@ async function run () {
53 if (options.generateHls || CONFIG.TRANSCODING.WEBTORRENT.ENABLED === false) { 53 if (options.generateHls || CONFIG.TRANSCODING.WEBTORRENT.ENABLED === false) {
54 const resolutionsEnabled = options.resolution 54 const resolutionsEnabled = options.resolution
55 ? [ parseInt(options.resolution) ] 55 ? [ parseInt(options.resolution) ]
56 : computeLowerResolutionsToTranscode(maxResolution, 'vod').concat([ maxResolution ]) 56 : computeResolutionsToTranscode({ inputResolution: maxResolution, type: 'vod', includeInputResolution: true })
57 57
58 for (const resolution of resolutionsEnabled) { 58 for (const resolution of resolutionsEnabled) {
59 dataInput.push({ 59 dataInput.push({
@@ -61,8 +61,6 @@ async function run () {
61 videoUUID: video.uuid, 61 videoUUID: video.uuid,
62 resolution, 62 resolution,
63 63
64 // FIXME: check the file has audio and is not in portrait mode
65 isPortraitMode: false,
66 hasAudio: true, 64 hasAudio: true,
67 65
68 copyCodecs: false, 66 copyCodecs: false,