You can capture the screencast video using QuickTime Player.
- Open Quicktime Player
- Go to
File > New Screen Recording
- Click the record button and follow the instructions
- Go to
File > Export
, choose the highest quality and save asscreencast.mov
Download the clickdrag.swift
file below.
# Make the clickdrag.swift file executable
chmod +x ~/Downloads/clickdrag.swift
Download the StartWindowRecording.applescript
file below and open it with the Script Editor utility.
Change the values of theProcessName
and theWindowNumber
at the top to the target application window (and window number) that you want to capture.
Choose Script > Run
to run the script.
This will launch QuickTime Player, start a new screen recording, and select the exact dimensions of the target window.
Finally:
- Click Start Recording
- To end the recording, click the stop button in the system menu bar
- Go to
File > Export
, choose the highest quality and save asscreencast.mov
# Install dependencies
brew install ffmpeg
brew cask install xquartz
open /usr/local/Caskroom/xquartz/2.7.9/XQuartz.pkg
brew install gifsicle
# Convert screencast.mov to screencast.gif
ffmpeg -i screencast.mov -vf scale=800:-1 -r 10 -f image2pipe -vcodec ppm - | convert -delay 5 -layers Optimize -loop 0 - screencast.gif
# View the GIF
open -a Safari screencap.gif
- https://gist.github.com/dergachev/4627207#instructions
- https://gist.github.com/dergachev/4627207#gistcomment-1311137
- https://gist.github.com/dergachev/4627207#gistcomment-1543177
- http://www.paulcalnan.com/archives/2014/10/quicktime-screen-recording-of-a-single-window.html
- https://gist.github.com/pwc3/e611504878fd3e18ce91#file-start-screen-recording-scpt
- https://gist.github.com/pwc3/ea255791598a79a1bcd9#gistcomment-1985664
To apply a filter to set saturation to 0 (black and white):
See https://ffmpeg.org/ffmpeg-filters.html#hue