LiveVideoReaderCV2
Python template · sinapsis_data_readers.templates.video_readers.video_reader_cv2
Overview
This template provides functionality to process all the frames captured by video reader. It's expected to be used in agents running in forever_loop mode., Attributes for base class of Video Readers.
Attributes: video_file_path (str | list[str]): Path or list of paths to the video(s). batch_size (int): Number of frames in the batch. Default is 1. video_source (int | str | None): Source of the video. Default is a UUID string. device (Literal["cpu", "gpu"]): Device to be used for loading the video. Default is "cpu". loop_forever (bool): Whether to loop the video indefinitely. Default is False.
Capabilities
Capabilities: not setInstallation
Install the published package using pip or uv.
pip install sinapsis-data-readers==1.0.0uv pip install sinapsis-data-readers==1.0.0uv add sinapsis-data-readers==1.0.0Configuration
Effective fields from the inspector schema, including nested Pydantic model fields.
Device to be used for loading the video. Default is "cpu".
Optional
Default: "cpu"
Optional
Default: null
Optional
Default: null
Number of frames in the batch. Default is 1.
Optional
Default: 1
Whether to loop the video indefinitely. Default is False.
Optional
Default: false
Source of the video. Default is a UUID string.
Optional
Default: "836c104a-f9c8-4ee5-865c-e96f413a0b21"
Path or list of paths to the video(s).
Required
Default: null
Configuration example
Generated from documented defaults. Replace any placeholders and complete required nested settings before running.
templates:
- template_name: "LiveVideoReaderCV2"
class_name: "LiveVideoReaderCV2"
attributes:
device: "cpu"
root_dir: null
batch_size: 1
loop_forever: false
video_source: "836c104a-f9c8-4ee5-865c-e96f413a0b21"
video_file_path: "<required>"
Inheritance
sinapsis_data_readers.templates.video_readers.video_reader_cv2.LiveVideoReaderCV2Environment variables
Environment definitions belong to their canonical Python modules.
No directly related environment variables listed.