diff options
Diffstat (limited to 'shared/models')
-rw-r--r-- | shared/models/videos/video-resolution.enum.ts | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/shared/models/videos/video-resolution.enum.ts b/shared/models/videos/video-resolution.enum.ts index dc53294f6..98ab3eed2 100644 --- a/shared/models/videos/video-resolution.enum.ts +++ b/shared/models/videos/video-resolution.enum.ts | |||
@@ -15,7 +15,7 @@ export enum VideoResolution { | |||
15 | * | 15 | * |
16 | * Sources for individual quality levels: | 16 | * Sources for individual quality levels: |
17 | * Google Live Encoder: https://support.google.com/youtube/answer/2853702?hl=en | 17 | * Google Live Encoder: https://support.google.com/youtube/answer/2853702?hl=en |
18 | * YouTube Video Info (tested with random music video): https://www.h3xed.com/blogmedia/youtube-info.php | 18 | * YouTube Video Info: youtube-dl --list-formats, with sample videos |
19 | */ | 19 | */ |
20 | function getBaseBitrate (resolution: VideoResolution) { | 20 | function getBaseBitrate (resolution: VideoResolution) { |
21 | switch (resolution) { | 21 | switch (resolution) { |
@@ -25,28 +25,28 @@ function getBaseBitrate (resolution: VideoResolution) { | |||
25 | 25 | ||
26 | case VideoResolution.H_240P: | 26 | case VideoResolution.H_240P: |
27 | // quality according to Google Live Encoder: 300 - 700 Kbps | 27 | // quality according to Google Live Encoder: 300 - 700 Kbps |
28 | // Quality according to YouTube Video Info: 186 Kbps | 28 | // Quality according to YouTube Video Info: 285 Kbps |
29 | return 250 * 1000 | 29 | return 320 * 1000 |
30 | 30 | ||
31 | case VideoResolution.H_360P: | 31 | case VideoResolution.H_360P: |
32 | // quality according to Google Live Encoder: 400 - 1,000 Kbps | 32 | // quality according to Google Live Encoder: 400 - 1,000 Kbps |
33 | // Quality according to YouTube Video Info: 480 Kbps | 33 | // Quality according to YouTube Video Info: 700 Kbps |
34 | return 500 * 1000 | 34 | return 780 * 1000 |
35 | 35 | ||
36 | case VideoResolution.H_480P: | 36 | case VideoResolution.H_480P: |
37 | // quality according to Google Live Encoder: 500 - 2,000 Kbps | 37 | // quality according to Google Live Encoder: 500 - 2,000 Kbps |
38 | // Quality according to YouTube Video Info: 879 Kbps | 38 | // Quality according to YouTube Video Info: 1300 Kbps |
39 | return 900 * 1000 | 39 | return 1500 * 1000 |
40 | 40 | ||
41 | case VideoResolution.H_720P: | 41 | case VideoResolution.H_720P: |
42 | // quality according to Google Live Encoder: 1,500 - 4,000 Kbps | 42 | // quality according to Google Live Encoder: 1,500 - 4,000 Kbps |
43 | // Quality according to YouTube Video Info: 1752 Kbps | 43 | // Quality according to YouTube Video Info: 2680 Kbps |
44 | return 1750 * 1000 | 44 | return 2800 * 1000 |
45 | 45 | ||
46 | case VideoResolution.H_1080P: | 46 | case VideoResolution.H_1080P: |
47 | // quality according to Google Live Encoder: 3000 - 6000 Kbps | 47 | // quality according to Google Live Encoder: 3000 - 6000 Kbps |
48 | // Quality according to YouTube Video Info: 3277 Kbps | 48 | // Quality according to YouTube Video Info: 5081 Kbps |
49 | return 3300 * 1000 | 49 | return 5800 * 1000 |
50 | 50 | ||
51 | case VideoResolution.H_4K: // fallthrough | 51 | case VideoResolution.H_4K: // fallthrough |
52 | default: | 52 | default: |