Automates recording Vimeo class videos on macOS using Chrome, AppleScript, the built-in Screenshot app, and BlackHole for audio capture.
- Opens the Vimeo URL in a new Chrome tab with
autoplay=1 - Waits for the page to load, then clicks to focus the player
- Plays, unmutes, and sets playback speed to 2×
- Enables captions (
Ckey) - Starts BlackHole audio capture (ffmpeg) and macOS screen recording simultaneously
- Goes fullscreen and waits for the calculated recording duration
- Stops both recordings, exits fullscreen, closes the tab
- Merges the
.movscreen capture +.aacaudio into a final.mp4via ffmpeg - Cleans up the temp
.movand.aacfiles
- macOS with the built-in Screenshot app
- Google Chrome
- ffmpeg (
brew install ffmpeg) - BlackHole 2ch virtual audio driver
- Terminal granted Accessibility and Screen Recording permissions (System Settings → Privacy & Security)
Edit the top of record_videos.py:
| Variable | Default | Notes |
|---|---|---|
OUTPUT_DIR |
~/Jingjing's docs/DI/class_recordings |
Where final .mp4 files are saved |
LOG_FILE |
~/Desktop/recording_log.txt |
Timestamped log of every action |
SPEED |
2.0 |
Playback speed (duration is auto-detected and adjusted) |
END_BUFFER |
30 |
Extra seconds added after the video ends |
SKIP_EXISTING |
True |
Skips a video if its .mp4 already exists |
BLACKHOLE_AUDIO_INDEX |
"0" |
BlackHole device index from ffmpeg -f avfoundation -list_devices true -i "" |
python3 record_videos.pyDo not touch the mouse or keyboard while the script runs — AppleScript controls the UI directly.
Files are saved as {chapter}_{label}.mp4, e.g. week5day2_GENAI_AI_194_FT.mp4.
Add entries to the VIDEOS list in record_videos.py:
{"url": "https://vimeo.com/XXXXXXXXX/XXXXXXXXXX?fl=pl&fe=cm", "chapter": "weekXdayY", "label": "GENAI_AI_194_FT"},| Chapter | Label |
|---|---|
| week3day1 – week3day5 | GENAI_AI_194_FT |
| week4day1 – week4day3 | GENAI_AI_194_FT |
| week5day2 – week5day4 | GENAI_AI_194_FT |