aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers')
-rw-r--r--server/controllers/api/config.ts11
1 files changed, 9 insertions, 2 deletions
diff --git a/server/controllers/api/config.ts b/server/controllers/api/config.ts
index 45c03be24..7fda06a87 100644
--- a/server/controllers/api/config.ts
+++ b/server/controllers/api/config.ts
@@ -18,6 +18,7 @@ import { PluginManager } from '../../lib/plugins/plugin-manager'
18import { getThemeOrDefault } from '../../lib/plugins/theme-utils' 18import { getThemeOrDefault } from '../../lib/plugins/theme-utils'
19import { asyncMiddleware, authenticate, ensureUserHasRight } from '../../middlewares' 19import { asyncMiddleware, authenticate, ensureUserHasRight } from '../../middlewares'
20import { customConfigUpdateValidator } from '../../middlewares/validators/config' 20import { customConfigUpdateValidator } from '../../middlewares/validators/config'
21import { VideoTranscodingProfilesManager } from '@server/lib/video-transcoding-profiles'
21 22
22const configRouter = express.Router() 23const configRouter = express.Router()
23 24
@@ -114,7 +115,9 @@ async function getConfig (req: express.Request, res: express.Response) {
114 webtorrent: { 115 webtorrent: {
115 enabled: CONFIG.TRANSCODING.WEBTORRENT.ENABLED 116 enabled: CONFIG.TRANSCODING.WEBTORRENT.ENABLED
116 }, 117 },
117 enabledResolutions: getEnabledResolutions('vod') 118 enabledResolutions: getEnabledResolutions('vod'),
119 profile: CONFIG.TRANSCODING.PROFILE,
120 availableProfiles: VideoTranscodingProfilesManager.Instance.getAvailableProfiles('vod')
118 }, 121 },
119 live: { 122 live: {
120 enabled: CONFIG.LIVE.ENABLED, 123 enabled: CONFIG.LIVE.ENABLED,
@@ -126,7 +129,9 @@ async function getConfig (req: express.Request, res: express.Response) {
126 129
127 transcoding: { 130 transcoding: {
128 enabled: CONFIG.LIVE.TRANSCODING.ENABLED, 131 enabled: CONFIG.LIVE.TRANSCODING.ENABLED,
129 enabledResolutions: getEnabledResolutions('live') 132 enabledResolutions: getEnabledResolutions('live'),
133 profile: CONFIG.LIVE.TRANSCODING.PROFILE,
134 availableProfiles: VideoTranscodingProfilesManager.Instance.getAvailableProfiles('live')
130 }, 135 },
131 136
132 rtmp: { 137 rtmp: {
@@ -412,6 +417,7 @@ function customConfig (): CustomConfig {
412 allowAdditionalExtensions: CONFIG.TRANSCODING.ALLOW_ADDITIONAL_EXTENSIONS, 417 allowAdditionalExtensions: CONFIG.TRANSCODING.ALLOW_ADDITIONAL_EXTENSIONS,
413 allowAudioFiles: CONFIG.TRANSCODING.ALLOW_AUDIO_FILES, 418 allowAudioFiles: CONFIG.TRANSCODING.ALLOW_AUDIO_FILES,
414 threads: CONFIG.TRANSCODING.THREADS, 419 threads: CONFIG.TRANSCODING.THREADS,
420 profile: CONFIG.TRANSCODING.PROFILE,
415 resolutions: { 421 resolutions: {
416 '0p': CONFIG.TRANSCODING.RESOLUTIONS['0p'], 422 '0p': CONFIG.TRANSCODING.RESOLUTIONS['0p'],
417 '240p': CONFIG.TRANSCODING.RESOLUTIONS['240p'], 423 '240p': CONFIG.TRANSCODING.RESOLUTIONS['240p'],
@@ -438,6 +444,7 @@ function customConfig (): CustomConfig {
438 transcoding: { 444 transcoding: {
439 enabled: CONFIG.LIVE.TRANSCODING.ENABLED, 445 enabled: CONFIG.LIVE.TRANSCODING.ENABLED,
440 threads: CONFIG.LIVE.TRANSCODING.THREADS, 446 threads: CONFIG.LIVE.TRANSCODING.THREADS,
447 profile: CONFIG.LIVE.TRANSCODING.PROFILE,
441 resolutions: { 448 resolutions: {
442 '240p': CONFIG.LIVE.TRANSCODING.RESOLUTIONS['240p'], 449 '240p': CONFIG.LIVE.TRANSCODING.RESOLUTIONS['240p'],
443 '360p': CONFIG.LIVE.TRANSCODING.RESOLUTIONS['360p'], 450 '360p': CONFIG.LIVE.TRANSCODING.RESOLUTIONS['360p'],