Overview
Therecord command starts a screen recording or lists available capture targets.
Usage
Subcommands
screens
List all available screens for capturing.windows
List all available windows for capturing.cameras
List all available cameras.Options
Target Selection (Required)
You must specify either--screen or --window:
ID of the screen to capture. Use
cap record screens to list available screens.ID of the window to capture. Use
cap record windows to list available windows.--screen and --window are mutually exclusive. You can only specify one.Audio Options
Index or name of the camera to record. Use
cap record cameras to list available cameras.ID of the microphone to record from.
Capture system audio during recording.
Recording Settings
Path to save the
.cap project file. Defaults to <uuid>.cap in the current directory.Maximum frames per second to record (max 60).
Examples
Record a Specific Screen
Record a Window with System Audio
Record with Camera and Microphone
Record at 30 FPS
Full Recording Setup
Stopping a Recording
Once recording starts, you’ll see:.cap project file will be saved to the specified path.
Output Format
Recordings are saved as.cap project files containing:
- Video frames: Raw screen capture data
- Audio tracks: Microphone and system audio (if enabled)
- Camera feed: Video from the camera (if enabled)
- Metadata: Recording settings and timestamps
- Cursor data: Cursor position and appearance
Platform-Specific Notes
macOS
- Uses native Screen Capture API (ScreenCaptureKit)
- Requires screen recording permission
- Camera requires camera permission
- System audio capture requires audio permissions
Windows
- Uses Windows.Graphics.Capture API
- Requires appropriate permissions
- System audio capture may require additional setup
Technical Implementation
The record command is implemented inapps/cli/src/record.rs:8-95:
Troubleshooting
No screens or windows listed
No screens or windows listed
Ensure Cap has the necessary permissions:
- macOS: System Preferences → Security & Privacy → Privacy → Screen Recording
- Windows: Check app permissions in Settings
Recording file not created
Recording file not created
- Verify you have write permissions in the target directory
- Ensure sufficient disk space
- Check that the path is valid
Camera not detected
Camera not detected
- Verify camera permissions
- Ensure camera is not in use by another application
- Try listing cameras with
cap record cameras
Next Steps
Export Command
Learn how to export your .cap recordings to video
CLI Overview
Back to CLI overview