From f30ef8cf9888255a58d0d319b741ae27b456185e Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 7 Nov 2022 10:43:22 +0100 Subject: Fix retranscoding of odd resolution --- server/helpers/ffmpeg/ffprobe-utils.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'server/helpers/ffmpeg/ffprobe-utils.ts') 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 { import { VideoResolution, VideoTranscodingFPS } from '@shared/models' import { CONFIG } from '../../initializers/config' import { VIDEO_TRANSCODING_FPS } from '../../initializers/constants' +import { toEven } from '../core-utils' import { logger } from '../logger' /** @@ -133,7 +134,8 @@ function computeResolutionsToTranscode (options: { } if (includeInput) { - resolutionsEnabled.add(input) + // Always use an even resolution to avoid issues with ffmpeg + resolutionsEnabled.add(toEven(input)) } return Array.from(resolutionsEnabled) -- cgit v1.2.3