This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.
To capture the video (filesize: 19MB), using the free "QuickTime Player" application:
| #!/bin/bash | |
| # AnyBar - https://github.com/tonsky/AnyBar | |
| function anybar { echo -n $1 | nc -4u -w0 localhost ${2:-1738}; } | |
| function drip { | |
| while sleep 5; do | |
| wget -q --tries=10 --timeout=20 --spider http://google.com | |
| if [[ $? -eq 0 ]]; then | |
| anybar green |
| =Navigating= | |
| visit('/projects') | |
| visit(post_comments_path(post)) | |
| =Clicking links and buttons= | |
| click_link('id-of-link') | |
| click_link('Link Text') | |
| click_button('Save') | |
| click('Link Text') # Click either a link or a button | |
| click('Button Value') |
| # Monitor HTTP requests being made from your machine with a one-liner.. | |
| # Replace "en1" below with your network interface's name (usually en0 or en1) | |
| sudo tcpdump -i en1 -n -s 0 -w - | grep -a -o -E "Host\: .*|GET \/.*" | |
| # OR.. to be able to use as "httpdump" from anywhere, drop this into ~/.bash_profile: | |
| # (again replace "en1" with correct network interface name) | |
| alias httpdump="sudo tcpdump -i en1 -n -s 0 -w - | grep -a -o -E "Host\: .*|GET \/.*"" | |
| # All the above tested only on OS X. |
| if [ -z $1 ] | |
| then | |
| if [ "$OS" == "Darwin" ] | |
| then | |
| echo "Updating…" | |
| brew update | |
| echo "Upgrading…" | |
| brew upgrade | |
| else | |
| sudo apt-get update |
I say "animated gif" but in reality I think it's irresponsible to be serving "real" GIF files to people now. You should be serving gfy's, gifv's, webm, mp4s, whatever. They're a fraction of the filesize making it easier for you to deliver high fidelity, full color animation very quickly, especially on bad mobile connections. (But I suppose if you're just doing this for small audiences (like bug reporting), then LICEcap is a good solution).
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>video</title> | |
| <style> | |
| .wraper { position: relative; } | |
| .videoHolder, .cover { position: absolute; } | |
| .videoHolder { | |
| display: none; | |
| z-index: 1; |