Update extract.js

This commit is contained in:
Namhyeon Go 2023-07-05 01:55:46 +09:00 committed by GitHub
parent c27f948606
commit d63bb584be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -49,10 +49,9 @@ function extract(req,res,next) {
ffmpegParams.outputOptions=[];
switch (preset) {
case "1":
ffmpegParams.outputOptions.push(`-vf scale='min(400, iw):min(400, ih)':force_original_aspect_ratio=decrease`);
ffmpegParams.outputOptions.push(`-vf fps=${fps}`);
ffmpegParams.outputOptions.push(`-f image2`);
ffmpegParams.outputOptions.push(`-vframes 1`);
ffmpegParams.outputOptions.push(`-y`);
break;
default:
ffmpegParams.outputOptions.push(`-vf fps=${fps}`);