pegg
TypeScript icon, indicating that this package has built-in type declarations

3.0.2 • Public • Published

Pegg Travis CI Build Status

FFMpeg with auto installation and a fluent api.

NPM Badge

Install

npm install pegg

Usage

const pegg = require("pegg");
 
(async () => {
    pegg.ffmpeg("/path/to/file.avi"); // See https://www.npmjs.com/package/fluent-ffmpeg
})();

API

pegg

ffmpeg

Type: fluent-ffmpeg object

The Fluent FFMpeg object to use.

toPromise(fluentFFmpegObj)

Convert a Fluent FFMpeg object to use a Promise.

fluentFFmpegObj

Type: fluent-ffmpeg object

The object to convert.

exec(...args)

Execute the ffmpeg binary with raw commandline input.

args

Type: ...string

The commandline arguments to use.

paths

The paths to the binaries that pegg uses.

Upgrading from v2

  • All functions are no longer behind a promise.
  • getBinaryPaths() is now paths.
  • Removed prepare. A functional equalivent is automatically run on install.
  • Pegg now downloads the binaries to the appdata folder under the pegg-nodejs subfolder to prevent the need to redownload the binaries due to clearing the temp directory.

Upgrading from v1

  • Removed when. Pegg will now automatically ensure readiness when calling any other functions.
  • paths has been replaced with getBinaryPaths.
  • exec now only works for ffmpeg and assumes each function argument as part of the command.
  • ffmpeg now returns a promise which will resolve to the fluent ffmpeg object.
  • Bluebird promises have been swapped out for native promises via async/await and similar methods.
  • Debug information is no longer logged.

Package Sidebar

Install

npm i pegg

Weekly Downloads

3

Version

3.0.2

License

MIT

Unpacked Size

9.08 kB

Total Files

18

Last publish

Collaborators

  • richienb