Automatically convert Quicktime screen-recordings to MP4.
As a software engineer, I often record my screen using QuickTime (CMD+SHIFT+5) to document a bug or provide explanation on a code review.
However, QuickTime produces .mov files that are often large and can have compatibility issues.
For a long time, I have used the excellent HandBrake to manually convert my screen recordings to .mp4.
This script aims to automate this task.
This script utilizes fswatch to monitor the screen recording output directory and ffmpeg for video conversion.
Make sure, these are installed:
brew install ffmpeg fswatchTip: You can change where macOS saves screen recordings by running:
defaults write com.apple.screencapture location ~/Pictures/screencaptures killall SystemUIServer
- Clone this repository or download it.
- Run the installer:
This script will:
./install.sh
- Check/Install dependencies (
ffmpeg,fswatch). - Help you configure the watch folder.
- Set up auto-start on login (optional).
- Check/Install dependencies (
To remove Quickshift and stop the background watcher:
# 1. Unload and remove the auto-start agent
launchctl bootout "gui/$(id -u)" ~/Library/LaunchAgents/com.USER.quickshift.plist
rm ~/Library/LaunchAgents/com.USER.quickshift.plist
# 2. Remove configuration (Optional)
rm ~/.quickshiftrc
# 3. Delete the repository
rm -rf /path/to/quickshiftYou can configure the scripts by creating a ~/.quickshiftrc file in your home directory.
Example ~/.quickshiftrc:
# [MANDATORY] Path to watch for new screen recordings
WATCH_FOLDER="${HOME}/Pictures/screencaptures"
# [OPTIONAL] Set to "true" to delete the original .mov file after conversion (Default: false)
# DELETE_ORIGINAL_MOV=true
# [OPTIONAL] Video Quality Settings (CRF: Lower is better quality, 18-28 is sane range) (Default: 23)
# CRF_VALUE=23
# [OPTIONAL] Encoding Preset (ultrafast, medium, veryslow) (Default: medium)
# PRESET="medium"