Skip to content

Instantly share code, notes, and snippets.



Last active Feb 27, 2019
What would you like to do?
Record iOS simulator & convert to gif
# Record Simulator screen - CTRL+C to finish
xcrun simctl io booted recordVideo
# Optionally, convert to gif to attach to a GitHub PR:
# install dependencies
brew install ffmpeg -- --with-fdk-aac --with-ffplay --with-freetype --with-libass --with-libquvi --with-libvorbis --with-libvpx --with-opus --with-x265
brew install imagemagick
# convert .mov to a series of PNGs
mkdir output
ffmpeg -i -vf scale=320:-1 -r 10 output/ffout%3d.png
# stitch PNGs together into a gif, with a pause between loops
convert -delay 8 output/ffout*.png -delay 500 output/ffout001.png -loop 0 output/animation.gif
# or with no pause
convert -delay 8 -loop 0 output/ffout*.png output/appVideo.gif
# or with looping disabled
convert -delay 8 -loop 1 output/ffout*.png output/appVideo.gif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.