brew install ffmpeg
chmod u+x /Volumes/External/screenshots/record_screen
# sudo crontab -e -u root
*/1 * * * * /Volumes/External/screenshots/record_screen
You will also want to give screen recording permissions to cron
and screencapture
so they can run in the background.
To make the binaries easier to find do the following
cd ~
ln -s `which cron` .
ln -s `which screencapture` .
Now go to: System Preferences > Security & Privacy > Screen Recording
Now use the +
button and add the binaries you just created links for.
If you want to encrypt and compress the recordings, use the v2 of the script
To decrypt
gpg -d [filename].tar.gz.gpg | tar xzvf - --strip-components=1