diff options
Diffstat (limited to 'shared')
-rw-r--r-- | shared/extra-utils/server/config.ts | 2 | ||||
-rw-r--r-- | shared/models/server/custom-config.model.ts | 1 | ||||
-rw-r--r-- | shared/models/videos/video-resolution.enum.ts | 9 |
3 files changed, 11 insertions, 1 deletions
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 | |||
117 | '480p': true, | 117 | '480p': true, |
118 | '720p': false, | 118 | '720p': false, |
119 | '1080p': false, | 119 | '1080p': false, |
120 | '1440p': false, | ||
120 | '2160p': false | 121 | '2160p': false |
121 | }, | 122 | }, |
122 | webtorrent: { | 123 | webtorrent: { |
@@ -141,6 +142,7 @@ function updateCustomSubConfig (url: string, token: string, newConfig: DeepParti | |||
141 | '480p': true, | 142 | '480p': true, |
142 | '720p': true, | 143 | '720p': true, |
143 | '1080p': true, | 144 | '1080p': true, |
145 | '1440p': true, | ||
144 | '2160p': true | 146 | '2160p': true |
145 | } | 147 | } |
146 | } | 148 | } |
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 = { | |||
7 | '480p': boolean | 7 | '480p': boolean |
8 | '720p': boolean | 8 | '720p': boolean |
9 | '1080p': boolean | 9 | '1080p': boolean |
10 | '1440p': boolean | ||
10 | '2160p': boolean | 11 | '2160p': boolean |
11 | } | 12 | } |
12 | 13 | ||
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 { | |||
7 | H_480P = 480, | 7 | H_480P = 480, |
8 | H_720P = 720, | 8 | H_720P = 720, |
9 | H_1080P = 1080, | 9 | H_1080P = 1080, |
10 | H_1440P = 1440, | ||
10 | H_4K = 2160 | 11 | H_4K = 2160 |
11 | } | 12 | } |
12 | 13 | ||
@@ -53,9 +54,15 @@ function getBaseBitrate (resolution: number) { | |||
53 | return 5200 * 1000 | 54 | return 5200 * 1000 |
54 | } | 55 | } |
55 | 56 | ||
57 | if (resolution <= VideoResolution.H_1440P) { | ||
58 | // quality according to Google Live Encoder: 6000 - 13000 Kbps | ||
59 | // Quality according to YouTube Video Info: 8600 (av01) - 17000 (vp9.2) Kbps | ||
60 | return 10_000 * 1000 | ||
61 | } | ||
62 | |||
56 | // 4K | 63 | // 4K |
57 | // quality according to Google Live Encoder: 13000 - 34000 Kbps | 64 | // quality according to Google Live Encoder: 13000 - 34000 Kbps |
58 | return 22000 * 1000 | 65 | return 22_000 * 1000 |
59 | } | 66 | } |
60 | 67 | ||
61 | /** | 68 | /** |