initial commit

This commit is contained in:
2023-10-14 22:41:00 +02:00
parent 39d9e2cb47
commit b11c2f6d31
5 changed files with 41 additions and 36 deletions

View File

@ -28,6 +28,18 @@ module.exports = {
});
});
},
'scaleVideo': (options) => {
ffmpeg(options.inputPath)
.size(`${options.width}x${options.height}`)
.videoBitrate(options.bitrate)
.save(options.outputPath)
.on('end', () => {
console.log('Video resolution and file size have been changed successfully!');
})
.on('error', (err) => {
console.log('Error: ' + err.message);
});
},
/**
* encodes video with given parameters
* @param {object} options JSON Object passed as settings