streamio/streamio-ffmpeg — pull request #73 by RLovelett (2014-02-05 02:53:16+00:00)
Title: Use ffprobe for Metadata Parsing

Instead of using `ffmpeg` for metadata retrieval use [`ffprobe`](http://www.ffmpeg.org/ffprobe.html).

## [ffprobe Documentation](http://www.ffmpeg.org/ffprobe.html#Description)

> ffprobe gathers information from multimedia streams and prints it in human- and machine-readable fashion.
> For example it can be used to check the format of the container used by a multimedia stream and the format and type of each media stream contained in it.
> If a filename is specified in input, ffprobe will try to open and probe the file content.
> ...
> *ffprobe output is designed to be easily parsable by a textual filter, and consists of one or more sections of a form defined by the selected writer, which is specified by the ‘print_format’ option.*

As far as I am concerned that last line is enough of a reason to use `ffprobe` over `ffmpeg`. Ultimately, I think it would go a long way to make it easier to implement #56 and #2.

From reading comments on other open pull-requests I gather the project is risk averse to changing the API. For this reason, I tried to minimize changes to the API outputs. Change set 38a5ae2 shows all the ways that the API has changed. In my opinion, none of them are show stopping API changes (mostly changing the units output from kb/s to b/s). Obviously, the maintainers opinion about what is "show stopping" may differ from myself.

I have tested this pull request against `ffmpeg version 1.2.1-static` and `ffmpeg version 2.1.3`. While `2.1.3` provides some additional metadata not found in `1.2.1` nothing is show stopping.

## Notable changes:

* Added `FFMPEG.ffprobe_binary`; similar in nature to `FFMPEG.ffmpeg_binary`
* Both `FFMPEG.ffprobe_binary` and `FFMPEG.ffmpeg_binary` raise `Errno::ENOENT` if the binary cannot be found (see be9b7a2 and d9007d6).
* Add dependency on [`yajl-ruby`](https://rubygems.org/gems/yajl-ruby) for JSON parsing
* Base units from `kb/s` to `b/s`