Imported from luxonis/oak-examples (
tutorials/camera-demo/AGENTS.md). Install upstream withnpx skills add luxonis/oak-examples --skill camera-demo. Copyright stays with the author.
AGENTS.md
Summary
This is the repository reference for the simplest multi-sensor camera preview tutorial. Use it when you need a baseline that publishes every connected camera stream with minimal processing.
Use This Example When
- You need a minimal camera-preview tutorial.
- You want to see every connected camera sensor on one device.
- You need a simple encoded-stream reference without inference.
Do Not Use This Example When
- You need stereo depth rather than raw camera previews.
- You need per-sensor custom resolutions or per-sensor logic.
- You need host-side OpenCV processing instead of Visualizer topics.
Quick Facts
Category:tutorials/camera-demoShape:script+standalone-servicePrimary task:stream every connected camera sensor to the VisualizerEntrypoint:main.pyStandalone path:backend-run.sh and oakapp.tomlFrontend:noneRuns on:RVC2 peripheral, RVC4 peripheral, and RVC4 standalone packagingRequires:at least one connected camera sensorInput:all connected device sensors discovered at runtimeOutput:one Visualizer topic per sensor socket nameModels:noneVisualizer / UI:DepthAI Visualizer viadai.RemoteConnection
Read First
Architecture
- main.py enumerates
device.getConnectedCameraFeatures()and creates onedai.node.Cameraper sensor. - Each sensor output is capped at
1920x1080if the native resolution is larger. - Every stream is encoded as
H264_MAINbefore being sent to the Visualizer. - Topic names are the raw socket names such as
CAM_A,CAM_B, andCAM_C.
Constraints
- This tutorial always publishes all discovered sensors; there is no CLI to select a subset.
- High-resolution sensors are intentionally limited to
1080pin main.py. - The output is optimized for Visualizer preview, not for file recording or custom host processing.
Related Examples
- tutorials/camera-depth: use this when you need stereo depth instead of plain previews
- tutorials/play-encoded-stream: use this when you want to focus on encoded video playback paths
- streaming/on-device-encoding: use this when you need encoded recording rather than live preview topics
Validation
Run:python3 main.pySuccess looks like:the Visualizer shows one topic per connected sensor and all streams respond toqCommon failure meaning:the device has no usable camera sensors, the user expects onlyCAM_A, or the encoded preview path is mistaken for a raw host-processing example