diff options
Diffstat (limited to 'shared/models')
-rw-r--r-- | shared/models/videos/video-resolution.enum.ts | 53 |
1 files changed, 29 insertions, 24 deletions
diff --git a/shared/models/videos/video-resolution.enum.ts b/shared/models/videos/video-resolution.enum.ts index 51efa2e8b..fa26fc3cc 100644 --- a/shared/models/videos/video-resolution.enum.ts +++ b/shared/models/videos/video-resolution.enum.ts | |||
@@ -18,30 +18,35 @@ export enum VideoResolution { | |||
18 | */ | 18 | */ |
19 | function getBaseBitrate (resolution: VideoResolution) { | 19 | function getBaseBitrate (resolution: VideoResolution) { |
20 | switch (resolution) { | 20 | switch (resolution) { |
21 | case VideoResolution.H_240P: | 21 | case VideoResolution.H_240P: |
22 | // quality according to Google Live Encoder: 300 - 700 Kbps | 22 | // quality according to Google Live Encoder: 300 - 700 Kbps |
23 | // Quality according to YouTube Video Info: 186 Kbps | 23 | // Quality according to YouTube Video Info: 186 Kbps |
24 | return 250 * 1000 | 24 | return 250 * 1000 |
25 | case VideoResolution.H_360P: | 25 | |
26 | // quality according to Google Live Encoder: 400 - 1,000 Kbps | 26 | case VideoResolution.H_360P: |
27 | // Quality according to YouTube Video Info: 480 Kbps | 27 | // quality according to Google Live Encoder: 400 - 1,000 Kbps |
28 | return 500 * 1000 | 28 | // Quality according to YouTube Video Info: 480 Kbps |
29 | case VideoResolution.H_480P: | 29 | return 500 * 1000 |
30 | // quality according to Google Live Encoder: 500 - 2,000 Kbps | 30 | |
31 | // Quality according to YouTube Video Info: 879 Kbps | 31 | case VideoResolution.H_480P: |
32 | return 900 * 1000 | 32 | // quality according to Google Live Encoder: 500 - 2,000 Kbps |
33 | case VideoResolution.H_720P: | 33 | // Quality according to YouTube Video Info: 879 Kbps |
34 | // quality according to Google Live Encoder: 1,500 - 4,000 Kbps | 34 | return 900 * 1000 |
35 | // Quality according to YouTube Video Info: 1752 Kbps | 35 | |
36 | return 1750 * 1000 | 36 | case VideoResolution.H_720P: |
37 | case VideoResolution.H_1080P: | 37 | // quality according to Google Live Encoder: 1,500 - 4,000 Kbps |
38 | // quality according to Google Live Encoder: 3000 - 6000 Kbps | 38 | // Quality according to YouTube Video Info: 1752 Kbps |
39 | // Quality according to YouTube Video Info: 3277 Kbps | 39 | return 1750 * 1000 |
40 | return 3300 * 1000 | 40 | |
41 | case VideoResolution.H_4K: // fallthrough | 41 | case VideoResolution.H_1080P: |
42 | default: | 42 | // quality according to Google Live Encoder: 3000 - 6000 Kbps |
43 | // quality according to Google Live Encoder: 13000 - 34000 Kbps | 43 | // Quality according to YouTube Video Info: 3277 Kbps |
44 | return 15000 * 1000 | 44 | return 3300 * 1000 |
45 | |||
46 | case VideoResolution.H_4K: // fallthrough | ||
47 | default: | ||
48 | // quality according to Google Live Encoder: 13000 - 34000 Kbps | ||
49 | return 15000 * 1000 | ||
45 | } | 50 | } |
46 | } | 51 | } |
47 | 52 | ||