Camera IP
This function block reads RTSP/HTTP camera streams in a background thread and keeps the latest frame ready with minimal CPU overhead. It is designed for live monitoring and for feeding image processing blocks reliably even when network interruptions occur.
π₯ Inputs
This function block does not have any inputs.
π€ Outputs
Image Current frame retrieved from the configured IP camera.
πΉοΈ Controls
Status β Displays the current connection state (examples: Waiting for camera link, Connecting..., Live, Reconnecting...).
Camera link β Paste the full RTSP/HTTP link for your camera (for example rtsp://camera-ip/stream).
Username β Optional camera username when authentication is required.
Password β Optional camera password when authentication is required.
(hint) After editing the camera link or credentials the block waits a short moment before reconnecting so you can finish typing.
π― Key Features
Background threaded reader that keeps the latest frame available for downstream blocks while using minimal CPU.
Supports RTSP and HTTP camera links, with optional username/password authentication.
Automatic status updates to indicate connection progress and issues.
Automatic reconnect with increasing retry delays on failures.
Keeps the last successful frame available while reconnect attempts are ongoing.
Optional background frame uploader (when configured) to forward frames to a remote service.
βοΈ How it runs
Provide a valid camera link in the
Camera linkcontrol (and credentials if needed).The block will attempt to connect in the background and update the
Statuscontrol.Once connected the block continuously keeps the most recent frame ready on the
Imageoutput for other blocks to consume.On connection problems the block shows status messages and performs automatic retry attempts; the most recent good frame remains available until a new one is received.
π Usage Instructions
Enter the camera URL in
Camera link.If the camera requires authentication, fill
UsernameandPassword.Wait until
Statusshows a live/connected state.Connect the
Imageoutput to downstream processing or visualization blocks.
Suggested downstream blocks:
Use
Show Imageto preview frames in a viewer.Use
Image ResizerorImage Resizeif you need to reduce frame size before processing.Use
Record VideoorImage Loggerto save frames or recordings.Feed into AI/analysis blocks such as
Object Detection,Object Detection - Custom,Pose Estimation, orMask Detectionfor live inference.Use
Image ROI Select/Image ROI Polygon/Image ROI Polygon Multito crop or limit processing area before detection.Use
Background Removal (RMBG-1.4)orBackground Removal (BiRefNet)if you need foreground extraction.Combine with
Object_Detection_Trackerto maintain identities across frames.
π‘ Tips and Tricks
If your camera supports ONVIF and you prefer occasional snapshots instead of a stream, try
Camera IP (ONVIF).For faster processing pipelines, resolution in the Camera settings.
To debug connectivity, verify the same URL in an external player (e.g., VLC) and confirm credentials.
Use
Show Imageto verify the frame content before routing it into detection or logging blocks.When recording long sessions, prefer
Record Videoto avoid filling disk with many individual images; useImage Loggerfor selective frame saving.If you need to analyze only parts of the scene, crop with
Image ROI Selector define polygons withImage ROI Polygon Multito reduce false detections and speed up processing.Combine with
Object Detection(orObject Detection - Custom) and then withObject_Detection_Trackerfor monitored tracking and counting applications (for example feeding results intoTraffic Intersection Analysis).
π οΈ Troubleshooting
No connection / status stuck on waiting: Verify the camera URL is correct and reachable on the network. Try the stream in an external player.
Authentication errors: Double-check
UsernameandPasswordand reenter them.Intermittent frames or reconnects: This can be caused by network instability or camera-side issues; the block will retry automatically. Consider connecting a more stable network or using a local recording if needed.
Blank or unsupported frames: Use
Show Imageto inspect the output. If the viewer reports unsupported data, try a different stream format or use the camera vendorβs recommended URL.High CPU usage: If downstream processing is heavy, lower the resolution with
Image Resizeror process frames at a lower rate by inserting throttling logic (for example a custom flow control).
If you need a different camera interface (USB, specialized camera drivers, or ONVIF snapshots), check the corresponding image input blocks such as Camera USB or Camera IP (ONVIF) to match your hardware and workflow.
Last updated
Was this helpful?