Skip to content

Instantly share code, notes, and snippets.

@brettbuddin
Created April 8, 2011 15:49
Show Gist options
  • Save brettbuddin/910156 to your computer and use it in GitHub Desktop.
Save brettbuddin/910156 to your computer and use it in GitHub Desktop.
require "rubygems"
require "ffmpeg"
include FFMpeg
PRESETS = {
:mp4_240x180_400k_aac => {
:block => lambda {
resolution "240x180"
audio_codec "libfaac"
video_bitrate "400k"
video_codec "mpeg4"
},
:extension => "mp4"
}
}
convert("input_file.avi", :to => PRESETS[:mp4_240x180_400k_aac][:extension]) do
PRESETS[:mp4_240x180_400k_aac][:block].call
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment