Skip to content

Instantly share code, notes, and snippets.

@arirusso arirusso/gifcut.rb
Created Jan 20, 2014

Embed
What would you like to do?
Extract animated gif from mp4 video
input_file,
output_file,
start_time,
duration,
fps,
scale = *ARGV
options = "-ao null -nosound -vo gif89a:fps=#{fps}:output=#{output_file} -ss #{start_time} -endpos #{duration} -vf scale=#{scale}"
player_path = "/Applications/MPlayer OSX Extended.app/Contents/Resources/Binaries/mpextended.mpBinaries/Contents/mpextended.mpBinaries/Contents/MacOS/mplayer"
`'#{player_path}' #{input_file} #{options}`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.