schaermu/node-fluent-ffmpeg — pull request #203 by njoyard (2014-02-22 09:02:32+00:00)
Title: Add codec and format capability helpers

This pull request adds two new methods to query ffmpeg for supported codecs and formats.

`FfmpegCommand#getAvailableCodecs(callback)` runs `ffmpeg -codecs`, parses its output, stores it in the Registry to avoid unnecessary calls, and passes it to the callback in the following form:
```javascript
{
"aac": {
type: "audio", // or "video" or "subtitle"
description: "Advanced Audio Coding",
canEncode: true,
canDecode: true,
drawHorizBand: false,
directRendering: true,
weirdFrameTruncation: false
},
...
}
```

Similarly, `FfmpegCommand#getAvailableFormats(callback)` runs `ffmpeg -formats` and returns something like:
```javascript
{
"avi": {
description: "AVI format",
canMux: true,
canDemux: true
},
...
}
```

Additionaly, a private `FfmpegCommand#_checkCapabilities` method, called by `FfmpegCommand#_prepare()`, calls those two to check that any specified codec is actually available and can encode data, and that any specified input/output format is actually available and can demux/mux.