Skip to content

Instantly share code, notes, and snippets.

@higsch
Forked from dergachev/GIF-Screencast-OSX.md
Created June 8, 2021 06:58

Revisions

  1. @dergachev dergachev revised this gist Jun 7, 2019. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions GIF-Screencast-OSX.md
    Original file line number Diff line number Diff line change
    @@ -39,8 +39,8 @@ The conversion process requires the following command-line tools:
    If you use homebrew and homebrew-cask software packages, just type this in:

    brew install ffmpeg
    brew cask install x-quartz #dependency for gifsicle, only required for mountain-lion and above
    open /usr/local/Cellar/x-quartz/2.7.4/XQuartz.pkg # runs the XQuartz installer
    brew cask install xquartz #dependency for gifsicle, only required for mountain-lion and above
    open /usr/local/Cellar/x-quartz/2.7.4/XQuartz.pkg # runs the XQuartz installer (YOU NEED TO UPDATE THE PATH)
    brew install gifsicle


  2. @dergachev dergachev revised this gist Mar 6, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion GIF-Screencast-OSX.md
    Original file line number Diff line number Diff line change
    @@ -46,7 +46,7 @@ If you use homebrew and homebrew-cask software packages, just type this in:

    ## See also

    I ended up rewriting this gist's functionality into screengif, a ruby script with significant quality improvements and a few gratuitous features. Check it out at https://github.com/dergachev/screengif
    I ended up rewriting this gist's functionality into [**screengif**](https://github.com/dergachev/screengif), a ruby script with significant quality improvements and a few gratuitous features. Check it out at https://github.com/dergachev/screengif

    ## Resources

  3. @dergachev dergachev revised this gist Mar 6, 2015. 1 changed file with 5 additions and 0 deletions.
    5 changes: 5 additions & 0 deletions GIF-Screencast-OSX.md
    Original file line number Diff line number Diff line change
    @@ -43,6 +43,11 @@ If you use homebrew and homebrew-cask software packages, just type this in:
    open /usr/local/Cellar/x-quartz/2.7.4/XQuartz.pkg # runs the XQuartz installer
    brew install gifsicle


    ## See also

    I ended up rewriting this gist's functionality into screengif, a ruby script with significant quality improvements and a few gratuitous features. Check it out at https://github.com/dergachev/screengif

    ## Resources

    * http://schneems.com/post/41104255619/use-gifs-in-your-pull-request-for-good-not-evil (primary source!)
  4. @dergachev dergachev revised this gist Feb 6, 2013. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions Performance-vs-quality.md
    Original file line number Diff line number Diff line change
    @@ -10,8 +10,8 @@ The following details my experiments of converting a 3.8 second movie to a GIF.
    * 42 seconds in CONVERT, did not determine file size

    ```
    ffmpeg -i in-trimmed.mov -r 10 -vcodec png out-static-%02d.png
    time for img in out-static*.png; do convert -verbose +dither -layers Optimize "$img" "$img.gif" ; done
    ffmpeg -i in-trimmed.mov -r 10 -vcodec png out-static-%02d.png
    time for img in out-static*.png; do convert -verbose +dither -layers Optimize "$img" "$img.gif" ; done
    ```

    ## FFMPEG to PNG -> CONVERT TO GIF in bulk
  5. @dergachev dergachev revised this gist Feb 6, 2013. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion Performance-vs-quality.md
    Original file line number Diff line number Diff line change
    @@ -9,10 +9,12 @@ The following details my experiments of converting a 3.8 second movie to a GIF.

    * 42 seconds in CONVERT, did not determine file size

    ```
    ffmpeg -i in-trimmed.mov -r 10 -vcodec png out-static-%02d.png
    time for img in out-static*.png; do convert -verbose +dither -layers Optimize "$img" "$img.gif" ; done
    ```

    ## FFMPEG to PNG -> CONVERT TO GIF BULK
    ## FFMPEG to PNG -> CONVERT TO GIF in bulk

    * 70KB filesize; 7.2 seconds in CONVERT
    * http://dl-web.dropbox.com/u/29440342/screenshots/CTHVGY-Screencast-2013.02.06-18.03.gif
  6. @dergachev dergachev revised this gist Feb 6, 2013. 1 changed file with 5 additions and 1 deletion.
    6 changes: 5 additions & 1 deletion Performance-vs-quality.md
    Original file line number Diff line number Diff line change
    @@ -63,7 +63,11 @@ ffmpeg -i in-trimmed.mov -vf "scale=min(iw\,600):-1" -pix_fmt rgb24 -r 10 -f gif
    ## Notes

    * Omitting resizing down to 600x600 before converting to GIF dramatically slows down CONVERT.

    * PPM is the only image format that is compatible with FFMPEG piping directly to CONVERT
    * it has the same performance and compression characteristics as outputting to PNG
    * it avoids creating and cleaning up temporary image files
    * otherwise the temporary files would need to be sorted by numeric order before globbing

    ## Resources

    * http://www.imagemagick.org/discourse-server/viewtopic.php?f=2&t=18320#reading-multiple-images-over-standard-input
  7. @dergachev dergachev revised this gist Feb 6, 2013. 1 changed file with 23 additions and 13 deletions.
    36 changes: 23 additions & 13 deletions Performance-vs-quality.md
    Original file line number Diff line number Diff line change
    @@ -3,7 +3,7 @@
    I was disappointed with the color and quality that ffmpeg's GIF conversion gives.
    Imagemagick's convert can also be used to do the conversion, though this has serious performance penalties.

    The following is the detailed findings, based on trying to convert a 3.8 second movie to a GIF.
    The following details my experiments of converting a 3.8 second movie to a GIF.

    ## FFMPEG to PNG -> CONVERT to GIF individually

    @@ -12,47 +12,57 @@ The following is the detailed findings, based on trying to convert a 3.8 second
    ffmpeg -i in-trimmed.mov -r 10 -vcodec png out-static-%02d.png
    time for img in out-static*.png; do convert -verbose +dither -layers Optimize "$img" "$img.gif" ; done

    ## 3.8 second movie -> FFMPEG to PNG -> CONVERT TO GIF BULK
    ## FFMPEG to PNG -> CONVERT TO GIF BULK

    * 70KB filesize; 7.2 seconds in CONVERT
    * http://dl-web.dropbox.com/u/29440342/screenshots/CTHVGY-Screencast-2013.02.06-18.03.gif

    ffmpeg -i in-trimmed.mov -r 10 -vcodec png out-static-%02d.png
    time convert -verbose +dither -layers Optimize -resize 600x600\> out-static*.png GIF:- > out13.gif
    ```
    ffmpeg -i in-trimmed.mov -r 10 -vcodec png out-static-%02d.png
    time convert -verbose +dither -layers Optimize -resize 600x600\> out-static*.png GIF:- > out13.gif
    ```

    ## FFMPEG to PNG -> CONVERT to GIF in bulk -> gifsicle

    * 56KB size; 7 seconds in CONVERT
    * 56KB size; 7.2 seconds in CONVERT
    * http://dl-web.dropbox.com/u/29440342/screenshots/USNVKN-Screencast-2013.02.06-18.13.gif

    ffmpeg -i in-trimmed.mov -r 10 -vcodec png out-static-%02d.png
    time convert -verbose +dither -layers Optimize -resize 600x600\> out-static*.png GIF:- | gifsicle --colors 128 --delay=5 --loop --optimize=3 --multifile - > out13.gif
    ```
    ffmpeg -i in-trimmed.mov -r 10 -vcodec png out-static-%02d.png
    time convert -verbose +dither -layers Optimize -resize 600x600\> out-static*.png GIF:- | gifsicle --colors 128 --delay=5 --loop --optimize=3 --multifile - > out12.gif
    ```

    ## FFMPEG to PPM -> CONVERT to GIF in bulk

    * 6.7 seconds in CONVERT, 70KB filesize
    * http://dl-web.dropbox.com/u/29440342/screenshots/ZMMDMX-Screencast-2013.02.06-17.59.gif

    ffmpeg -i in-trimmed.mov -r 10 -vcodec ppm out-static-%02d.ppm
    time convert -verbose +dither -layers Optimize -resize 600x600\> out-static*.ppm GIF:- > out14.gif
    ```
    ffmpeg -i in-trimmed.mov -r 10 -vcodec ppm out-static-%02d.ppm
    time convert -verbose +dither -layers Optimize -resize 600x600\> out-static*.ppm GIF:- > out14.gif
    ```

    ## FFMPEG to PPM -> CONVERT to GIF in bulk -> gifsicle

    * 7.2 seconds in CONVERT, 56KB filesize
    * http://dl-web.dropbox.com/u/29440342/screenshots/UGTQNY-Screencast-2013.02.06-17.49.gif

    time ffmpeg -i in-trimmed.mov -r 10 -f image2pipe -vcodec ppm - | time convert -verbose +dither -layers Optimize -resize 600x600\> - gif:- | gifsicle --colors 128 --delay=5 --loop --optimize=3 --multifile -> out15.gif
    ```
    time ffmpeg -i in-trimmed.mov -r 10 -f image2pipe -vcodec ppm - | time convert -verbose +dither -layers Optimize -resize 600x600\> - gif:- | gifsicle --colors 128 --delay=5 --loop --optimize=3 --multifile -> out15.gif
    ```

    ## FFMPEG to GIF -> gifsicle

    * 1 second total (not using CONVERT), 22KB filesize
    * http://dl-web.dropbox.com/u/29440342/screenshots/XVXWCJ-Screencast-2013.02.06-17.48.gif

    ffmpeg -i in-trimmed.mov -vf "scale=min(iw\,600):-1" -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=7 --colors 128 > out16.gif
    ```
    ffmpeg -i in-trimmed.mov -vf "scale=min(iw\,600):-1" -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=7 --colors 128 > out16.gif
    ```

    ## Notes

    * Note that omitting resizing before converting to GIF dramatically slows down CONVERT.
    * imagemagick convert is much slower, but ffmpeg's GIF encoding is borked and produces really bad quality.
    * Omitting resizing down to 600x600 before converting to GIF dramatically slows down CONVERT.

    ## Resources

  8. @dergachev dergachev revised this gist Feb 6, 2013. 1 changed file with 67 additions and 0 deletions.
    67 changes: 67 additions & 0 deletions Performance-vs-quality.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,67 @@
    # GIF-Screencast-OSX performance testing

    I was disappointed with the color and quality that ffmpeg's GIF conversion gives.
    Imagemagick's convert can also be used to do the conversion, though this has serious performance penalties.

    The following is the detailed findings, based on trying to convert a 3.8 second movie to a GIF.

    ## FFMPEG to PNG -> CONVERT to GIF individually

    * 42 seconds in CONVERT, did not determine file size

    ffmpeg -i in-trimmed.mov -r 10 -vcodec png out-static-%02d.png
    time for img in out-static*.png; do convert -verbose +dither -layers Optimize "$img" "$img.gif" ; done

    ## 3.8 second movie -> FFMPEG to PNG -> CONVERT TO GIF BULK

    * 70KB filesize; 7.2 seconds in CONVERT
    * http://dl-web.dropbox.com/u/29440342/screenshots/CTHVGY-Screencast-2013.02.06-18.03.gif

    ffmpeg -i in-trimmed.mov -r 10 -vcodec png out-static-%02d.png
    time convert -verbose +dither -layers Optimize -resize 600x600\> out-static*.png GIF:- > out13.gif

    ## FFMPEG to PNG -> CONVERT to GIF in bulk -> gifsicle

    * 56KB size; 7 seconds in CONVERT

    ffmpeg -i in-trimmed.mov -r 10 -vcodec png out-static-%02d.png
    time convert -verbose +dither -layers Optimize -resize 600x600\> out-static*.png GIF:- | gifsicle --colors 128 --delay=5 --loop --optimize=3 --multifile - > out13.gif

    ## FFMPEG to PPM -> CONVERT to GIF in bulk

    * 6.7 seconds in CONVERT, 70KB filesize
    * http://dl-web.dropbox.com/u/29440342/screenshots/ZMMDMX-Screencast-2013.02.06-17.59.gif

    ffmpeg -i in-trimmed.mov -r 10 -vcodec ppm out-static-%02d.ppm
    time convert -verbose +dither -layers Optimize -resize 600x600\> out-static*.ppm GIF:- > out14.gif

    ## FFMPEG to PPM -> CONVERT to GIF in bulk -> gifsicle

    * 7.2 seconds in CONVERT, 56KB filesize
    * http://dl-web.dropbox.com/u/29440342/screenshots/UGTQNY-Screencast-2013.02.06-17.49.gif

    time ffmpeg -i in-trimmed.mov -r 10 -f image2pipe -vcodec ppm - | time convert -verbose +dither -layers Optimize -resize 600x600\> - gif:- | gifsicle --colors 128 --delay=5 --loop --optimize=3 --multifile -> out15.gif

    ## FFMPEG to GIF -> gifsicle

    * 1 second total (not using CONVERT), 22KB filesize
    * http://dl-web.dropbox.com/u/29440342/screenshots/XVXWCJ-Screencast-2013.02.06-17.48.gif

    ffmpeg -i in-trimmed.mov -vf "scale=min(iw\,600):-1" -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=7 --colors 128 > out16.gif

    ## Notes

    * Note that omitting resizing before converting to GIF dramatically slows down CONVERT.
    * imagemagick convert is much slower, but ffmpeg's GIF encoding is borked and produces really bad quality.

    ## Resources

    * http://www.imagemagick.org/discourse-server/viewtopic.php?f=2&t=18320#reading-multiple-images-over-standard-input
    * http://superuser.com/questions/71028/batch-converting-png-to-jpg-in-linux
    * http://zeekish.wordpress.com/2011/09/14/pdf-to-gif-conversion-and-optimization/
    * http://stackoverflow.com/questions/3306888/ffmpeg-generate-n-evenly-spaced-png-screenshots
    * http://mariovalle.name/postprocessing/ImageTools.html#gifsicle
    * http://ffmpeg-users.933282.n4.nabble.com/Converting-avi-files-to-animated-gifs-td935274.html
    * https://lists.libav.org/pipermail/ffmpeg-user/2010-August/026860.html
    * http://stackoverflow.com/questions/8133242/ffmpeg-resize-down-larger-video-to-fit-desired-size-and-add-padding
    * http://superuser.com/questions/318845/improve-quality-of-ffmpeg-created-jpgs
  9. @dergachev dergachev revised this gist Feb 6, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion GIF-Screencast-OSX.md
    Original file line number Diff line number Diff line change
    @@ -22,7 +22,7 @@ Notes on the arguments:

    * `-r 10` tells ffmpeg to reduce the frame rate from 25 fps to 10
    * `-s 600x400` tells ffmpeg the max-width and max-height
    * `--delay=3` tells gifsicle to delay 300ms between each gif
    * `--delay=3` tells gifsicle to delay 30ms between each gif
    * `--optimize=3` requests that gifsicle use the slowest/most file-size optimization

    To share the new GIF using [Dropbox](http://dropbox.com) and [Copy Public URL](https://github.com/dergachev/copy-public-url), run the following:
  10. @dergachev dergachev revised this gist Jan 24, 2013. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions GIF-Screencast-OSX.md
    Original file line number Diff line number Diff line change
    @@ -16,7 +16,7 @@ To capture the video (filesize: 19MB), using the free "QuickTime Player" applica

    To convert in.mov into out.gif (filesize: 48KB), open Terminal to the folder with `in.mov` and run the following command:

    ffmpeg -i in.mov -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > Screencast-`date +"%Y.%m.%d-%H.%M"`.gif
    ffmpeg -i in.mov -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > out.gif

    Notes on the arguments:

    @@ -27,7 +27,7 @@ Notes on the arguments:

    To share the new GIF using [Dropbox](http://dropbox.com) and [Copy Public URL](https://github.com/dergachev/copy-public-url), run the following:

    cp out.gif ~/Dropbox/Public/screenshots/DESCRIPTIVE-NAME.gifno
    cp out.gif ~/Dropbox/Public/screenshots/Screencast-`date +"%Y.%m.%d-%H.%M"`.gif

    ## Installation

  11. @dergachev dergachev revised this gist Jan 24, 2013. 1 changed file with 5 additions and 1 deletion.
    6 changes: 5 additions & 1 deletion GIF-Screencast-OSX.md
    Original file line number Diff line number Diff line change
    @@ -16,7 +16,7 @@ To capture the video (filesize: 19MB), using the free "QuickTime Player" applica

    To convert in.mov into out.gif (filesize: 48KB), open Terminal to the folder with `in.mov` and run the following command:

    ffmpeg -i in.mov -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > out.gif
    ffmpeg -i in.mov -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > Screencast-`date +"%Y.%m.%d-%H.%M"`.gif

    Notes on the arguments:

    @@ -25,6 +25,10 @@ Notes on the arguments:
    * `--delay=3` tells gifsicle to delay 300ms between each gif
    * `--optimize=3` requests that gifsicle use the slowest/most file-size optimization

    To share the new GIF using [Dropbox](http://dropbox.com) and [Copy Public URL](https://github.com/dergachev/copy-public-url), run the following:

    cp out.gif ~/Dropbox/Public/screenshots/DESCRIPTIVE-NAME.gifno

    ## Installation

    The conversion process requires the following command-line tools:
  12. @dergachev dergachev revised this gist Jan 24, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion GIF-Screencast-OSX.md
    Original file line number Diff line number Diff line change
    @@ -36,7 +36,7 @@ If you use homebrew and homebrew-cask software packages, just type this in:

    brew install ffmpeg
    brew cask install x-quartz #dependency for gifsicle, only required for mountain-lion and above
    open /usr/local/Cellar/xquartz/2.7.4/XQuartz.pkg # runs the XQuartz installer
    open /usr/local/Cellar/x-quartz/2.7.4/XQuartz.pkg # runs the XQuartz installer
    brew install gifsicle

    ## Resources
  13. @dergachev dergachev revised this gist Jan 24, 2013. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion GIF-Screencast-OSX.md
    Original file line number Diff line number Diff line change
    @@ -11,7 +11,8 @@ To capture the video (filesize: 19MB), using the free "QuickTime Player" applica
    * Open "Quicktime Player",
    * Go to File -> New Screen Recording
    * Selected screen portion by dragging a rectangle, recorded 13 second video.
    * Saved the video in **full quality** with the filename `in.mov`
    * Go to File -> Export -> As Movie
    * Saved the video in **full quality** with the filename `in.mov`

    To convert in.mov into out.gif (filesize: 48KB), open Terminal to the folder with `in.mov` and run the following command:

  14. @dergachev dergachev revised this gist Jan 24, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion GIF-Screencast-OSX.md
    Original file line number Diff line number Diff line change
    @@ -34,7 +34,7 @@ The conversion process requires the following command-line tools:
    If you use homebrew and homebrew-cask software packages, just type this in:

    brew install ffmpeg
    brew-cask install x-quartz #dependency for gifsicle, only required for mountain-lion and above
    brew cask install x-quartz #dependency for gifsicle, only required for mountain-lion and above
    open /usr/local/Cellar/xquartz/2.7.4/XQuartz.pkg # runs the XQuartz installer
    brew install gifsicle

  15. @dergachev dergachev revised this gist Jan 24, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion GIF-Screencast-OSX.md
    Original file line number Diff line number Diff line change
    @@ -35,7 +35,7 @@ If you use homebrew and homebrew-cask software packages, just type this in:

    brew install ffmpeg
    brew-cask install x-quartz #dependency for gifsicle, only required for mountain-lion and above
    open /usr/local/Cellar/xquartz/2.7.4/XQuartz.pkg # launches the XQuartz installer that cask downloaded
    open /usr/local/Cellar/xquartz/2.7.4/XQuartz.pkg # runs the XQuartz installer
    brew install gifsicle

    ## Resources
  16. @dergachev dergachev revised this gist Jan 24, 2013. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions GIF-Screencast-OSX.md
    Original file line number Diff line number Diff line change
    @@ -32,6 +32,7 @@ The conversion process requires the following command-line tools:
    * **gifsicle** to create and optimize the an animated gif

    If you use homebrew and homebrew-cask software packages, just type this in:

    brew install ffmpeg
    brew-cask install x-quartz #dependency for gifsicle, only required for mountain-lion and above
    open /usr/local/Cellar/xquartz/2.7.4/XQuartz.pkg # launches the XQuartz installer that cask downloaded
  17. @dergachev dergachev revised this gist Jan 24, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion GIF-Screencast-OSX.md
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    # OS X Screencast to animated GIF

    This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.
    This gist shows how to create a GIF screencast using only free OS X tools: *QuickTime, ffmpeg, and gifsicle*.

    ![Screencapture GIF](http://dl-web.dropbox.com/u/29440342/screenshots/OBDHSF-KJDFKJS-screencapture.gif)

  18. @dergachev dergachev revised this gist Jan 24, 2013. 1 changed file with 1 addition and 3 deletions.
    4 changes: 1 addition & 3 deletions GIF-Screencast-OSX.md
    Original file line number Diff line number Diff line change
    @@ -1,8 +1,6 @@
    # OS X Screencast to animated GIF

    This gist shows how to create a GIF screencast using only free OS X tools:

    QuickTime, ffmpeg, and gifsicle.
    This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

    ![Screencapture GIF](http://dl-web.dropbox.com/u/29440342/screenshots/OBDHSF-KJDFKJS-screencapture.gif)

  19. @dergachev dergachev revised this gist Jan 24, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion GIF-Screencast-OSX.md
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    # OS X Screencast to animated GIF

    This gist shows how I created the following animated gif with only free (as in beer) OS X tools:
    This gist shows how to create a GIF screencast using only free OS X tools:

    QuickTime, ffmpeg, and gifsicle.

  20. @dergachev dergachev revised this gist Jan 24, 2013. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion GIF-Screencast-OSX.md
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,8 @@
    # OS X Screencast to animated GIF

    This gist shows how I created the following animated gif with only free (as in beer) OS X tools:
    Quicktime, ffmpeg, and gifsicle.

    QuickTime, ffmpeg, and gifsicle.

    ![Screencapture GIF](http://dl-web.dropbox.com/u/29440342/screenshots/OBDHSF-KJDFKJS-screencapture.gif)

  21. @dergachev dergachev revised this gist Jan 24, 2013. 1 changed file with 2 additions and 3 deletions.
    5 changes: 2 additions & 3 deletions GIF-Screencast-OSX.md
    Original file line number Diff line number Diff line change
    @@ -1,8 +1,7 @@
    # OS X Screencast to animated GIF

    The following animated gif was captured with only free (as in beer) OS X tools: Quicktime, ffmpeg, and gifsicle.

    This gist shows how.
    This gist shows how I created the following animated gif with only free (as in beer) OS X tools:
    Quicktime, ffmpeg, and gifsicle.

    ![Screencapture GIF](http://dl-web.dropbox.com/u/29440342/screenshots/OBDHSF-KJDFKJS-screencapture.gif)

  22. @dergachev dergachev revised this gist Jan 24, 2013. 1 changed file with 24 additions and 9 deletions.
    33 changes: 24 additions & 9 deletions GIF-Screencast-OSX.md
    Original file line number Diff line number Diff line change
    @@ -8,19 +8,27 @@ This gist shows how.

    ## Instructions

    The above gif was created as follows:
    To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

    * Open "Quicktime Player",
    * Go to File -> New Screen Recording
    * Selected screen portion by dragging a rectangle, recorded 13 second video.
    * Saved the video in **full quality** named in.mov (filesize: 19 megabytes)
    * Ran the following command that produced out.gif (filesize: 48 kilabytes)
    * `ffmpeg -i in.mov -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle -O3 -d3 > out.gif`
    * "-r 10" refers to 10 frames per second
    * "-s 600x400" specifies max-width and max-height
    * Saved the video in **full quality** with the filename `in.mov`

    To convert in.mov into out.gif (filesize: 48KB), open Terminal to the folder with `in.mov` and run the following command:

    ffmpeg -i in.mov -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > out.gif

    Notes on the arguments:

    * `-r 10` tells ffmpeg to reduce the frame rate from 25 fps to 10
    * `-s 600x400` tells ffmpeg the max-width and max-height
    * `--delay=3` tells gifsicle to delay 300ms between each gif
    * `--optimize=3` requests that gifsicle use the slowest/most file-size optimization

    ## Installation

    The conversion requires the following command-line tools:
    The conversion process requires the following command-line tools:

    * **ffmpeg** to process the video file
    * **gifsicle** to create and optimize the an animated gif
    @@ -31,9 +39,16 @@ If you use homebrew and homebrew-cask software packages, just type this in:
    open /usr/local/Cellar/xquartz/2.7.4/XQuartz.pkg # launches the XQuartz installer that cask downloaded
    brew install gifsicle

    ## Resources:
    ## Resources

    * http://schneems.com/post/41104255619/use-gifs-in-your-pull-request-for-good-not-evil (primary source!)
    * http://www.reddit.com/r/programming/comments/16zu7d/use_gifs_in_your_pull_requests_for_good_not_evil/
    * http://superuser.com/questions/436056/how-can-i-get-ffmpeg-to-convert-a-mov-to-a-gif#_=_
    * http://gnuski.blogspot.ca/2012/06/creating-animate-gif-with-free-software.html
    * http://gnuski.blogspot.ca/2012/06/creating-animate-gif-with-free-software.html

    ## Related Ideas

    * Extend https://github.com/dergachev/copy-public-url folder action for this use case
    * it would automate the conversion before copying Dropbox public URL
    * assign the folder action to ~/Dropbox/Public/Screenshots/gif
    * consider finding a way to simplify the dependency installation
  23. @dergachev dergachev renamed this gist Jan 24, 2013. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  24. @dergachev dergachev renamed this gist Jan 24, 2013. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  25. @dergachev dergachev revised this gist Jan 24, 2013. 1 changed file with 12 additions and 6 deletions.
    18 changes: 12 additions & 6 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,7 @@
    # Screen Capture with Quicktime/FFmpeg/gifsicle
    # OS X Screencast to animated GIF

    The following animated gif was captured with only free (as in beer) OS X tools: Quicktime, ffmpeg, and gifsicle.

    The following animated gif was captured with only free (as in beer) tools: OS X / Quicktime, ffmpeg, gifsicle.
    This gist shows how.

    ![Screencapture GIF](http://dl-web.dropbox.com/u/29440342/screenshots/OBDHSF-KJDFKJS-screencapture.gif)
    @@ -19,11 +20,16 @@ The above gif was created as follows:

    ## Installation

    brew install ffmpeg imagemagick
    brew-cask install x-quartz #dependency for gifsicle, required for mountain-lion and above
    open /usr/local/Cellar/xquartz/2.7.4/XQuartz.pkg # run the installer
    brew install gifsicle
    The conversion requires the following command-line tools:

    * **ffmpeg** to process the video file
    * **gifsicle** to create and optimize the an animated gif

    If you use homebrew and homebrew-cask software packages, just type this in:
    brew install ffmpeg
    brew-cask install x-quartz #dependency for gifsicle, only required for mountain-lion and above
    open /usr/local/Cellar/xquartz/2.7.4/XQuartz.pkg # launches the XQuartz installer that cask downloaded
    brew install gifsicle

    ## Resources:

  26. @dergachev dergachev revised this gist Jan 24, 2013. 1 changed file with 3 additions and 2 deletions.
    5 changes: 3 additions & 2 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,7 @@
    # Screen Capture with Quicktime/FFmpeg/gifsicle

    This gist explains how I created the following screencapture as an animated gif:
    The following animated gif was captured with only free (as in beer) tools: OS X / Quicktime, ffmpeg, gifsicle.
    This gist shows how.

    ![Screencapture GIF](http://dl-web.dropbox.com/u/29440342/screenshots/OBDHSF-KJDFKJS-screencapture.gif)

    @@ -26,7 +27,7 @@ The above gif was created as follows:

    ## Resources:

    * http://schneems.com/post/41104255619/use-gifs-in-your-pull-request-for-good-not-evil
    * http://schneems.com/post/41104255619/use-gifs-in-your-pull-request-for-good-not-evil (primary source!)
    * http://www.reddit.com/r/programming/comments/16zu7d/use_gifs_in_your_pull_requests_for_good_not_evil/
    * http://superuser.com/questions/436056/how-can-i-get-ffmpeg-to-convert-a-mov-to-a-gif#_=_
    * http://gnuski.blogspot.ca/2012/06/creating-animate-gif-with-free-software.html
  27. @dergachev dergachev revised this gist Jan 24, 2013. 1 changed file with 4 additions and 3 deletions.
    7 changes: 4 additions & 3 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    # Screen Capture with Quicktime/FFmpeg/gifsicle

    ## End result
    This gist explains how I created the following screencapture as an animated gif:

    ![Screencapture GIF](http://dl-web.dropbox.com/u/29440342/screenshots/OBDHSF-KJDFKJS-screencapture.gif)

    @@ -12,8 +12,9 @@ The above gif was created as follows:
    * Selected screen portion by dragging a rectangle, recorded 13 second video.
    * Saved the video in **full quality** named in.mov (filesize: 19 megabytes)
    * Ran the following command that produced out.gif (filesize: 48 kilabytes)
    * `ffmpeg -i in.mov -pix_fmt rgb24 -r 10 -f gif - | gifsicle -O3 -d3 > out.gif`

    * `ffmpeg -i in.mov -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle -O3 -d3 > out.gif`
    * "-r 10" refers to 10 frames per second
    * "-s 600x400" specifies max-width and max-height

    ## Installation

  28. @dergachev dergachev revised this gist Jan 24, 2013. 1 changed file with 8 additions and 2 deletions.
    10 changes: 8 additions & 2 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,11 @@
    # Screen Capture with Quicktime/FFmpeg/gifsicle

    ## End result

    ![Screencapture GIF](http://dl-web.dropbox.com/u/29440342/screenshots/OBDHSF-KJDFKJS-screencapture.gif)

    ## Instructions

    The above gif was created as follows:
    * Open "Quicktime Player",
    * Go to File -> New Screen Recording
    @@ -9,15 +15,15 @@ The above gif was created as follows:
    * `ffmpeg -i in.mov -pix_fmt rgb24 -r 10 -f gif - | gifsicle -O3 -d3 > out.gif`


    Installing:
    ## Installation

    brew install ffmpeg imagemagick
    brew-cask install x-quartz #dependency for gifsicle, required for mountain-lion and above
    open /usr/local/Cellar/xquartz/2.7.4/XQuartz.pkg # run the installer
    brew install gifsicle


    Resources:
    ## Resources:

    * http://schneems.com/post/41104255619/use-gifs-in-your-pull-request-for-good-not-evil
    * http://www.reddit.com/r/programming/comments/16zu7d/use_gifs_in_your_pull_requests_for_good_not_evil/
  29. @dergachev dergachev revised this gist Jan 24, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion README.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    [Screencapture GIF](http://dl-web.dropbox.com/u/29440342/screenshots/OBDHSF-KJDFKJS-screencapture.gif)
    ![Screencapture GIF](http://dl-web.dropbox.com/u/29440342/screenshots/OBDHSF-KJDFKJS-screencapture.gif)

    The above gif was created as follows:
    * Open "Quicktime Player",
  30. @dergachev dergachev created this gist Jan 24, 2013.
    25 changes: 25 additions & 0 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,25 @@
    [Screencapture GIF](http://dl-web.dropbox.com/u/29440342/screenshots/OBDHSF-KJDFKJS-screencapture.gif)

    The above gif was created as follows:
    * Open "Quicktime Player",
    * Go to File -> New Screen Recording
    * Selected screen portion by dragging a rectangle, recorded 13 second video.
    * Saved the video in **full quality** named in.mov (filesize: 19 megabytes)
    * Ran the following command that produced out.gif (filesize: 48 kilabytes)
    * `ffmpeg -i in.mov -pix_fmt rgb24 -r 10 -f gif - | gifsicle -O3 -d3 > out.gif`


    Installing:

    brew install ffmpeg imagemagick
    brew-cask install x-quartz #dependency for gifsicle, required for mountain-lion and above
    open /usr/local/Cellar/xquartz/2.7.4/XQuartz.pkg # run the installer
    brew install gifsicle


    Resources:

    * http://schneems.com/post/41104255619/use-gifs-in-your-pull-request-for-good-not-evil
    * http://www.reddit.com/r/programming/comments/16zu7d/use_gifs_in_your_pull_requests_for_good_not_evil/
    * http://superuser.com/questions/436056/how-can-i-get-ffmpeg-to-convert-a-mov-to-a-gif#_=_
    * http://gnuski.blogspot.ca/2012/06/creating-animate-gif-with-free-software.html