Flatbed is a project mainly written in Ruby, it's free.
A ruby library for video editing and assembly using ffmpeg
A ruby library for video editing and assembly
For now, see tests at http://github.com/meanmarcus/flatbed.
Or, here is an example that I used as a proof of concept for the gem: http://gist.github.com/379773
And the video it produced: http://vimeo.com/11197879