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

14
extractFrames.js Normal file
View File

@@ -0,0 +1,14 @@
const fs = require('fs');
module.exports = async function extractFrames(inputFile = __dirname + '/input.mp4', outputFolder = __dirname + '/tmp-ss', callback) {
console.log('extracting frames');
fs.mkdirSync(outputFolder);
const extractFrames = require('ffmpeg-extract-frames')
await extractFrames({
input: inputFile,
output: outputFolder + '/%d.png',
});
callback();
}