X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fhelpers%2Fffprobe-utils.ts;h=767f37f9ca3141fbfd539321e1605c42908c1ba0;hb=bacb544dbb548955d3f47365902b104d787a51a3;hp=8381dee84facea27f4b9bbd18173e97fd745f452;hpb=41fb13c330de629df2d23379209e79c7af0f2e9a;p=github%2FChocobozzz%2FPeerTube.git 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) { // Hard FPS limits if (fps > VIDEO_TRANSCODING_FPS.MAX) fps = getClosestFramerateStandard(fps, 'HD_STANDARD') - else if (fps < VIDEO_TRANSCODING_FPS.MIN) fps = VIDEO_TRANSCODING_FPS.MIN + + if (fps < VIDEO_TRANSCODING_FPS.MIN) { + throw new Error(`Cannot compute FPS because ${fps} is lower than our minimum value ${VIDEO_TRANSCODING_FPS.MIN}`) + } return fps }