diff options
Diffstat (limited to 'server')
-rw-r--r-- | server/helpers/ffprobe-utils.ts | 5 | ||||
-rw-r--r-- | server/initializers/constants.ts | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/server/helpers/ffprobe-utils.ts b/server/helpers/ffprobe-utils.ts index 8381dee84..767f37f9c 100644 --- a/server/helpers/ffprobe-utils.ts +++ b/server/helpers/ffprobe-utils.ts | |||
@@ -302,7 +302,10 @@ function computeFPS (fpsArg: number, resolution: VideoResolution) { | |||
302 | 302 | ||
303 | // Hard FPS limits | 303 | // Hard FPS limits |
304 | if (fps > VIDEO_TRANSCODING_FPS.MAX) fps = getClosestFramerateStandard(fps, 'HD_STANDARD') | 304 | if (fps > VIDEO_TRANSCODING_FPS.MAX) fps = getClosestFramerateStandard(fps, 'HD_STANDARD') |
305 | else if (fps < VIDEO_TRANSCODING_FPS.MIN) fps = VIDEO_TRANSCODING_FPS.MIN | 305 | |
306 | if (fps < VIDEO_TRANSCODING_FPS.MIN) { | ||
307 | throw new Error(`Cannot compute FPS because ${fps} is lower than our minimum value ${VIDEO_TRANSCODING_FPS.MIN}`) | ||
308 | } | ||
306 | 309 | ||
307 | return fps | 310 | return fps |
308 | } | 311 | } |
diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts index 2fa0aa7bf..facd3b721 100644 --- a/server/initializers/constants.ts +++ b/server/initializers/constants.ts | |||
@@ -346,7 +346,7 @@ const VIEW_LIFETIME = { | |||
346 | let CONTACT_FORM_LIFETIME = 60000 * 60 // 1 hour | 346 | let CONTACT_FORM_LIFETIME = 60000 * 60 // 1 hour |
347 | 347 | ||
348 | const VIDEO_TRANSCODING_FPS: VideoTranscodingFPS = { | 348 | const VIDEO_TRANSCODING_FPS: VideoTranscodingFPS = { |
349 | MIN: 10, | 349 | MIN: 1, |
350 | STANDARD: [ 24, 25, 30 ], | 350 | STANDARD: [ 24, 25, 30 ], |
351 | HD_STANDARD: [ 50, 60 ], | 351 | HD_STANDARD: [ 50, 60 ], |
352 | AVERAGE: 30, | 352 | AVERAGE: 30, |