diff --git a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html
index dd62a4aab..7ecfb7702 100644
--- a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html
+++ b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html
@@ -883,6 +883,20 @@
{{ formErrors.transcoding.threads }}
+
+
@@ -1023,6 +1037,20 @@
{{ formErrors.live.transcoding.threads }}
+
+
diff --git a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts
index 9a46a2e59..ae6a9e844 100644
--- a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts
+++ b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts
@@ -1,4 +1,5 @@
import { forkJoin } from 'rxjs'
+import { pairwise } from 'rxjs/operators'
import { ViewportScroller } from '@angular/common'
import { AfterViewChecked, Component, OnInit, ViewChild } from '@angular/core'
import { ConfigService } from '@app/+admin/config/shared/config.service'
@@ -20,7 +21,6 @@ import { USER_VIDEO_QUOTA_DAILY_VALIDATOR, USER_VIDEO_QUOTA_VALIDATOR } from '@a
import { FormReactive, FormValidatorService, SelectOptionsItem } from '@app/shared/shared-forms'
import { NgbNav } from '@ng-bootstrap/ng-bootstrap'
import { CustomConfig, ServerConfig } from '@shared/models'
-import { pairwise } from 'rxjs/operators'
@Component({
selector: 'my-edit-custom-config',
@@ -39,6 +39,9 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit, A
transcodingThreadOptions: { label: string, value: number }[] = []
liveMaxDurationOptions: { label: string, value: number }[] = []
+ vodTranscodingProfileOptions: string[] = []
+ liveTranscodingProfileOptions: string[] = []
+
languageItems: SelectOptionsItem[] = []
categoryItems: SelectOptionsItem[] = []
@@ -101,6 +104,9 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit, A
{ value: 8, label: '8' }
]
+ this.vodTranscodingProfileOptions = [ 'default' ]
+ this.liveTranscodingProfileOptions = [ 'default' ]
+
this.liveMaxDurationOptions = [
{ value: -1, label: $localize`No limit` },
{ value: 1000 * 3600, label: $localize`1 hour` },
@@ -127,6 +133,14 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit, A
return this.serverConfig.live.rtmp.port
}
+ getAvailableTranscodingProfile (type: 'live' | 'vod') {
+ if (type === 'live') {
+ return this.serverConfig.live.transcoding.availableProfiles
+ }
+
+ return this.serverConfig.transcoding.availableProfiles
+ }
+
getTotalTranscodingThreads () {
const transcodingEnabled = this.form.value['transcoding']['enabled']
const transcodingThreads = this.form.value['transcoding']['threads']
@@ -247,6 +261,7 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit, A
threads: TRANSCODING_THREADS_VALIDATOR,
allowAdditionalExtensions: null,
allowAudioFiles: null,
+ profile: null,
resolutions: {},
hls: {
enabled: null
@@ -266,6 +281,7 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit, A
transcoding: {
enabled: null,
threads: TRANSCODING_THREADS_VALIDATOR,
+ profile: null,
resolutions: {}
}
},
diff --git a/client/src/app/core/server/server.service.ts b/client/src/app/core/server/server.service.ts
index a38883eee..39739afd0 100644
--- a/client/src/app/core/server/server.service.ts
+++ b/client/src/app/core/server/server.service.ts
@@ -66,6 +66,8 @@ export class ServerService {
requiresEmailVerification: false
},
transcoding: {
+ profile: 'default',
+ availableProfiles: [ 'default' ],
enabledResolutions: [],
hls: {
enabled: false
@@ -82,6 +84,8 @@ export class ServerService {
maxUserLives: -1,
transcoding: {
enabled: false,
+ profile: 'default',
+ availableProfiles: [ 'default' ],
enabledResolutions: []
},
rtmp: {
diff --git a/server/initializers/checker-before-init.ts b/server/initializers/checker-before-init.ts
index 9c4e0048a..7cc073603 100644
--- a/server/initializers/checker-before-init.ts
+++ b/server/initializers/checker-before-init.ts
@@ -22,6 +22,7 @@ function checkMissedConfig () {
'signup.filters.cidr.whitelist', 'signup.filters.cidr.blacklist',
'redundancy.videos.strategies', 'redundancy.videos.check_interval',
'transcoding.enabled', 'transcoding.threads', 'transcoding.allow_additional_extensions', 'transcoding.hls.enabled',
+ 'transcoding.profile',
'transcoding.resolutions.0p', 'transcoding.resolutions.240p', 'transcoding.resolutions.360p', 'transcoding.resolutions.480p',
'transcoding.resolutions.720p', 'transcoding.resolutions.1080p', 'transcoding.resolutions.1440p', 'transcoding.resolutions.2160p',
'import.videos.http.enabled', 'import.videos.torrent.enabled', 'auto_blacklist.videos.of_users.enabled',
@@ -39,7 +40,7 @@ function checkMissedConfig () {
'search.remote_uri.users', 'search.remote_uri.anonymous', 'search.search_index.enabled', 'search.search_index.url',
'search.search_index.disable_local_search', 'search.search_index.is_default_search',
'live.enabled', 'live.allow_replay', 'live.max_duration', 'live.max_user_lives', 'live.max_instance_lives',
- 'live.transcoding.enabled', 'live.transcoding.threads',
+ 'live.transcoding.enabled', 'live.transcoding.threads', 'live.transcoding.profile',
'live.transcoding.resolutions.240p', 'live.transcoding.resolutions.360p', 'live.transcoding.resolutions.480p',
'live.transcoding.resolutions.720p', 'live.transcoding.resolutions.1080p', 'live.transcoding.resolutions.1440p',
'live.transcoding.resolutions.2160p'