From 84cae54e7a2595bea0c3ea106a4d111fd11a4ec6 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 5 Aug 2022 10:36:19 +0200 Subject: Add option to not transcode original resolution --- server/controllers/api/videos/transcoding.ts | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'server/controllers/api/videos') diff --git a/server/controllers/api/videos/transcoding.ts b/server/controllers/api/videos/transcoding.ts index a360a8b6a..09ab7dc0f 100644 --- a/server/controllers/api/videos/transcoding.ts +++ b/server/controllers/api/videos/transcoding.ts @@ -1,5 +1,5 @@ import express from 'express' -import { computeLowerResolutionsToTranscode } from '@server/helpers/ffmpeg' +import { computeResolutionsToTranscode } from '@server/helpers/ffmpeg' import { logger, loggerTagsFactory } from '@server/helpers/logger' import { addTranscodingJob } from '@server/lib/video' import { HttpStatusCode, UserRight, VideoState, VideoTranscodingCreate } from '@shared/models' @@ -30,9 +30,9 @@ async function createTranscoding (req: express.Request, res: express.Response) { const body: VideoTranscodingCreate = req.body - const { resolution: maxResolution, isPortraitMode, audioStream } = await video.probeMaxQualityFile() + const { resolution: maxResolution, audioStream } = await video.probeMaxQualityFile() const resolutions = await Hooks.wrapObject( - computeLowerResolutionsToTranscode(maxResolution, 'vod').concat([ maxResolution ]), + computeResolutionsToTranscode({ inputResolution: maxResolution, type: 'vod', includeInputResolution: true }), 'filter:transcoding.manual.lower-resolutions-to-transcode.result', body ) @@ -50,7 +50,6 @@ async function createTranscoding (req: express.Request, res: express.Response) { type: 'new-resolution-to-hls', videoUUID: video.uuid, resolution, - isPortraitMode, hasAudio: !!audioStream, copyCodecs: false, isNewVideo: false, @@ -64,8 +63,7 @@ async function createTranscoding (req: express.Request, res: express.Response) { isNewVideo: false, resolution, hasAudio: !!audioStream, - createHLSIfNeeded: false, - isPortraitMode + createHLSIfNeeded: false }) } } -- cgit v1.2.3