v0.1.4
ffmpeg-cli
A simple way of implementing FFmpeg regardless of OS
const ffmpeg = require("ffmpeg-cli");
ffmpeg.run("-version");
console.log(ffmpeg.runSync("-version"));Supported OS
- MacOS ~ 64 bit
- Linux ~ 32/64 bit
- Windows ~ 32/64 bit
Synchronous Commands
Returns the output from FFmpeg
ffmpeg.runSync(commands);
// Ex: ffmpeg.runSync(`-i input.jpg -vf scale=320:240 output.png`);Asynchronous Commands
Returns a promise
ffmpeg.run(commands);
ffmpeg.run(commands).catch((error)=>{...}); // Catch errors
ffmpeg.run(commands).then((result)=>{...}); // Only results
ffmpeg.run(commands).then((result)=>{...}).catch((error)=>{...}); // Catches when errors found