aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/transcoding
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/transcoding')
-rw-r--r--server/lib/transcoding/video-transcoding-profiles.ts5
1 files changed, 4 insertions, 1 deletions
diff --git a/server/lib/transcoding/video-transcoding-profiles.ts b/server/lib/transcoding/video-transcoding-profiles.ts
index a8176dca5..848b823e6 100644
--- a/server/lib/transcoding/video-transcoding-profiles.ts
+++ b/server/lib/transcoding/video-transcoding-profiles.ts
@@ -237,5 +237,8 @@ export {
237function capBitrate (inputBitrate: number, targetBitrate: number) { 237function capBitrate (inputBitrate: number, targetBitrate: number) {
238 if (!inputBitrate) return targetBitrate 238 if (!inputBitrate) return targetBitrate
239 239
240 return Math.min(targetBitrate, inputBitrate) 240 // Add 30% margin to input bitrate
241 const inputBitrateWithMargin = inputBitrate + (inputBitrate * 0.3)
242
243 return Math.min(targetBitrate, inputBitrateWithMargin)
241} 244}