Camera
The camera shows live video from an IP camera on the screen, next to the same equipment on the diagram: a gate, a tank, a conveyor, a switchgear room.
The video goes from the camera over RTSP (H.264) to the Scadora server, and from the server to operator clients and browsers. Only the server connects to the camera, with one connection for all viewers. This keeps the load off the camera and its network, and clients never receive the camera’s address, login or password.
How to connect a camera
- In the editor’s Connections section, add an “IP camera (RTSP)” connection.
- Enter the stream address (
rtsp://192.168.0.30:554/stream1, from the camera’s settings or manual), the login and the password. - Make sure the camera stream is H.264, the main codec of almost every camera. If it is H.265, switch it to H.264 in the camera’s settings; the second, lighter stream is enough for a screen.
- Place a Camera element on the screen and choose the connection in its “Camera” property.
A camera connection works like a controller connection. The server checks every 15 seconds that the camera answers, so the camera gets a connection system tag, a “No communication” alarm and a row in the Diagnostics element.
How the video behaves
- Video flows only while someone watches the camera, and for 10 more seconds after the last viewer leaves, so moving between screens does not reconnect the camera.
- A new viewer immediately gets the frames from the last key frame, so the picture appears without waiting.
- If a client’s network cannot keep up, extra frames are skipped and the delay does not build up.
- If the connection drops, a message appears over the last frame and the client reconnects after a few seconds.
Decoding
- Operator client: Windows decodes the video (Media Foundation, included in Windows 7–11).
- Browser: the browser decodes it itself (WebCodecs: Chrome, Edge, Firefox 130+, Safari 16.4+).
No third-party codecs are needed.
Properties
Section titled “Properties”Besides the properties of every element — name, position, size, tooltip, rotation, transparency and the operate right:
| Property | Values | Default | Description |
|---|---|---|---|
Camera |
text | Camera. An “IP camera (RTSP)” connection from the Connections section | |
Stretch |
Uniform, UniformToFill, Fill |
Uniform |
Fit. Whole with margins, fill with cropping or stretch |
Caption |
text | Label. Text in the corner of the picture: camera or place name; empty — no caption | |
ShowTime |
true / false |
false |
Time on picture. The client’s time in the corner of the picture — shows the picture is live |
Background |
#RRGGBB |
#1E2328 |
Background |
From scripts
Section titled “From scripts”Item.Type = Camera. Any property is read and changed by name: Item.Background = "#D32F2F". The common element members (Visible, Enabled, Value, Raise, Apply…) are described in Elements from scripts.
Actions of this element:
| Member | Description |
|---|---|
Status |
State — empty while video plays, otherwise “Connecting…” or an error |
Paused |
Whether video is paused |
Pause() |
Stop receiving video — the picture freezes |
Resume() |
Resume receiving video |
Events
Section titled “Events”Mouse, hover, focus and keyboard — as for any element (see Events and functions).
Examples
Section titled “Examples”Show another camera, with “Gate” and “Warehouse” buttons above one view.
Screen.Items("Video").Camera = "Warehouse";Pause the video for a while, for example on a slow link.
var c = Screen.Items("Video");if (c.Paused) c.Resume(); else c.Pause();Report if the camera does not answer.
var status = Screen.Items("Video").Status;if (status != "") HMI.ShowMessage("Camera: " + status);