3.0.2 • Published 6 years ago
pegg v3.0.2
Pegg 
FFMpeg with auto installation and a fluent api.
Install
npm install peggUsage
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 nowpaths.- Removed prepare. A functional equalivent is automatically run on install.
- Pegg now downloads the binaries to the appdata folder under the
pegg-nodejssubfolder 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. pathshas been replaced withgetBinaryPaths.execnow only works forffmpegand assumes each function argument as part of the command.ffmpegnow 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.
