automated converting between gif and mp4 with single image convertion separated
This commit is contained in:
9
gifToMp4.js
Normal file
9
gifToMp4.js
Normal file
@@ -0,0 +1,9 @@
|
||||
const { exec } = require("child_process");
|
||||
|
||||
module.exports = function gifToMp4(inputFile = __dirname + '/input.gif', outputFile = __dirname + '/output.gif', callback) {
|
||||
console.log('converting gif to mp4');
|
||||
exec(`ffmpeg -i ${inputFile} ${outputFile} -y`, () => {
|
||||
callback(outputFile);
|
||||
});
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user