diff options
author | Rigel Kent <sendmemail@rigelk.eu> | 2020-12-24 18:02:04 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2021-01-13 09:14:09 +0100 |
commit | b7085c713220c9c5a96c9bb77330c2ba6ae9274e (patch) | |
tree | a2cefbd1742d5f2ba48f76759f3450171dc224f8 /shared/models/videos | |
parent | 7185dab3ff509cec9f03a15d826625b5a1bd0ada (diff) | |
download | PeerTube-b7085c713220c9c5a96c9bb77330c2ba6ae9274e.tar.gz PeerTube-b7085c713220c9c5a96c9bb77330c2ba6ae9274e.tar.zst PeerTube-b7085c713220c9c5a96c9bb77330c2ba6ae9274e.zip |
add support for 1440p (Quad HD/QHD/WQHD) videos
Diffstat (limited to 'shared/models/videos')
-rw-r--r-- | shared/models/videos/video-resolution.enum.ts | 9 |
1 files changed, 8 insertions, 1 deletions
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 | /** |