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

@@ -0,0 +1,9 @@
const { exec } = require("child_process");
module.exports = function addAudio(inputVideoFile = __dirname + '/input.mp4', inputAudioFile = __dirname + '/input.mp3', outputFile = __dirname + '/output.mp4', callback) {
console.log('adding audio to video file');
exec(`ffmpeg -i ${inputVideoFile} -i ${inputAudioFile} -c:v copy -c:a aac ${outputFile} -y`, () => {
callback(outputFile);
});
}