From dca0fe12ec2e47be51884c4eb05ebe6f358cb9de Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 3 Aug 2020 16:03:52 +0200 Subject: Fix resolution for portrait videos --- server/lib/job-queue/handlers/video-transcoding.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'server/lib/job-queue/handlers/video-transcoding.ts') 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 if (videoArg === undefined) return undefined // Outside the transaction (IO on disk) - const { videoFileResolution } = await videoArg.getMaxQualityResolution() + const { videoFileResolution, isPortraitMode } = await videoArg.getMaxQualityResolution() const { videoDatabase, videoPublished } = await sequelizeTypescript.transaction(async t => { // Maybe the video changed in database, refresh it @@ -86,7 +86,7 @@ async function onVideoFileOptimizerSuccess (videoArg: MVideoWithFile, payload: O // Create transcoding jobs if there are enabled resolutions const resolutionsEnabled = computeResolutionsToTranscode(videoFileResolution) logger.info( - 'Resolutions computed for video %s and origin file height of %d.', videoDatabase.uuid, videoFileResolution, + 'Resolutions computed for video %s and origin file resolution of %d.', videoDatabase.uuid, videoFileResolution, { resolutions: resolutionsEnabled } ) @@ -104,14 +104,15 @@ async function onVideoFileOptimizerSuccess (videoArg: MVideoWithFile, payload: O dataInput = { type: 'new-resolution' as 'new-resolution', videoUUID: videoDatabase.uuid, - resolution + resolution, + isPortraitMode } } else if (CONFIG.TRANSCODING.HLS.ENABLED) { dataInput = { type: 'hls', videoUUID: videoDatabase.uuid, resolution, - isPortraitMode: false, + isPortraitMode, copyCodecs: false } } -- cgit v1.2.3