automated converting between gif and mp4 with single image convertion separated
This commit is contained in:
9
scaleVideo.js
Normal file
9
scaleVideo.js
Normal 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);
|
||||
});
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user