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 link control (and credentials if needed).

  • The block will attempt to connect in the background and update the Status control.

  • Once connected the block continuously keeps the most recent frame ready on the Image output 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

  1. Enter the camera URL in Camera link.

  2. If the camera requires authentication, fill Username and Password.

  3. Wait until Status shows a live/connected state.

  4. Connect the Image output to downstream processing or visualization blocks.

Suggested downstream blocks:

  • Use Show Image to preview frames in a viewer.

  • Use Image Resizer or Image Resize if you need to reduce frame size before processing.

  • Use Record Video or Image Logger to save frames or recordings.

  • Feed into AI/analysis blocks such as Object Detection, Object Detection - Custom, Pose Estimation, or Mask Detection for live inference.

  • Use Image ROI Select / Image ROI Polygon / Image ROI Polygon Multi to crop or limit processing area before detection.

  • Use Background Removal (RMBG-1.4) or Background Removal (BiRefNet) if you need foreground extraction.

  • Combine with Object_Detection_Tracker to 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 Image to verify the frame content before routing it into detection or logging blocks.

  • When recording long sessions, prefer Record Video to avoid filling disk with many individual images; use Image Logger for selective frame saving.

  • If you need to analyze only parts of the scene, crop with Image ROI Select or define polygons with Image ROI Polygon Multi to reduce false detections and speed up processing.

  • Combine with Object Detection (or Object Detection - Custom) and then with Object_Detection_Tracker for monitored tracking and counting applications (for example feeding results into Traffic 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 Username and Password and 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 Image to 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 Resizer or 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?