mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 10:19:35 +02:00
Don't use min FPS, throw instead
Avoir creating a big output from a very low FPS input file
This commit is contained in:
parent
9f430a53be
commit
f7bb2bb5a7
2 changed files with 5 additions and 2 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue