Created
January 20, 2014 07:27
-
-
Save arirusso/8516315 to your computer and use it in GitHub Desktop.
Extract animated gif from mp4 video
This file contains hidden or 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
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