1.0.0 • Published 5 years ago
choirlessffmpegrunner v1.0.0
ffmpegrunner
A tiny utility that turns a fluent-ffmpeg command into a Promise
Installing
npm install https://github.com/glynnbird/ffmpegrunner.gitUsage
const run = require('ffmegrunner').run
const ffmpeg = require('fluent-ffmpeg')
const main = async () => {
const command = ffmpeg()
.input('in.mp4')
.output('out.jpg')
.outputOptions(['-format singlejpeg', '-vframes 1'])
await run(command)
}
main()To send debug information to stderr, add true as a second parameter to run e.g
await run(command, true)To probe a file with ffprobe:
const probe = require('ffmpegrunner').probe
const results = await probe('myfile.mp4')1.0.0
5 years ago