diff options
Diffstat (limited to 'shared/models/videos/video-resolution.enum.ts')
-rw-r--r-- | shared/models/videos/video-resolution.enum.ts | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/shared/models/videos/video-resolution.enum.ts b/shared/models/videos/video-resolution.enum.ts index 2eee03843..7da5e7100 100644 --- a/shared/models/videos/video-resolution.enum.ts +++ b/shared/models/videos/video-resolution.enum.ts | |||
@@ -50,8 +50,7 @@ function getBaseBitrate (resolution: VideoResolution) { | |||
50 | * getBaseBitrate() * 1.4. All other values are calculated linearly | 50 | * getBaseBitrate() * 1.4. All other values are calculated linearly |
51 | * between these two points. | 51 | * between these two points. |
52 | */ | 52 | */ |
53 | export function getTargetBitrate (resolution: VideoResolution, fps: number, | 53 | export function getTargetBitrate (resolution: VideoResolution, fps: number, fpsTranscodingConstants: VideoTranscodingFPS) { |
54 | fpsTranscodingConstants: VideoTranscodingFPS) { | ||
55 | const baseBitrate = getBaseBitrate(resolution) | 54 | const baseBitrate = getBaseBitrate(resolution) |
56 | // The maximum bitrate, used when fps === VideoTranscodingFPS.MAX | 55 | // The maximum bitrate, used when fps === VideoTranscodingFPS.MAX |
57 | // Based on numbers from Youtube, 60 fps bitrate divided by 30 fps bitrate: | 56 | // Based on numbers from Youtube, 60 fps bitrate divided by 30 fps bitrate: |
@@ -71,7 +70,6 @@ export function getTargetBitrate (resolution: VideoResolution, fps: number, | |||
71 | /** | 70 | /** |
72 | * The maximum bitrate we expect to see on a transcoded video in bytes per second. | 71 | * The maximum bitrate we expect to see on a transcoded video in bytes per second. |
73 | */ | 72 | */ |
74 | export function getMaxBitrate (resolution: VideoResolution, fps: number, | 73 | export function getMaxBitrate (resolution: VideoResolution, fps: number, fpsTranscodingConstants: VideoTranscodingFPS) { |
75 | fpsTranscodingConstants: VideoTranscodingFPS) { | ||
76 | return getTargetBitrate(resolution, fps, fpsTranscodingConstants) * 2 | 74 | return getTargetBitrate(resolution, fps, fpsTranscodingConstants) * 2 |
77 | } | 75 | } |