Connect a camera by RTMPS push
Add a push camera, copy its server, stream name and stream key into the camera, encoder or recorder, set up the secondary stream for analytics, and rotate the key when you need to.
Contents
With RTMPS push, a camera, encoder or recorder sends its video to Kalytera Cloud. The site needs only outbound connections, and each camera has its own stream key. An administrator adds the camera in the portal; the installer enters the values in the device. Keep the portal and the device's settings page open side by side while you work.
Before you start
- The device must be able to publish H.264 video over RTMPS, the encrypted form of RTMP. The server address the portal shows uses RTMPS.
- The site's firewall must allow outbound connections to the host and port in that server address. Nothing inbound is opened.
- Plain, unencrypted RTMP exposes the video and the stream key on the network. It is only for devices that cannot do RTMPS; ask Kalytera before you use it.
Treat a stream key like a password: anyone who has it can publish video as that camera. Never put it in email, support requests, chat or screenshots.
Add the camera
- Open Cameras and select Add camera.
- Choose the Site, check that Connection type is RTMP (the default), and enter a Name.
- Choose the Recording mode under Initial recording, then select Add camera.
The next page shows the values for the Main stream publisher:
| Value | Looks like |
|---|---|
| RTMP/RTMPS server | rtmps://<ingest-host>:<port>/live |
| Stream name or publish path | <publish-code> |
| Keyless publisher endpoint | The server and stream name together, without the key |
| Main stream key | <stream-key> |
Copy the exact values from your portal; the examples above are not real addresses. The page also shows a Secondary stream publisher with its own key, described below.
The page can be reloaded for up to 15 minutes. Select I have copied the credentials when you are done; after that, the keys cannot be shown again.
Encoder settings
- Main stream: H.264, with a keyframe about every second. Recording and alarm clips always use this stream. Audio is ignored.
- Secondary stream: optional. Analytics rules run only on it, so set it up if the camera needs analytics. Send H.264 at no more than 25 fps, 3840 × 2160 and 20 Mbps. It does not create a second recording, and recording never switches to it. If it stops once analytics uses it, analytics pauses until it returns.
Enter the values in the device
Devices ask for these values in one of three ways:
| The device has | Enter |
|---|---|
| Separate server, stream name (or path) and key fields | The three matching values from the portal. |
| One address field that accepts a query string | The keyless publisher endpoint, then ?key= followed by the key. |
| One address field without query string support | The keyless publisher endpoint, then / followed by the key. |
Save the setting on the device. When the stream arrives, the camera shows Streaming under Cameras, and live video starts in Monitor.
Show the publisher values again
Open the camera's Connection tab and expand Advanced publisher setup. Show main endpoint shows the Keyless publisher endpoint and the Stream name or publish path again, in Publisher settings at the top of the page. For a device with a separate server field, the server is the keyless endpoint without the final / and stream name. Show secondary endpoint does the same for the secondary stream. The key stays hidden: it is shown only when it is created or rotated.
Rotate the stream key
Rotate the key if someone else may have seen it, or when you replace the device. Only an enabled camera's key can be rotated.
- In Advanced publisher setup, select Rotate main key, then Rotate.
- Copy the new key from the publisher-credentials page. It can be reloaded for 15 minutes, until you select I have copied the credentials; after confirmation or expiry, rotate again if you lost it.
- Enter the new key in the device.
The old key stops working at once, so the device stays offline until it has the new key. The stream name does not change. Rotate secondary key does the same for the secondary stream.
If the camera does not connect
- Check that the camera is enabled. A disabled camera refuses its stream, and the portal shows no error for a refused stream.
- Check that the server, stream name and key were copied without extra spaces.
- Check that the device uses RTMPS, and that the site's firewall allows the outbound connection to the server's port.
- If the key may be wrong, rotate it and enter the new one.
See also Connect cameras.