aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/videos
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers/api/videos')
-rw-r--r--server/controllers/api/videos/transcoding.ts10
1 files changed, 4 insertions, 6 deletions
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 @@
1import express from 'express' 1import express from 'express'
2import { computeLowerResolutionsToTranscode } from '@server/helpers/ffmpeg' 2import { computeResolutionsToTranscode } from '@server/helpers/ffmpeg'
3import { logger, loggerTagsFactory } from '@server/helpers/logger' 3import { logger, loggerTagsFactory } from '@server/helpers/logger'
4import { addTranscodingJob } from '@server/lib/video' 4import { addTranscodingJob } from '@server/lib/video'
5import { HttpStatusCode, UserRight, VideoState, VideoTranscodingCreate } from '@shared/models' 5import { HttpStatusCode, UserRight, VideoState, VideoTranscodingCreate } from '@shared/models'
@@ -30,9 +30,9 @@ async function createTranscoding (req: express.Request, res: express.Response) {
30 30
31 const body: VideoTranscodingCreate = req.body 31 const body: VideoTranscodingCreate = req.body
32 32
33 const { resolution: maxResolution, isPortraitMode, audioStream } = await video.probeMaxQualityFile() 33 const { resolution: maxResolution, audioStream } = await video.probeMaxQualityFile()
34 const resolutions = await Hooks.wrapObject( 34 const resolutions = await Hooks.wrapObject(
35 computeLowerResolutionsToTranscode(maxResolution, 'vod').concat([ maxResolution ]), 35 computeResolutionsToTranscode({ inputResolution: maxResolution, type: 'vod', includeInputResolution: true }),
36 'filter:transcoding.manual.lower-resolutions-to-transcode.result', 36 'filter:transcoding.manual.lower-resolutions-to-transcode.result',
37 body 37 body
38 ) 38 )
@@ -50,7 +50,6 @@ async function createTranscoding (req: express.Request, res: express.Response) {
50 type: 'new-resolution-to-hls', 50 type: 'new-resolution-to-hls',
51 videoUUID: video.uuid, 51 videoUUID: video.uuid,
52 resolution, 52 resolution,
53 isPortraitMode,
54 hasAudio: !!audioStream, 53 hasAudio: !!audioStream,
55 copyCodecs: false, 54 copyCodecs: false,
56 isNewVideo: false, 55 isNewVideo: false,
@@ -64,8 +63,7 @@ async function createTranscoding (req: express.Request, res: express.Response) {
64 isNewVideo: false, 63 isNewVideo: false,
65 resolution, 64 resolution,
66 hasAudio: !!audioStream, 65 hasAudio: !!audioStream,
67 createHLSIfNeeded: false, 66 createHLSIfNeeded: false
68 isPortraitMode
69 }) 67 })
70 } 68 }
71 } 69 }