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
mp4ToGif.js Normal file
View File

@@ -0,0 +1,9 @@
const { exec } = require("child_process");
module.exports = function mp4ToGif(inputFile = __dirname + '/input.gif', outputFile = __dirname + '/output.gif', callback) {
console.log('converting mp4 to gif');
exec(`ffmpeg -i ${inputFile} -f gif ${outputFile} -y`, () => {
callback(outputFile);
});
}