Last active
December 13, 2016 15:26
-
-
Save klaaspieter/481e2f70726d070f2ba93a5199d008d6 to your computer and use it in GitHub Desktop.
Record video from the running (> Xcode 8.2) simulator and convert it to gif
This file contains hidden or 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
#!/bin/sh | |
output=$1 | |
tmp_file=$(mktemp) | |
xcrun simctl io booted recordVideo "$tmp_file" | |
ffmpeg -i "$tmp_file" -pix_fmt rgb24 -r 10 -f gif - \ | |
| gifsicle --optimize=3 > "$output" | |
rm -r "$tmp_file" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment