schaermu/node-fluent-ffmpeg — pull request #236 by njoyard (2014-04-23 19:25:23+00:00)
Title: [RFC] Integrate ffprobe

This is more of a request for comments for now as there are still things to polish.

This pull request enables using ffprobe for querying data about media files. It is *much* more reliable than the current way of getting metadata (it relies on parsing the output from ffmpeg, which is undocumented, unspecified and prone to breakage). ffprobe, on the other hand, has a specified output and even outputs JSON.

```javascript
var Ffmpeg = require("fluent-ffmpeg");

Fffmpeg.ffprobe("/path/to/file.mp4", function(err, data) {
// Gets metadata for an arbitrary file
});

new Ffmpeg({ input: "/path/to/file.mp4" })
.ffprobe(function(err, data) {
// Gets metadata for an FfmpegCommand, only reliable with file inputs
});
```

The current way of getting metadata still works, but it is no longer used internally for size calculations and progress events, ffprobe is used instead. As ffprobe is bundled with ffmpeg, no additional dependency installation is required for users.

See the updated [README](https://github.com/njoyard/node-fluent-ffmpeg/blob/ffprobe/README.md#using-ffprobe) for more details on usage and output format. I also added a [section with prerequisite information](https://github.com/njoyard/node-fluent-ffmpeg/blob/ffprobe/README.md#prerequisites).

Please comment on this change !