Skip to content

Instantly share code, notes, and snippets.

@jaysephjw
Created May 14, 2019 00:10
Show Gist options
  • Save jaysephjw/a96b8d17802d8e58d98fd4877bf63b26 to your computer and use it in GitHub Desktop.
Save jaysephjw/a96b8d17802d8e58d98fd4877bf63b26 to your computer and use it in GitHub Desktop.
Screen record an iPhone, then convert it to a gif for your PR

Screen capture your iPhone and save as a gif to embed in github. Inspired by https://gist.github.com/dergachev/4627207 : Pipe ffmpeg to gifsicle

Pre-requisites
brew install ffmpeg
brew install gifsicle
iPhone -> .gif
  1. To record the screen to a .mov:

    1. Open QuickTime
    2. New Movie Recording
    3. Select a plugged in phone next to the record button
    4. Press the stop button in your system tray when done
  2. & convert .mov -> .gif:

ffmpeg -i in.mov -vf "scale=min(iw\,600):-1" -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=7 --colors 128 > out.gif
  1. Drag and drop into your PR!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment