Giter Site home page Giter Site logo

ffmpeg's Introduction

FFMpeg

A DSL for building and executing ffmpeg commands.

Requirements

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

Install

gem install ffmpeg —source http://gemcutter.org

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 and most of the advanced video options from the ffmpeg documentation as well
as improved and refactored specs.

Thanks to jamesdaniels for fixing a nasty output path error while using the :to => extension option

ffmpeg's People

Contributors

iltempo avatar polly avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

llawlor eric013

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.