It’s been a while since I posted about RVideo. Consider this a pre-release announcement.
RVideo is a Ruby gem that makes video and audio transcoding a bit easier. The gem wraps various video transcoding tools – ffmpeg and flvtool2 upon release. But it is extensible, so that other tools (like mencoder) can be added as needed. Transcoder instructions are specified by passing a recipe to RVideo, along with custom values.
For example:
1 2 3 4 5 6 |
recipe = "ffmpeg -i $input_file$ -r 29.97 -vcodec xvid -s $resolution$ $output_file" transcoder = RVideo::Transcoder.new transcoder.execute(recipe, {:input_file => "original.mov", :output_file => "processed.mp4", :resolution => "640x360"}) |
The resulting transcoder object will include information about the job, including metadata for the output file, etc. The execute method raises a variety of exceptions when it doesn’t work (e.g. input file not found, unsupported formats, could not save the output file), so you’ll want to run #execute in a begin/end block and handle each exception as needed.
I’ll go into more detail in a later post, so look for more updates soon. Expect the gem to launch sometime in October.

Good news !
Can’t wait to have a test run !!!! Where is the svn repository !? ;-)
Julien: there is an SVN repository, but the version there is out of date. I’m using mercurial for this project now, and it is more-or-less built in to a video transcoding app I’m working on. Once I get a little further, it will move to RubyForge.
If you’re interested in taking a look at the alpha code, and want to provide some feedback, send me an email (my name at slantwisedesign dot com).
I’m super excited about this. I can’t wait to see the release!
I love you!
stops writing his ffmpeg wrapper
We are anxiously awaiting this video goodness! :-)
Could the Transcode class be used to output the transcoded data directly to STDOUT or a stream in some way, instead of to a file?
FWIW I wrote a minimal ffmpeg wrapper into my ‘jack’ gem. http://rubyforge.org/projects/activereload/. It’s something I’m using in a few places, but I haven’t had time to publicize or document it that much. But, the ffmpeg stuff is pretty simple.