How to record the audio when recording screen using screencapture in terminal
I can use the built-in command called screencapture to record the screen using commands like
screencapture -v -V2 a.mov
which will record the whole screen in 2 seconds. You can also use -R<x,y,w,h> to specify the region for capturing.
However, it can not record the audio. In MacOS Catalina, I can install software BlackHole to support the audio routing. And there is a screencapture -G<id> option which is said "-G<id> captures audio during a video recording using audio id specified." However, it does not say how to find the audio id of audio devices.
If I know the audio id, I can use screencapture and software BlackHole to capture the audio.
Does anyone know the solution?
MacBook Pro 13″, macOS 10.15