From 8dd754c76735417305c4b68e2ada6f623e9d7650 Mon Sep 17 00:00:00 2001 From: Florian CUNY Date: Fri, 5 Nov 2021 10:23:02 +0100 Subject: Added 144p encoding (#4492) * Added 144p encoding Implements https://github.com/Chocobozzz/PeerTube/issues/4428 * Fixed typo in core-utils * Increased BitPerPixel for 144p * Disabled 144p by default in test.yaml * Another try at fixing tests * Fixed test in video-transcoder (api-3) * Fixed test in video-imports (api-4) * Fixed test in live-constraints (api-2) * Tried to fix tests in api-3 again * Revert "Tried to fix tests in api-3 again" This reverts commit 266e1143fa37f333d149c2c2791c7bd33621ac14. * Fixed test in config.ts (api-2) * Try to fix test in video-hls.ts (api-3) * Fixed test in video-transcoder.ts (api-3) * Fix tests Co-authored-by: Chocobozzz --- shared/core-utils/videos/bitrate.ts | 3 +++ 1 file changed, 3 insertions(+) (limited to 'shared/core-utils/videos') diff --git a/shared/core-utils/videos/bitrate.ts b/shared/core-utils/videos/bitrate.ts index a6712f8a4..18c6e2f6c 100644 --- a/shared/core-utils/videos/bitrate.ts +++ b/shared/core-utils/videos/bitrate.ts @@ -6,6 +6,7 @@ type BitPerPixel = { [ id in VideoResolution ]: number } const averageBitPerPixel: BitPerPixel = { [VideoResolution.H_NOVIDEO]: 0, + [VideoResolution.H_144P]: 0.19, [VideoResolution.H_240P]: 0.17, [VideoResolution.H_360P]: 0.15, [VideoResolution.H_480P]: 0.12, @@ -17,6 +18,7 @@ const averageBitPerPixel: BitPerPixel = { const maxBitPerPixel: BitPerPixel = { [VideoResolution.H_NOVIDEO]: 0, + [VideoResolution.H_144P]: 0.32, [VideoResolution.H_240P]: 0.29, [VideoResolution.H_360P]: 0.26, [VideoResolution.H_480P]: 0.22, @@ -73,6 +75,7 @@ function calculateBitrate (options: { VideoResolution.H_480P, VideoResolution.H_360P, VideoResolution.H_240P, + VideoResolution.H_144P, VideoResolution.H_NOVIDEO ] -- cgit v1.2.3