Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
A DSL for building and executing ffmpeg commands
Ruby
Branch: master
Pull request Compare This branch is 5 commits ahead, 13 commits behind polly:master.

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
features
lib
rdoc
spec
.gitignore
LICENSE
README.textile
Rakefile
VERSION.yml
ffmpeg.gemspec

README.textile

FFMpeg

A DSL for building and executing ffmpeg commands.

Requirements

It requires that you already have ffmpeg installed, obviously :)

Install

gem install polly-ffmpeg —source http://gems.github.com

Usage

To build and execute a command you would use the FFMpeg::convert method and then call the FFMpeg::run method like this:

require “rubygems”
require “ffmpeg”
include FFMpeg

convert “file.ext”, :to => “new_file.ext” do
    seek “00:01:13”
    duration “00:10:01”
end.run

If you want the output file to have the same name as the input file it’s enough to just specify the new file extension like this:

require “rubygems”
require “ffmpeg”
include FFMpeg

convert “finding_that_nemo_dude.avi”, :to => :flv do
    …
end

This will produce an output file called finding_that_nemo_dude.flv

For more information checkout the documentation or my blog

Credit where credit’s due

Thank’s to jwthompson2, there’s now support for all of the standard video and audio options from the ffmpeg documentation as well
as improved and refactored specs.

Something went wrong with that request. Please try again.