From b7085c713220c9c5a96c9bb77330c2ba6ae9274e Mon Sep 17 00:00:00 2001 From: Rigel Kent Date: Thu, 24 Dec 2020 18:02:04 +0100 Subject: add support for 1440p (Quad HD/QHD/WQHD) videos --- shared/extra-utils/server/config.ts | 2 ++ shared/models/server/custom-config.model.ts | 1 + shared/models/videos/video-resolution.enum.ts | 9 ++++++++- 3 files changed, 11 insertions(+), 1 deletion(-) (limited to 'shared') diff --git a/shared/extra-utils/server/config.ts b/shared/extra-utils/server/config.ts index 8702659c4..f7c488c0b 100644 --- a/shared/extra-utils/server/config.ts +++ b/shared/extra-utils/server/config.ts @@ -117,6 +117,7 @@ function updateCustomSubConfig (url: string, token: string, newConfig: DeepParti '480p': true, '720p': false, '1080p': false, + '1440p': false, '2160p': false }, webtorrent: { @@ -141,6 +142,7 @@ function updateCustomSubConfig (url: string, token: string, newConfig: DeepParti '480p': true, '720p': true, '1080p': true, + '1440p': true, '2160p': true } } diff --git a/shared/models/server/custom-config.model.ts b/shared/models/server/custom-config.model.ts index 67e05e23f..9a6a24923 100644 --- a/shared/models/server/custom-config.model.ts +++ b/shared/models/server/custom-config.model.ts @@ -7,6 +7,7 @@ export type ConfigResolutions = { '480p': boolean '720p': boolean '1080p': boolean + '1440p': boolean '2160p': boolean } diff --git a/shared/models/videos/video-resolution.enum.ts b/shared/models/videos/video-resolution.enum.ts index dcd55dad8..a5d2ac7fa 100644 --- a/shared/models/videos/video-resolution.enum.ts +++ b/shared/models/videos/video-resolution.enum.ts @@ -7,6 +7,7 @@ export const enum VideoResolution { H_480P = 480, H_720P = 720, H_1080P = 1080, + H_1440P = 1440, H_4K = 2160 } @@ -53,9 +54,15 @@ function getBaseBitrate (resolution: number) { return 5200 * 1000 } + if (resolution <= VideoResolution.H_1440P) { + // quality according to Google Live Encoder: 6000 - 13000 Kbps + // Quality according to YouTube Video Info: 8600 (av01) - 17000 (vp9.2) Kbps + return 10_000 * 1000 + } + // 4K // quality according to Google Live Encoder: 13000 - 34000 Kbps - return 22000 * 1000 + return 22_000 * 1000 } /** -- cgit v1.2.3