video-compressor
Version:
This package is used to reduce the size of the videos in your project. After including this package to the project, you must provide the input and output file paths as parameter of compress method. Later, when you upload video to the path you specified as
22 lines (17 loc) • 469 B
JavaScript
const processVideo = require('./src/video-compress');
const routine = require('./src/routine');
const start = async () => {
const missingVideos = routine.sync();
if (missingVideos.length > 0) {
await processVideo(missingVideos[0], missingVideos);
}
};
start()
.then(res => {
routine.watchFiles(processVideo);
})
.catch(reason => {
console.log(reason);
process.exit();
});
// start();