Created
April 8, 2011 15:26
-
-
Save brettbuddin/910100 to your computer and use it in GitHub Desktop.
Using the new Preset API to define a preset in another location from where you are actually calling `convert`.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "rubygems" | |
require "bundler/setup" | |
require "ffmpeg" #=> https://github.com/brettbuddin/ffmpeg | |
include FFMpeg | |
Presets.define(:mp4_240x180_400k_aac, "mp4") do | |
resolution "240x180" | |
audio_codec "libfaac" | |
video_bitrate "400k" | |
video_codec "mpeg4" | |
end | |
convert("input_file.avi", :preset => :mp4_240x180_400k_aac) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment