diff options
author | Chocobozzz <me@florianbigard.com> | 2020-08-03 16:03:52 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2020-08-03 16:03:52 +0200 |
commit | dca0fe12ec2e47be51884c4eb05ebe6f358cb9de (patch) | |
tree | 19a9b5d905a6eaccda680b14e1b86b43577ca29d /server/helpers | |
parent | 2045b572233d1ee81fb1c14e33fc22b805cd7230 (diff) | |
download | PeerTube-dca0fe12ec2e47be51884c4eb05ebe6f358cb9de.tar.gz PeerTube-dca0fe12ec2e47be51884c4eb05ebe6f358cb9de.tar.zst PeerTube-dca0fe12ec2e47be51884c4eb05ebe6f358cb9de.zip |
Fix resolution for portrait videos
Diffstat (limited to 'server/helpers')
-rw-r--r-- | server/helpers/ffmpeg-utils.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/helpers/ffmpeg-utils.ts b/server/helpers/ffmpeg-utils.ts index 0cfc51775..7bfd5d44a 100644 --- a/server/helpers/ffmpeg-utils.ts +++ b/server/helpers/ffmpeg-utils.ts | |||
@@ -74,7 +74,7 @@ namespace audio { | |||
74 | } | 74 | } |
75 | } | 75 | } |
76 | 76 | ||
77 | function computeResolutionsToTranscode (videoFileHeight: number) { | 77 | function computeResolutionsToTranscode (videoFileResolution: number) { |
78 | const resolutionsEnabled: number[] = [] | 78 | const resolutionsEnabled: number[] = [] |
79 | const configResolutions = CONFIG.TRANSCODING.RESOLUTIONS | 79 | const configResolutions = CONFIG.TRANSCODING.RESOLUTIONS |
80 | 80 | ||
@@ -90,7 +90,7 @@ function computeResolutionsToTranscode (videoFileHeight: number) { | |||
90 | ] | 90 | ] |
91 | 91 | ||
92 | for (const resolution of resolutions) { | 92 | for (const resolution of resolutions) { |
93 | if (configResolutions[resolution + 'p'] === true && videoFileHeight > resolution) { | 93 | if (configResolutions[resolution + 'p'] === true && videoFileResolution > resolution) { |
94 | resolutionsEnabled.push(resolution) | 94 | resolutionsEnabled.push(resolution) |
95 | } | 95 | } |
96 | } | 96 | } |