aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/job-queue/handlers/video-transcoding.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-08-06 13:35:25 +0200
committerChocobozzz <me@florianbigard.com>2021-08-06 14:13:26 +0200
commit679c12e69c9f3a2d003ee3abe8b8da49f25b2bd3 (patch)
tree03abf589275db05e5b1fa1c89f57049cd807324a /server/lib/job-queue/handlers/video-transcoding.ts
parentc826f34a45757b324a20f71665b44ed10e6953b5 (diff)
downloadPeerTube-679c12e69c9f3a2d003ee3abe8b8da49f25b2bd3.tar.gz
PeerTube-679c12e69c9f3a2d003ee3abe8b8da49f25b2bd3.tar.zst
PeerTube-679c12e69c9f3a2d003ee3abe8b8da49f25b2bd3.zip
Improve target bitrate calculation
Diffstat (limited to 'server/lib/job-queue/handlers/video-transcoding.ts')
-rw-r--r--server/lib/job-queue/handlers/video-transcoding.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/lib/job-queue/handlers/video-transcoding.ts b/server/lib/job-queue/handlers/video-transcoding.ts
index 2abb351ce..876d1460c 100644
--- a/server/lib/job-queue/handlers/video-transcoding.ts
+++ b/server/lib/job-queue/handlers/video-transcoding.ts
@@ -136,7 +136,7 @@ async function onVideoFileOptimizer (
136 if (videoArg === undefined) return undefined 136 if (videoArg === undefined) return undefined
137 137
138 // Outside the transaction (IO on disk) 138 // Outside the transaction (IO on disk)
139 const { videoFileResolution, isPortraitMode } = await videoArg.getMaxQualityResolution() 139 const { resolution, isPortraitMode } = await videoArg.getMaxQualityResolution()
140 140
141 // Maybe the video changed in database, refresh it 141 // Maybe the video changed in database, refresh it
142 const videoDatabase = await VideoModel.loadAndPopulateAccountAndServerAndTags(videoArg.uuid) 142 const videoDatabase = await VideoModel.loadAndPopulateAccountAndServerAndTags(videoArg.uuid)
@@ -155,7 +155,7 @@ async function onVideoFileOptimizer (
155 }) 155 })
156 const hasHls = await createHlsJobIfEnabled(user, originalFileHLSPayload) 156 const hasHls = await createHlsJobIfEnabled(user, originalFileHLSPayload)
157 157
158 const hasNewResolutions = await createLowerResolutionsJobs(videoDatabase, user, videoFileResolution, isPortraitMode, 'webtorrent') 158 const hasNewResolutions = await createLowerResolutionsJobs(videoDatabase, user, resolution, isPortraitMode, 'webtorrent')
159 159
160 if (!hasHls && !hasNewResolutions) { 160 if (!hasHls && !hasNewResolutions) {
161 // No transcoding to do, it's now published 161 // No transcoding to do, it's now published