Skip to content

glynnbird/ffmpegrunner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ffmpegrunner

A tiny utility that turns a fluent-ffmpeg command into a Promise

Installing

npm install https://github.com/glynnbird/ffmpegrunner.git

Usage

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')

About

fluent-ffmpeg promise runner

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published