NMMES-module-autocrop
An automatic crop detection module for nmmes-backend.
Dependencies
- nmmes-backend - Required in order to run this module.
Installation
Usage
You will need to install the encoder module (nmmes-module-encoder
) for this example.
import {Video, Logger} from 'nmmes-backend';
import encoder from 'nmmes-module-encoder';
import autocrop from 'nmmes-module-autocrop';
let video = new Video({
input: {
path: '/home/user/videos/video.mp4'
},
output: {
path: '/home/user/videos/encoded-video.mkv'
},
modules: [new autocrop(), new encoder({
defaults: {
video: {
'c:{POS}': 'libx265'
}
}
})]
});
video.on('stop', function(err) {
if (err)
return Logger.error('Error encoding video', err);
Logger.log('Video encoding complete.');
});
video.start();
Options
You may pass the autocrop class an optional options object.
new autocrop({
intervals: 10 // You may set the number of samples to take (Usually dont want to go under 10)
});