diff options
author | Chocobozzz <me@florianbigard.com> | 2019-06-06 14:45:57 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-06-06 14:45:57 +0200 |
commit | ad3405d087b306efa5eb62a69c9b797b04eab4ce (patch) | |
tree | fd81a190cc0c5fe80a2d70465dcb4a4789b62a5f /shared | |
parent | a6dbbf03865a955caaedc3b12f3de3e386fe850f (diff) | |
download | PeerTube-ad3405d087b306efa5eb62a69c9b797b04eab4ce.tar.gz PeerTube-ad3405d087b306efa5eb62a69c9b797b04eab4ce.tar.zst PeerTube-ad3405d087b306efa5eb62a69c9b797b04eab4ce.zip |
Improve 4K video quality after transcoding
Diffstat (limited to 'shared')
-rw-r--r-- | shared/extra-utils/server/follows.ts | 2 | ||||
-rw-r--r-- | shared/models/videos/video-resolution.enum.ts | 10 |
2 files changed, 8 insertions, 4 deletions
diff --git a/shared/extra-utils/server/follows.ts b/shared/extra-utils/server/follows.ts index 1505804de..68c5a2e2b 100644 --- a/shared/extra-utils/server/follows.ts +++ b/shared/extra-utils/server/follows.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | import * as request from 'supertest' | 1 | import * as request from 'supertest' |
2 | import { ServerInfo } from './servers' | 2 | import { ServerInfo } from './servers' |
3 | import { waitJobs } from './jobs' | 3 | import { waitJobs } from './jobs' |
4 | import { makeGetRequest, makePostBodyRequest } from '..' | 4 | import { makePostBodyRequest } from '../requests/requests' |
5 | 5 | ||
6 | function getFollowersListPaginationAndSort (url: string, start: number, count: number, sort: string, search?: string) { | 6 | function getFollowersListPaginationAndSort (url: string, start: number, count: number, sort: string, search?: string) { |
7 | const path = '/api/v1/server/followers' | 7 | const path = '/api/v1/server/followers' |
diff --git a/shared/models/videos/video-resolution.enum.ts b/shared/models/videos/video-resolution.enum.ts index 7da5e7100..51efa2e8b 100644 --- a/shared/models/videos/video-resolution.enum.ts +++ b/shared/models/videos/video-resolution.enum.ts | |||
@@ -5,7 +5,8 @@ export enum VideoResolution { | |||
5 | H_360P = 360, | 5 | H_360P = 360, |
6 | H_480P = 480, | 6 | H_480P = 480, |
7 | H_720P = 720, | 7 | H_720P = 720, |
8 | H_1080P = 1080 | 8 | H_1080P = 1080, |
9 | H_4K = 2160 | ||
9 | } | 10 | } |
10 | 11 | ||
11 | /** | 12 | /** |
@@ -33,11 +34,14 @@ function getBaseBitrate (resolution: VideoResolution) { | |||
33 | // quality according to Google Live Encoder: 1,500 - 4,000 Kbps | 34 | // quality according to Google Live Encoder: 1,500 - 4,000 Kbps |
34 | // Quality according to YouTube Video Info: 1752 Kbps | 35 | // Quality according to YouTube Video Info: 1752 Kbps |
35 | return 1750 * 1000 | 36 | return 1750 * 1000 |
36 | case VideoResolution.H_1080P: // fallthrough | 37 | case VideoResolution.H_1080P: |
37 | default: | ||
38 | // quality according to Google Live Encoder: 3000 - 6000 Kbps | 38 | // quality according to Google Live Encoder: 3000 - 6000 Kbps |
39 | // Quality according to YouTube Video Info: 3277 Kbps | 39 | // Quality according to YouTube Video Info: 3277 Kbps |
40 | return 3300 * 1000 | 40 | return 3300 * 1000 |
41 | case VideoResolution.H_4K: // fallthrough | ||
42 | default: | ||
43 | // quality according to Google Live Encoder: 13000 - 34000 Kbps | ||
44 | return 15000 * 1000 | ||
41 | } | 45 | } |
42 | } | 46 | } |
43 | 47 | ||