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 98ca692a7..ebc669801 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 @@ -22,6 +22,7 @@ import { SERVICES_TWITTER_USERNAME_VALIDATOR, SIGNUP_LIMIT_VALIDATOR, SIGNUP_MINIMUM_AGE_VALIDATOR, + TRANSCODING_MAX_FPS_VALIDATOR, TRANSCODING_THREADS_VALIDATOR } from '@app/shared/form-validators/custom-config-validators' import { USER_VIDEO_QUOTA_DAILY_VALIDATOR, USER_VIDEO_QUOTA_VALIDATOR } from '@app/shared/form-validators/user-validators' @@ -30,6 +31,7 @@ import { FormReactiveService } from '@app/shared/shared-forms/form-reactive.serv import { CustomPageService } from '@app/shared/shared-main/custom-page/custom-page.service' import { NgbNav, NgbNavContent, NgbNavItem, NgbNavLink, NgbNavLinkBase, NgbNavOutlet } from '@ng-bootstrap/ng-bootstrap' import { CustomConfig, CustomPage, HTMLServerConfig } from '@peertube/peertube-models' +import merge from 'lodash-es/merge' import omit from 'lodash-es/omit' import { forkJoin } from 'rxjs' import { SelectOptionsItem } from 'src/types/select-options-item.model' @@ -40,7 +42,6 @@ import { EditHomepageComponent } from './edit-homepage.component' import { EditInstanceInformationComponent } from './edit-instance-information.component' import { EditLiveConfigurationComponent } from './edit-live-configuration.component' import { EditVODTranscodingComponent } from './edit-vod-transcoding.component' -import merge from 'lodash-es/merge' type ComponentCustomConfig = CustomConfig & { instanceCustomHomepage: CustomPage @@ -239,6 +240,9 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit { }, remoteRunners: { enabled: null + }, + fps: { + max: TRANSCODING_MAX_FPS_VALIDATOR } }, live: { @@ -260,6 +264,9 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit { alwaysTranscodeOriginalResolution: null, remoteRunners: { enabled: null + }, + fps: { + max: TRANSCODING_MAX_FPS_VALIDATOR } } }, diff --git a/client/src/app/+admin/config/edit-custom-config/edit-live-configuration.component.html b/client/src/app/+admin/config/edit-custom-config/edit-live-configuration.component.html index d6edd95f2..f693eeab4 100644 --- a/client/src/app/+admin/config/edit-custom-config/edit-live-configuration.component.html +++ b/client/src/app/+admin/config/edit-custom-config/edit-live-configuration.component.html @@ -48,7 +48,7 @@
- (-1 for "unlimited") + (-1 for "unlimited")
@@ -60,7 +60,7 @@
- (-1 for "unlimited") + (-1 for "unlimited")
@@ -116,6 +116,19 @@
+
+ + + Cap transcoded live FPS. Max resolution stream still keeps the original FPS. + +
+ + FPS +
+ + +
+

Live resolutions to generate

diff --git a/client/src/app/+admin/config/edit-custom-config/edit-vod-transcoding.component.html b/client/src/app/+admin/config/edit-custom-config/edit-vod-transcoding.component.html index 0038a2d54..e13ee37d8 100644 --- a/client/src/app/+admin/config/edit-custom-config/edit-vod-transcoding.component.html +++ b/client/src/app/+admin/config/edit-custom-config/edit-vod-transcoding.component.html @@ -141,6 +141,19 @@
+
+ + + Cap transcoded video FPS. Max resolution file still keeps the original FPS. + +
+ + FPS +
+ + +
+
Resolutions to generate
diff --git a/client/src/app/shared/form-validators/custom-config-validators.ts b/client/src/app/shared/form-validators/custom-config-validators.ts index 8579cfaa4..519a1480a 100644 --- a/client/src/app/shared/form-validators/custom-config-validators.ts +++ b/client/src/app/shared/form-validators/custom-config-validators.ts @@ -65,6 +65,14 @@ export const TRANSCODING_THREADS_VALIDATOR: BuildFormValidator = { } } +export const TRANSCODING_MAX_FPS_VALIDATOR: BuildFormValidator = { + VALIDATORS: [ Validators.required, Validators.min(1) ], + MESSAGES: { + required: $localize`Transcoding max FPS is required.`, + min: $localize`Transcoding max FPS must be greater or equal to 1.` + } +} + export const MAX_LIVE_DURATION_VALIDATOR: BuildFormValidator = { VALIDATORS: [ Validators.required, Validators.min(-1) ], MESSAGES: {