Last active
February 27, 2019 13:44
-
-
Save pwfcurry/b392f8360d97d2a258cc49663b0c2949 to your computer and use it in GitHub Desktop.
Record iOS simulator & convert to gif
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Record Simulator screen - CTRL+C to finish | |
xcrun simctl io booted recordVideo appVideo.mov | |
# 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 appVideo.mov -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
Credit goes to https://gist.github.com/tskaggs/6394639 & https://timourrashed.com/fix-dyld-library-loaded-usrlocaloptx265liblibx26595dylib-running-ffmpeg/