From 84cae54e7a2595bea0c3ea106a4d111fd11a4ec6 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 5 Aug 2022 10:36:19 +0200 Subject: Add option to not transcode original resolution --- server/initializers/checker-before-init.ts | 4 ++-- server/initializers/config.ts | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'server/initializers') diff --git a/server/initializers/checker-before-init.ts b/server/initializers/checker-before-init.ts index 359f0c31d..f4057b81b 100644 --- a/server/initializers/checker-before-init.ts +++ b/server/initializers/checker-before-init.ts @@ -30,7 +30,7 @@ function checkMissedConfig () { 'transcoding.profile', 'transcoding.concurrency', 'transcoding.resolutions.0p', 'transcoding.resolutions.144p', 'transcoding.resolutions.240p', 'transcoding.resolutions.360p', 'transcoding.resolutions.480p', 'transcoding.resolutions.720p', 'transcoding.resolutions.1080p', 'transcoding.resolutions.1440p', - 'transcoding.resolutions.2160p', 'video_studio.enabled', + 'transcoding.resolutions.2160p', 'transcoding.always_transcode_original_resolution', 'video_studio.enabled', 'import.videos.http.enabled', 'import.videos.torrent.enabled', 'import.videos.concurrency', 'import.videos.timeout', 'auto_blacklist.videos.of_users.enabled', 'trending.videos.interval_days', 'client.videos.miniature.display_author_avatar', @@ -59,7 +59,7 @@ function checkMissedConfig () { 'live.transcoding.enabled', 'live.transcoding.threads', 'live.transcoding.profile', 'live.transcoding.resolutions.144p', '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' + 'live.transcoding.resolutions.1440p', 'live.transcoding.resolutions.2160p', 'live.transcoding.always_transcode_original_resolution' ] const requiredAlternatives = [ diff --git a/server/initializers/config.ts b/server/initializers/config.ts index ba0f756ef..1a0b8942c 100644 --- a/server/initializers/config.ts +++ b/server/initializers/config.ts @@ -309,6 +309,7 @@ const CONFIG = { get THREADS () { return config.get('transcoding.threads') }, get CONCURRENCY () { return config.get('transcoding.concurrency') }, get PROFILE () { return config.get('transcoding.profile') }, + get ALWAYS_TRANSCODE_ORIGINAL_RESOLUTION () { return config.get('transcoding.always_transcode_original_resolution') }, RESOLUTIONS: { get '0p' () { return config.get('transcoding.resolutions.0p') }, get '144p' () { return config.get('transcoding.resolutions.144p') }, @@ -361,6 +362,8 @@ const CONFIG = { get THREADS () { return config.get('live.transcoding.threads') }, get PROFILE () { return config.get('live.transcoding.profile') }, + get ALWAYS_TRANSCODE_ORIGINAL_RESOLUTION () { return config.get('live.transcoding.always_transcode_original_resolution') }, + RESOLUTIONS: { get '144p' () { return config.get('live.transcoding.resolutions.144p') }, get '240p' () { return config.get('live.transcoding.resolutions.240p') }, -- cgit v1.2.3