aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/job-queue/handlers
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/job-queue/handlers')
-rw-r--r--server/lib/job-queue/handlers/video-transcoding.ts9
1 files changed, 5 insertions, 4 deletions
diff --git a/server/lib/job-queue/handlers/video-transcoding.ts b/server/lib/job-queue/handlers/video-transcoding.ts
index ce1c419e7..7ebef46b4 100644
--- a/server/lib/job-queue/handlers/video-transcoding.ts
+++ b/server/lib/job-queue/handlers/video-transcoding.ts
@@ -75,7 +75,7 @@ async function onVideoFileOptimizerSuccess (videoArg: MVideoWithFile, payload: O
75 if (videoArg === undefined) return undefined 75 if (videoArg === undefined) return undefined
76 76
77 // Outside the transaction (IO on disk) 77 // Outside the transaction (IO on disk)
78 const { videoFileResolution } = await videoArg.getMaxQualityResolution() 78 const { videoFileResolution, isPortraitMode } = await videoArg.getMaxQualityResolution()
79 79
80 const { videoDatabase, videoPublished } = await sequelizeTypescript.transaction(async t => { 80 const { videoDatabase, videoPublished } = await sequelizeTypescript.transaction(async t => {
81 // Maybe the video changed in database, refresh it 81 // Maybe the video changed in database, refresh it
@@ -86,7 +86,7 @@ async function onVideoFileOptimizerSuccess (videoArg: MVideoWithFile, payload: O
86 // Create transcoding jobs if there are enabled resolutions 86 // Create transcoding jobs if there are enabled resolutions
87 const resolutionsEnabled = computeResolutionsToTranscode(videoFileResolution) 87 const resolutionsEnabled = computeResolutionsToTranscode(videoFileResolution)
88 logger.info( 88 logger.info(
89 'Resolutions computed for video %s and origin file height of %d.', videoDatabase.uuid, videoFileResolution, 89 'Resolutions computed for video %s and origin file resolution of %d.', videoDatabase.uuid, videoFileResolution,
90 { resolutions: resolutionsEnabled } 90 { resolutions: resolutionsEnabled }
91 ) 91 )
92 92
@@ -104,14 +104,15 @@ async function onVideoFileOptimizerSuccess (videoArg: MVideoWithFile, payload: O
104 dataInput = { 104 dataInput = {
105 type: 'new-resolution' as 'new-resolution', 105 type: 'new-resolution' as 'new-resolution',
106 videoUUID: videoDatabase.uuid, 106 videoUUID: videoDatabase.uuid,
107 resolution 107 resolution,
108 isPortraitMode
108 } 109 }
109 } else if (CONFIG.TRANSCODING.HLS.ENABLED) { 110 } else if (CONFIG.TRANSCODING.HLS.ENABLED) {
110 dataInput = { 111 dataInput = {
111 type: 'hls', 112 type: 'hls',
112 videoUUID: videoDatabase.uuid, 113 videoUUID: videoDatabase.uuid,
113 resolution, 114 resolution,
114 isPortraitMode: false, 115 isPortraitMode,
115 copyCodecs: false 116 copyCodecs: false
116 } 117 }
117 } 118 }