ffprobe
Use ffprobe to get info from media files and return as JSON
Installation
This module is installed via npm:
$ npm install ffprobe
Example Usage
ffprobe
is a dual API, supporting both node.js callbacks AND Promise
s.
Callback API
List the output of ffprobe for a media file in a convenient JSON format:
var ffprobe =ffprobeStatic = ;;
Promise API
List the output of ffprobe for a media file in a convenient JSON format:
var ffprobe =ffprobeStatic = ;});
API
ffprobe(mediaFilePath, opts, [cb])
mediaFilePath
- path to your audio / video / image that you want to get media info for.opts
- options object with the following options:path
- path to ffprobe binary (You can useffprobe-static
to easily get a static binary that you can install with npm.
cb(err, info)
- standard callback, with the info returned as a javascript object. NB: If thecb
parameter is not provided, aPromise
will be returned allowing chainedthen()
,catch()
methods.