This describes how to create GIF files of a screen recording using FFmpeg.
Install FFmpeg using Homebrew
- Run the following to install FFmpeg (Note: You must have Homebrew installed.)
$ brew install ffmpeg
- Check that FFmpeg is installed
$ brew list
Create a recording of the device
- Connect device to your computer
- Open Quicktime
- Under “File”, select “New Movie Recording”
- Select your external device from the drop-down menu
- Create your recording
- Save the recording
Convert the .mov file to a .png file
Run the following command
ffmpeg -i ios-sdk-starter.mov -i ios-sdk-starter.png -lavfi fps=20,paletteuse -y ios-sdk-starter.gif
Example
ffmpeg -i just-java.mov -lavfi fps=20,paletteuse -y just-java.gif
ffmpeg -i just-java.mov -pix_fmt just-java.gif
ffmpeg -i just-java.mov just-java.png
ffmpeg -y -i just-java.mov
-vf fps=10,scale=320:-1:flags=lanczos,palettegen just-java.png
ffmpeg -i just-java.mov -r 10 just-java.png