Recorder Module
Thermal Recorder
Records thermal camera data to files using the shared memory interface.
- class pythermal.record.ThermalRecorder(output_dir: str = 'recordings', color: bool = True, device_index: int | None = None, native_dir: str | None = None)[source]
Bases:
objectRecords thermal camera data to files.
Records both YUYV frames and temperature arrays with timestamps.
- __init__(output_dir: str = 'recordings', color: bool = True, device_index: int | None = None, native_dir: str | None = None)[source]
Initialize thermal recorder.
- Parameters:
output_dir – Directory to save recordings
color – If True, also record colored RGB frames
device_index – Index of the USB device to use (0 for first device, 1 for second, etc.). Default is 0. Each device uses a separate shared memory segment.
native_dir – Optional path to native directory containing pythermal-recorder. If None, uses default package location.
- start(device: ThermalDevice | None = None) bool[source]
Start recording.
- Parameters:
device – Optional ThermalDevice instance. If None, creates a new one.
- Returns:
True if successful, False otherwise
- record_frame() bool[source]
Record a single frame from shared memory.
- Returns:
True if frame was recorded, False otherwise