aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/create-transcoding-job.ts6
-rw-r--r--scripts/print-transcode-command.ts3
2 files changed, 3 insertions, 6 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,
diff --git a/scripts/print-transcode-command.ts b/scripts/print-transcode-command.ts
index ef671c0aa..ac60ff8a5 100644
--- a/scripts/print-transcode-command.ts
+++ b/scripts/print-transcode-command.ts
@@ -31,8 +31,7 @@ async function run (path: string, cmd: any) {
31 availableEncoders: VideoTranscodingProfilesManager.Instance.getAvailableEncoders(), 31 availableEncoders: VideoTranscodingProfilesManager.Instance.getAvailableEncoders(),
32 profile: 'default', 32 profile: 'default',
33 33
34 resolution: +cmd.resolution, 34 resolution: +cmd.resolution
35 isPortraitMode: false
36 } as TranscodeVODOptions 35 } as TranscodeVODOptions
37 36
38 let command = ffmpeg(options.inputPath) 37 let command = ffmpeg(options.inputPath)