FFruby

FFruby is a Ruby interface to FFmpeg’s libavformat and libavcodec. It allows you to query metadata from a wide variety of media files through some simple classes. FFmpeg’s libraries are required and also the development headers if building.

FAQ

Where do I go for support and contributions?

We are hosted on GitHub at github.com/chewi/ffruby.

Where do I get the latest version?

It should be available through RubyGems as ffruby. Failing that, try GitHub.

What about transcoding?

I still start FFmpeg through a subshell when I need to transcode something. There is little to be gained from doing this within Ruby itself. Other than requiring a fair amount of work, one major disadvantage is that if FFmpeg segfaults (which it has been known to do), it will bring the entire Ruby process down with it, which is probably something you want to avoid.

So what is this good for?

Being able to reliably read the source file’s metadata is very important in deciding how it should be transcoded, or whether it even needs to be transcoded at all. This is not something you want to rely on a subshell for as that would involve awkward parsing of FFmpeg’s output, which does change between versions.

Changes

0.2.3 (2014/11/15)

  • Compatibility with newer FFmpeg versions.

  • Compatibility with Ruby 1.9.

0.2.2 (2010/11/29)

  • Fix compilation with -fno-common for OS X.

  • Make RDoc hack a bit safer.

0.2.1 (2010/11/26)

  • New formats and codecs methods working on older FFmpeg versions.

0.2.0 (2010/11/24)

  • Reworked class structure under common FFruby module.

  • Compatibility with old and new FFmpeg versions.

  • Methods to query supported formats and codecs.

  • Safer memory handling.

  • RDoc documentation.

  • Repackaged using Jeweler.

0.1 (2007/07/26), 0.0.1 (2008/01/11)

  • More or less the same original version. Latter was the initial gem release.

Authors

Copyright © 2007-2014 James Le Cuirot. See LICENSE for details.