aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/ffmpeg/ffprobe-utils.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-11-07 10:43:22 +0100
committerChocobozzz <me@florianbigard.com>2022-11-07 10:43:22 +0100
commitf30ef8cf9888255a58d0d319b741ae27b456185e (patch)
tree277e584f60dea3bba56f3778710b1dddfdd6f14a /server/helpers/ffmpeg/ffprobe-utils.ts
parentc0a9de6652f53328cda580a8cd11c7ee14242678 (diff)
downloadPeerTube-f30ef8cf9888255a58d0d319b741ae27b456185e.tar.gz
PeerTube-f30ef8cf9888255a58d0d319b741ae27b456185e.tar.zst
PeerTube-f30ef8cf9888255a58d0d319b741ae27b456185e.zip
Fix retranscoding of odd resolution
Diffstat (limited to 'server/helpers/ffmpeg/ffprobe-utils.ts')
-rw-r--r--server/helpers/ffmpeg/ffprobe-utils.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/server/helpers/ffmpeg/ffprobe-utils.ts b/server/helpers/ffmpeg/ffprobe-utils.ts
index 8cfdba4f9..fb270b3cb 100644
--- a/server/helpers/ffmpeg/ffprobe-utils.ts
+++ b/server/helpers/ffmpeg/ffprobe-utils.ts
@@ -15,6 +15,7 @@ import {
15import { VideoResolution, VideoTranscodingFPS } from '@shared/models' 15import { VideoResolution, VideoTranscodingFPS } from '@shared/models'
16import { CONFIG } from '../../initializers/config' 16import { CONFIG } from '../../initializers/config'
17import { VIDEO_TRANSCODING_FPS } from '../../initializers/constants' 17import { VIDEO_TRANSCODING_FPS } from '../../initializers/constants'
18import { toEven } from '../core-utils'
18import { logger } from '../logger' 19import { logger } from '../logger'
19 20
20/** 21/**
@@ -133,7 +134,8 @@ function computeResolutionsToTranscode (options: {
133 } 134 }
134 135
135 if (includeInput) { 136 if (includeInput) {
136 resolutionsEnabled.add(input) 137 // Always use an even resolution to avoid issues with ffmpeg
138 resolutionsEnabled.add(toEven(input))
137 } 139 }
138 140
139 return Array.from(resolutionsEnabled) 141 return Array.from(resolutionsEnabled)