aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/models/videos/video-resolution.enum.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-07-19 10:37:35 +0200
committerChocobozzz <chocobozzz@cpy.re>2019-07-24 10:58:16 +0200
commit9b474844e85cce916370693cc24f53339a695570 (patch)
tree10b1148a7581a2754e336a144c085a05ce72a1db /shared/models/videos/video-resolution.enum.ts
parent32fe00138990627749da58ff9f845584013aa219 (diff)
downloadPeerTube-9b474844e85cce916370693cc24f53339a695570.tar.gz
PeerTube-9b474844e85cce916370693cc24f53339a695570.tar.zst
PeerTube-9b474844e85cce916370693cc24f53339a695570.zip
Add CLI plugins tests
Diffstat (limited to 'shared/models/videos/video-resolution.enum.ts')
-rw-r--r--shared/models/videos/video-resolution.enum.ts53
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 */
19function getBaseBitrate (resolution: VideoResolution) { 19function 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