Format of Video Sources (Cameras)
Video Sources (a.k.a "cameras") are defined in the visionnode.ini file under the [camera] header.
[camera]
id=orbecc
type=usb-orbecc
name=Orbecc 3D Camera
resolution=640x480
...
Note: Multiple cameras can be defined in the .ini as [camera:0], [camera:1] sections after the base [camera] section, though multicamera support is still experimental.
A [camera] definition section can split into:
- Base Definition
- Frame properties and Transforms
- Camera specific properties
Base Definition
id: Short id for the camera.name: Descriptive name for the camera (user facing).type: Driver the camera uses.opencv-ntuses OpenCV2 VideoCaptureOpenCV.pyavuses PyAV (FFmpeg bindings) — recommended for RTSP/HTTP network cameras when OpenCV decoding shows undecoded macroblocks. See PyAV Driver.picamerauses VideoCaptureRaspberry.usb-realsensefor Intel Realsense, uses VideoCaptureRealSense, requires pyrealsense2.usb-orbbecfor Orbbec Astra, uses VideoCaptureOrbbec, requires OpenNI2.usb-k4afor Kinect 4, requires the Kinekt SDK (experimental).
calibration: Optional pointer to a.jsonfile containing camera calibration parameters.
Capture Properties
resolution: In the form Width x Height, with no spaces: e.g. 640x480.- If the device supports capturing in this resolution, it will be set so. If not, frames will be rescaled to match.
fps: Frames per second, a decimal number, e.g. 15 or 24.5.- For higher framerates see
fourccsetting in OpenCV Driver rate_limit_fps: Rate limiting by discarding captured frames, useful if the device doesn't support a lower framerate.
Frame Transforms
rotation: One ofnone,90,180or-90degrees.flip: One ofnone,horizontal,verticalorbothaxis.clipping: A comma-separated coordinate values list ofx,y,w,hdefining a clipping frame (resulting frames will bew x hsized).
OpenCV/OpenCV-nt Driver
backend: String of the formCAP_XXXXX.- Default is
CAP_ANY(0). - Others:
CAP_FFMPEG,CAP_GSTREAMER,CAP_OPENNI2...
- Default is
index: For webcams, an integer index for the camera.fourcc: If the camera can offer video over MJPEG with a higher framerate, you can set toMJPGto select this framerate.url: For network cameras, video files, etc:http://...orrtsp://...URLs- A file path (e.g.
/home/user/movie.mp4)
buffer: Number of frames for OpenCV to buffer (might cause lag).rtsp_transport: Forrtsp://URLs, one ofnone,tcp,udp,http. Defaulttcp. TCP avoids the UDP packet loss that causes undecoded blocks at 1080p25; set tononeto leave FFmpeg's default.rtsp_buffer_size: FFmpeg socket buffer size in bytes (0= leave default).ffmpeg_threads: Force FFmpeg decoder thread count (0= auto).disable_hwaccel: Set totrueto disable OpenCV's hardware-accelerated decode (D3D11VA/DXVA2/NVDEC on Windows, VAAPI on Linux). Defaultfalse.use_wallclock_timestamps: Iftrue, ignore the camera's RTP timestamps and use the local wallclock instead. Use when a camera sends bad timestamps that cause playback glitches. Defaultfalse.fflags: Pass-through for FFmpeg'sfflagsoption, e.g.+genpts+discardcorrupt+igndts.allow_audio: Iffalse(default), only the RTSP video stream is negotiated; audio is skipped entirely. Reduces UDP socket pressure on bursty I-frames. Set totrueif you ever need the audio stream available.
PyAV Driver
Used when type=pyav. Decodes via FFmpeg bindings directly, exposing the knobs OpenCV's VideoCapture hides. Prefer this driver for RTSP cameras on Windows when the OpenCV pipeline produces glitched/undecoded regions, or when you need explicit hardware-accelerated decode control.
url: Same as the OpenCV driver —rtsp://,http://, or a file path.rtsp_transport: One ofnone,tcp,udp,http. Defaulttcp. Applied only tortsp://URLs.hwaccel: Hardware decoder type. Defaultauto.auto→d3d11vaon Windows,vaapion Linux,videotoolboxon macOS.- Explicit values:
d3d11va,dxva2,cuda,qsv,videotoolbox,vaapi,vdpau. nonefor pure software decode.
frame_time: Same semantics as the OpenCV driver: send timestamps derived from frame number / fps instead of wall-clock capture time.
The following are advanced tuning parameters, rarely needed:
stimeout_us: RTSP socket timeout in microseconds. Default5000000(5 s).0leaves FFmpeg's default.buffer_size: FFmpeg socket buffer size in bytes (0= leave default).max_delay_us: FFmpegmax_delayin microseconds — the RTP reorder window. Default500000(500 ms), matches the OpenCV driver's validated tuning.0reverts to FFmpeg's built-in default (~700 ms).thread_count: Decoder thread count (0= FFmpeg auto).thread_type:auto,slice, orframe.framemaximises throughput;sliceminimises latency.low_delay: SetAV_CODEC_FLAG_LOW_DELAYon the decoder. Lower latency, may hurt quality with B-frames.hwaccel_software_fallback: If HW decode init fails, fall back to software decode. Defaulttrue.use_wallclock_timestamps: Iftrue, ignore the camera's RTP timestamps and use the local wallclock instead. Use when a camera sends bad timestamps that cause playback glitches. Defaultfalse.fflags: Pass-through for FFmpeg'sfflagsoption, e.g.+genpts+discardcorrupt+igndts.allow_audio: Iffalse(default), only the RTSP video stream is negotiated; audio is skipped entirely. Reduces UDP socket pressure on bursty I-frames. Set totrueif you ever need the audio stream available.output_format:bgr24(default) orrgb24.
Example for a 1080p25 RTSP camera on Windows:
[camera]
id=hikvision-lobby
type=pyav
url=rtsp://user:pass@192.168.1.20:554/Streaming/Channels/101
rtsp_transport=tcp
hwaccel=d3d11va
resolution=1920x1080
fps=25
Advanced Settings values
Values starting with underscore _ are advanced settings that are not commonly edited by hand.
Other settings are:
- reported_screen_width_mm, reported_screen_height_mm: Default values for advanced settings to set the screen size.
- reported_max_resolution_width_px, reported_max_resolution_height_px: Maximum resolutions for the camera.
Calibration Files
Calibration json files contain intrinsic and extrinsic calibration data for the given camera, as used by opencv and related toolkits.
{
"sensor_size_mm": [ 3.6, 2.7 ],
"intrinsic": {
"width": 640,
"height": 480,
"matrix": [
[ 779.5962524414062, 0.0, 511.0530090332031, 0.0 ],
[ 0.0, 1008.8184204101562, 382.3992614746094, 0.0 ],
[ 0.0, 0.0, 1.0, 0.0 ],
[ 0.0, 0.0, 0.0, 1.0 ]
]
},
"extrinsic": {
"matrix": [
[ 0.9928808212280273, 0.09882735460996628, -0.06648891419172287, -0.19881358742713928 ],
[ -0.06223934516310692, 0.9063953757286072, 0.41782012581825256, -0.9262909889221191 ],
[ 0.10155729949474335, -0.41070738434791565, 0.9060935974121094, 36.0 ],
[ 0.0, 0.0, 0.0, 1.0 ]
]
}
}