automated converting between gif and mp4 with single image convertion separated

This commit is contained in:
2022-02-14 01:11:09 +02:00
parent 2395866988
commit f25b7868d7
12 changed files with 423 additions and 48 deletions

9
scaleVideo.js Normal file
View File

@@ -0,0 +1,9 @@
const { exec } = require("child_process");
module.exports = function scaleVideo(inputFile = __dirname + '/input.mp4', outputFile = __dirname + '/output.mp4', height = 120, fps = 10, callback) {
console.log('scaling video');
exec(`ffmpeg.exe -i ${inputFile} -vf "scale=${height}:-2, fps=${fps} " ${outputFile} -y`, () => {
callback(outputFile);
});
}