From ad3405d087b306efa5eb62a69c9b797b04eab4ce Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 6 Jun 2019 14:45:57 +0200 Subject: Improve 4K video quality after transcoding --- shared/models/videos/video-resolution.enum.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'shared/models/videos') 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 { H_360P = 360, H_480P = 480, H_720P = 720, - H_1080P = 1080 + H_1080P = 1080, + H_4K = 2160 } /** @@ -33,11 +34,14 @@ function getBaseBitrate (resolution: VideoResolution) { // quality according to Google Live Encoder: 1,500 - 4,000 Kbps // Quality according to YouTube Video Info: 1752 Kbps return 1750 * 1000 - case VideoResolution.H_1080P: // fallthrough - default: + case VideoResolution.H_1080P: // quality according to Google Live Encoder: 3000 - 6000 Kbps // Quality according to YouTube Video Info: 3277 Kbps return 3300 * 1000 + case VideoResolution.H_4K: // fallthrough + default: + // quality according to Google Live Encoder: 13000 - 34000 Kbps + return 15000 * 1000 } } -- cgit v1.2.3