diff options
Diffstat (limited to 'server/controllers/api')
-rw-r--r-- | server/controllers/api/config.ts | 4 | ||||
-rw-r--r-- | server/controllers/api/videos/transcoding.ts | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/server/controllers/api/config.ts b/server/controllers/api/config.ts index cfb750bc9..ff2fa9d86 100644 --- a/server/controllers/api/config.ts +++ b/server/controllers/api/config.ts | |||
@@ -227,6 +227,7 @@ function customConfig (): CustomConfig { | |||
227 | '1440p': CONFIG.TRANSCODING.RESOLUTIONS['1440p'], | 227 | '1440p': CONFIG.TRANSCODING.RESOLUTIONS['1440p'], |
228 | '2160p': CONFIG.TRANSCODING.RESOLUTIONS['2160p'] | 228 | '2160p': CONFIG.TRANSCODING.RESOLUTIONS['2160p'] |
229 | }, | 229 | }, |
230 | alwaysTranscodeOriginalResolution: CONFIG.TRANSCODING.ALWAYS_TRANSCODE_ORIGINAL_RESOLUTION, | ||
230 | webtorrent: { | 231 | webtorrent: { |
231 | enabled: CONFIG.TRANSCODING.WEBTORRENT.ENABLED | 232 | enabled: CONFIG.TRANSCODING.WEBTORRENT.ENABLED |
232 | }, | 233 | }, |
@@ -256,7 +257,8 @@ function customConfig (): CustomConfig { | |||
256 | '1080p': CONFIG.LIVE.TRANSCODING.RESOLUTIONS['1080p'], | 257 | '1080p': CONFIG.LIVE.TRANSCODING.RESOLUTIONS['1080p'], |
257 | '1440p': CONFIG.LIVE.TRANSCODING.RESOLUTIONS['1440p'], | 258 | '1440p': CONFIG.LIVE.TRANSCODING.RESOLUTIONS['1440p'], |
258 | '2160p': CONFIG.LIVE.TRANSCODING.RESOLUTIONS['2160p'] | 259 | '2160p': CONFIG.LIVE.TRANSCODING.RESOLUTIONS['2160p'] |
259 | } | 260 | }, |
261 | alwaysTranscodeOriginalResolution: CONFIG.LIVE.TRANSCODING.ALWAYS_TRANSCODE_ORIGINAL_RESOLUTION | ||
260 | } | 262 | } |
261 | }, | 263 | }, |
262 | videoStudio: { | 264 | videoStudio: { |
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 @@ | |||
1 | import express from 'express' | 1 | import express from 'express' |
2 | import { computeLowerResolutionsToTranscode } from '@server/helpers/ffmpeg' | 2 | import { computeResolutionsToTranscode } from '@server/helpers/ffmpeg' |
3 | import { logger, loggerTagsFactory } from '@server/helpers/logger' | 3 | import { logger, loggerTagsFactory } from '@server/helpers/logger' |
4 | import { addTranscodingJob } from '@server/lib/video' | 4 | import { addTranscodingJob } from '@server/lib/video' |
5 | import { HttpStatusCode, UserRight, VideoState, VideoTranscodingCreate } from '@shared/models' | 5 | import { 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 | } |