Skip to content

Instantly share code, notes, and snippets.

@klaaspieter
Last active December 13, 2016 15:26
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
Record video from the running (> Xcode 8.2) simulator and convert it to gif
#!/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