gifify() { | |
if [[ -n "$1" ]]; then | |
if [[ $2 == '--good' ]]; then | |
ffmpeg -i $1 -r 10 -vcodec png out-static-%05d.png | |
time convert -verbose +dither -layers Optimize -resize 600x600\> out-static*.png GIF:- | gifsicle --colors 128 --delay=5 --loop --optimize=3 --multifile - > $1.gif | |
rm out-static*.png | |
else | |
ffmpeg -i $1 -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > $1.gif | |
fi | |
else | |
echo "proper usage: gifify <input_movie.mov>. You DO need to include extension." | |
fi | |
} |
brew install ffmpeg | |
brew tap phinze/homebrew-cask | |
brew install brew-cask | |
brew cask install x-quartz | |
open /usr/local/Cellar/x-quartz/2.7.4/XQuartz.pkg | |
# click through the stuff | |
brew install gifsicle | |
brew install imagemagick | |
# I had a weird problem with Convert/imagemagick where I had to do: | |
ln -s /usr/local/Cellar/libtool/2.4.2/lib/libltdl.7.dylib libltdl.7.dylib | |
# But hopefully you don't have to |
This comment has been minimized.
This comment has been minimized.
The GIFs work fine in a browser, but a couple image viewers (Xee, ACDSee) only show the first frame and give a vague loading error message. Any chance of removing the movie's file extension so the name ends up as |
This comment has been minimized.
This comment has been minimized.
This is definitely targeted at going along with pull requests, so that's ok with me re: browsers only. I think that's possible. I'll have to read up on bash scripting for the 10000th time, but I'm sure it's nothing crazy. Happy to take a suggestion :D |
This comment has been minimized.
This comment has been minimized.
Does it matter what you used to record the original video file? What did you use to record cli.mov? |
This comment has been minimized.
This comment has been minimized.
I use QuickTime (free) or Screeny (pretty). Just save in native quality for best results. |
This comment has been minimized.
This comment has been minimized.
feature request: palindromic looping (back n forth)! also the --good setting is incredible. same quality as what i got with GifBrewery but 20% of the size. dayum. |
This comment has been minimized.
This comment has been minimized.
Looks like the location of x-quartz has moved to /usr/local/Caskroom/x-quartz/2.7.4, so line 5 in install.sh should be:
|
This comment has been minimized.
This comment has been minimized.
I kept getting this error: Incompatible library version: convert requires version 11.0.0 or later, but libltdl.7.dylib provides version 10.0.0 I fixed it with this command |
This comment has been minimized.
This comment has been minimized.
does this require zsh? edit: nope. just threw the |
This comment has been minimized.
This comment has been minimized.
Brew Cask put the package for XQuartz into /opt/homebrew-cask/Caskroom/x-quartz/2.7.4 If that helps anyone. |
This comment has been minimized.
This comment has been minimized.
Quality is pretty amazing. |
This comment has been minimized.
This comment has been minimized.
Sweet |
This comment has been minimized.
This comment has been minimized.
|
This comment has been minimized.
This comment has been minimized.
Regarding "screencap.mov.gif", try:
If you're wondering what the GIF line is about:
|
This comment has been minimized.
This comment has been minimized.
use |
This comment has been minimized.
This comment has been minimized.
Not sure if anyone cares about the output, but I like to make my bash functions quiet and less verbose... Here is my stab at it. The output of the command is much prettier. I also added the ability to scale it to a max width (via an argument to the gifify command)...
|
This comment has been minimized.
This comment has been minimized.
Hmm....I'm getting the following:
I checked and that file exists. I've reinstalled imagemagick and libpng umpteen times now. Not sure what else to try |
This comment has been minimized.
This comment has been minimized.
Few issues getting stuff installed, Xquartz seems to have changed names and versions, but now getting an error |
This comment has been minimized.
This comment has been minimized.
@thatryan It sounds like
|
This comment has been minimized.
This comment has been minimized.
afaik the install.sh can now just be brew install ffmpeg gifsicle imagemagick i don't believe xquartz is at all neccessary. (not sure why it was.) |
This comment has been minimized.
This comment has been minimized.
Worked pretty good for me. brew install ffmpeg gifsicle imagemagick Thanks @paulirish & @SlexAxton |
This comment has been minimized.
This comment has been minimized.
Wow, I like @tonycoco's solution. Well done! |
This comment has been minimized.
This comment has been minimized.
I've added the |
This comment has been minimized.
This comment has been minimized.
There's now an installable binary for that, lots of options, optimized! https://github.com/vvo/gifify |
This comment has been minimized.
This comment has been minimized.
I get error on that command: brew install brew-cask Error: Failed to download resource "brew-cask" |
This comment has been minimized.
This comment has been minimized.
Anyone come across this error?
|
This comment has been minimized.
This comment has been minimized.
If this helps anyone, my XQuartz location ended up being: |
This comment has been minimized.
This comment has been minimized.
thatryan: Yes, I have that error (Yosemite). No idea what to do about it. |
This comment has been minimized.
This comment has been minimized.
For those looking to install @vvo's gifify with prerequisites: # install pornel/giflossy (fork of gifsicle)
wget https://github.com/pornel/giflossy/releases/download/lossy%2F1.82.1/gifsicle-1.82.1-lossy.zip
unzip gifsicle-1.82.1-lossy.zip -d gifsicle-1.82.1-lossy
cp gifsicle-1.82.1-lossy/mac/gifsicle /usr/local/bin/
# install ffmpeg
brew install ffmpeg --with-fontconfig --with-libass
# install imagemagick
brew install imagemagick --with-fontconfig
# install gifify
npm install -g gifify Thanks @vvo, @pornel, @paulirish, @SlexAxton, and internets. |
This comment has been minimized.
This comment has been minimized.
Please forgive my ignorance on the matter. I really want to use this as it seems the only method for high quality gifs. |
This comment has been minimized.
This comment has been minimized.
@nexdrew could you please add this to the gifify repo as a PR? very valuable |
This comment has been minimized.
This comment has been minimized.
@vvo and @nexdrew, here's a PR that does it in a curl one-liner: vvo/gifify#46. Feedback? |
This comment has been minimized.
This comment has been minimized.
For anyone else interested, installing gifify locally works pretty well too. $ npm install --save-dev gifify … in your "scripts": {
"gifify": "gifify"
} And can be run from command line like so: $ npm run gifify -- -o test.gif test.mp4 … or js script within package. |
This comment has been minimized.
An example!