diff options
author | Chocobozzz <me@florianbigard.com> | 2022-08-05 10:36:19 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-08-09 09:18:07 +0200 |
commit | 84cae54e7a2595bea0c3ea106a4d111fd11a4ec6 (patch) | |
tree | 03fe73edf049ce60df6bbc34dcfb2031c07ea59c /scripts/create-transcoding-job.ts | |
parent | 7e0f50d6e0c7dc583d40e196c283eb20dc386ae6 (diff) | |
download | PeerTube-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-x | scripts/create-transcoding-job.ts | 6 |
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 @@ | |||
1 | import { program } from 'commander' | 1 | import { program } from 'commander' |
2 | import { isUUIDValid, toCompleteUUID } from '@server/helpers/custom-validators/misc' | 2 | import { isUUIDValid, toCompleteUUID } from '@server/helpers/custom-validators/misc' |
3 | import { computeLowerResolutionsToTranscode } from '@server/helpers/ffmpeg' | 3 | import { computeResolutionsToTranscode } from '@server/helpers/ffmpeg' |
4 | import { CONFIG } from '@server/initializers/config' | 4 | import { CONFIG } from '@server/initializers/config' |
5 | import { addTranscodingJob } from '@server/lib/video' | 5 | import { addTranscodingJob } from '@server/lib/video' |
6 | import { VideoState, VideoTranscodingPayload } from '@shared/models' | 6 | import { 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, |