aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/models/videos/video-resolution.enum.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-11-24 14:08:23 +0100
committerChocobozzz <chocobozzz@cpy.re>2020-11-25 10:07:51 +0100
commit5a547f69d5dc5867e253f7721513479c754b4f15 (patch)
tree5ccad0e07d04e24d7a4c0b624a46d3b5a93ebce5 /shared/models/videos/video-resolution.enum.ts
parent9252a33d115bba85adcfbc18ab3725924642871c (diff)
downloadPeerTube-5a547f69d5dc5867e253f7721513479c754b4f15.tar.gz
PeerTube-5a547f69d5dc5867e253f7721513479c754b4f15.tar.zst
PeerTube-5a547f69d5dc5867e253f7721513479c754b4f15.zip
Support encoding profiles
Diffstat (limited to 'shared/models/videos/video-resolution.enum.ts')
-rw-r--r--shared/models/videos/video-resolution.enum.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/shared/models/videos/video-resolution.enum.ts b/shared/models/videos/video-resolution.enum.ts
index 571ab5d8f..dcd55dad8 100644
--- a/shared/models/videos/video-resolution.enum.ts
+++ b/shared/models/videos/video-resolution.enum.ts
@@ -81,7 +81,7 @@ export function getTargetBitrate (resolution: number, fps: number, fpsTranscodin
81 // Example outputs: 81 // Example outputs:
82 // 1080p10: 2420 kbps, 1080p30: 3300 kbps, 1080p60: 4620 kbps 82 // 1080p10: 2420 kbps, 1080p30: 3300 kbps, 1080p60: 4620 kbps
83 // 720p10: 1283 kbps, 720p30: 1750 kbps, 720p60: 2450 kbps 83 // 720p10: 1283 kbps, 720p30: 1750 kbps, 720p60: 2450 kbps
84 return baseBitrate + (fps - fpsTranscodingConstants.AVERAGE) * (maxBitrateDifference / maxFpsDifference) 84 return Math.floor(baseBitrate + (fps - fpsTranscodingConstants.AVERAGE) * (maxBitrateDifference / maxFpsDifference))
85} 85}
86 86
87/** 87/**