diff options
author | Chocobozzz <me@florianbigard.com> | 2021-08-06 13:35:25 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-08-06 14:13:26 +0200 |
commit | 679c12e69c9f3a2d003ee3abe8b8da49f25b2bd3 (patch) | |
tree | 03abf589275db05e5b1fa1c89f57049cd807324a /scripts/create-transcoding-job.ts | |
parent | c826f34a45757b324a20f71665b44ed10e6953b5 (diff) | |
download | PeerTube-679c12e69c9f3a2d003ee3abe8b8da49f25b2bd3.tar.gz PeerTube-679c12e69c9f3a2d003ee3abe8b8da49f25b2bd3.tar.zst PeerTube-679c12e69c9f3a2d003ee3abe8b8da49f25b2bd3.zip |
Improve target bitrate calculation
Diffstat (limited to 'scripts/create-transcoding-job.ts')
-rwxr-xr-x | scripts/create-transcoding-job.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/create-transcoding-job.ts b/scripts/create-transcoding-job.ts index 65e65b616..3a552c19a 100755 --- a/scripts/create-transcoding-job.ts +++ b/scripts/create-transcoding-job.ts | |||
@@ -47,13 +47,13 @@ async function run () { | |||
47 | if (!video) throw new Error('Video not found.') | 47 | if (!video) throw new Error('Video not found.') |
48 | 48 | ||
49 | const dataInput: VideoTranscodingPayload[] = [] | 49 | const dataInput: VideoTranscodingPayload[] = [] |
50 | const { videoFileResolution } = await video.getMaxQualityResolution() | 50 | const { resolution } = await video.getMaxQualityResolution() |
51 | 51 | ||
52 | // Generate HLS files | 52 | // Generate HLS files |
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 | ? [ options.resolution ] | 55 | ? [ options.resolution ] |
56 | : computeResolutionsToTranscode(videoFileResolution, 'vod').concat([ videoFileResolution ]) | 56 | : computeResolutionsToTranscode(resolution, 'vod').concat([ resolution ]) |
57 | 57 | ||
58 | for (const resolution of resolutionsEnabled) { | 58 | for (const resolution of resolutionsEnabled) { |
59 | dataInput.push({ | 59 | dataInput.push({ |