This package has been deprecated

Author message:

Use nmmes-module-normalize instead

nmmes-module-autocrop

0.0.1 • Public • Published

NMMES-module-autocrop

An automatic crop detection module for nmmes-backend.

Dependencies

Installation

NPM

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)
});

Readme

Keywords

none

Package Sidebar

Install

npm i nmmes-module-autocrop

Weekly Downloads

0

Version

0.0.1

License

MIT

Last publish

Collaborators

  • fallingsnow