Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Ruby gem and DSL for transcoding, reading and grabbing thumbnails from media formats supported by FFmpeg

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 examples
Octocat-spinner-32 ext
Octocat-spinner-32 lib
Octocat-spinner-32 spec
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.markdown
Octocat-spinner-32 Rakefile
Octocat-spinner-32 VERSION
Octocat-spinner-32 puremotion.gemspec
README.markdown

PureMotion (0.1.0)

OVERVIEW

PureMotion is a Ruby gem for handling media files through ffmpeg

FEATURES

1. Media Information:

PureMotion uses the libav* libraries from the FFmpeg project to read information from all FFmpeg supported media files.

2. Transcoding:

PureMotion provides a DSL for building and running ffmpeg transcodes with progress reporting and logging. Consider the following code for transcoding a video to flv :

Transcode do

    input 'sample.ogv'

    video do
        codec :flv
        resize 320, 240
        bitrate '320k'
    end

    audio do
        codec :libmp3lame
        channels 2
        bitrate '64k'
    end

    output 'converted.flv'

    log 'transcode.log'

    event :progress do |transcode, progress|
        puts "#{progress[:percent]}%"
    end

end

3. Thumbnails:

The GD image library is used to resize and save in PNG format captured images from a video stream.

Media 'sample.mp4' do

    if video? then
        video.seek(5).grab.resize(320, 240).save('thumb.png')
    end

end

BUILDING

To build the PureMotion gem from source you will need to have libav* and libgd installed.

Something went wrong with that request. Please try again.