Wondering what’s next for npm?Check out our public roadmap! »

    ffmpeg-bundle

    1.0.1 • Public • Published

    ffmpeg-bundle

    FFmpeg module for Node. This library provides a set of functions and utilities to abstract commands-line usage of ffmpeg. This library comes with platform independent ffmpeg binaries.

    You can install this module using npm:

    npm install ffmpeg-bundle
    

    Usage

    To start using this library, you must include it in your project and then you can either use the callback function or through the promise library:

    var ffmpeg = require('ffmpeg-bundle');
    
    async function process(inputFile, outputFile) {
        return new Promise(function (resolve, reject) {
            try {
                let process = ffmpeg(inputFile);
                process.then(function (video) {
                    video.save(outputFile, function (error, file) {
                        if (!error) {
                            console.log('Video file: ' + file);
                            resolve(file);
                        } else {
                            console.log(error);
                            reject(error);
                        }
                    });
    
                }, function (err) {
                    console.log('Error: ' + err);
                    reject(err);
                });
            } catch (e) {
                console.log(e.code);
                console.log(e.msg);
            }
        });
    }
    

    Reference

    This library is combination of below two libraries

    node-ffmpeg

    @ffmpeg-installer/ffmpeg

    Install

    npm i ffmpeg-bundle

    DownloadsWeekly Downloads

    2

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    47 kB

    Total Files

    9

    Last publish

    Collaborators

    • avatar