SCREENCAPTURE(1) General Commands Manual SCREENCAPTURE(1)

screencapturecapture images from the screen and save them to a file or the clipboard

screencapture [-SWCTMPcimswxto] file

The screencapture utility is not very well documented to date. A list of options follows.

Force screen capture to go to the clipboard.
Capture Touch Bar, only works in non-interactive modes.
Capture the cursor as well as the screen. Only allowed in non-interactive modes.
Display errors to the user graphically.
Capture screen interactively, by selection or window. The control key will cause the screenshot to go to the clipboard. The space key will toggle between mouse selection and window selection modes. The escape key will cancel the interactive screenshot.
Only capture the main monitor, undefined if -i is set.
<display> Screen capture or record from the display specified. 1 is main, 2 secondary, etc
In window capture mode, do not capture the shadow of the window.
Screen capture will use the default settings for capture. The files argument will be ignored.
Open the taken picture in a new Mail message.
Open the taken picture in a Preview window or QuickTime Player if video.
Open the taken picture in Messages.
<bundleid> Open in the app matching bundleid.
Only allow mouse selection mode.
In window capture mode, capture the screen instead of the window.
<style> Sets the starting style of interfactive capture "selection","window","video".
<format> Image format to create, default is png (other options include pdf, jpg, tiff and other formats).
<seconds> Take the picture after a delay of <seconds>, default is 5.
Only allow window selection mode.
Start interaction in window selection mode.
Do not play sounds.
Do not capture attached windows.
Do not add screen dpi meta data to captured file.
<windowid> Captures the window with windowid.
<rectangle> Capture rectangle using format x,y,width,height.
Capture video recording of the screen.
<seconds> Capture video recording of the screen for the specified seconds.
<id> Captures audio during a video recording using audio source specified by id.
Captures audio during a video recording using default input.
Show clicks in video recordings.
Show interactive toolbar in interactive mode.
Present UI after screencapture is complete. Files passed to commandline will be ignored.
files
where to save the screen capture, 1 file per screen

Better documentation is needed for this utility.

To capture screen content while logged in via ssh, you must launch screencapture in the same mach bootstrap hierarchy as loginwindow:

A screencapture utility first appeared in Mac OS X v10.2.

June 16, 2004 Mac OS