Skip to content

qpycam-record Command

The qpycam-record command allows users to record video from a selected camera source and save it as an MP4 file.

Usage

To start recording with default settings:

qpycam-record

To see all available options:

qpycam-record --help

Commonly Used Options

Option Description
-ct, --camera_type Selects the camera type (0: CSI, 1: USB, 2: RTSP).
-id, --device_id Specifies the device ID for USB cameras (default: 2).
-url, --input_rtsp_url RTSP stream URL (only for RTSP cameras).
-t, --timeout Sets the stream duration in ms (0 for infinite).

For a full list of common options, refer to Common Options.

Recording Options

Option Description
-o, --output_file Path to save the recorded video (MP4 format only). Default: test.mp4.

Note

qpycam-record does not display the video feed. It only records and saves the file.
Ensure you have enough disk space for longer recordings.

Example Usage

  1. Record video from the default CSI camera

    qpycam-record
    

    (Default output file: test.mp4)

  2. Record from a USB camera (device ID 1)

    qpycam-record -ct 1 -id 1 -o usb_record.mp4
    
  3. Record an RTSP stream

    qpycam-record -ct 2 -url rtsp://10.1.9.22:8900/live -o rtsp_record.mp4
    
  4. Record video for 10 seconds

    qpycam-record -o short_clip.mp4 -t 10000
    
  5. Record with a custom resolution and frame rate

    qpycam-record -sw 1280 -sh 720 -f 60 -o hd_record.mp4