> ## Documentation Index
> Fetch the complete documentation index at: https://docs.trurec.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect a VMS

> Take your camera streams from your video management system (VMS), by adding a camera link for each camera.

If you manage your cameras through a video management system (VMS), you can usually take each camera's video from the VMS. On SaaS, you add a camera link for each camera, and TruRec AI reads each stream from the VMS over the internet.

> [!NOTE]
>
> **On Enterprise:** we plan VMS connections with you as part of setup, including any integration your VMS needs. If TruRec AI runs in your own environment, it reads your VMS on your own network, so you don't forward any ports.

## Before you start

You'll need:

* **The VMS server's address,** as an IP address or hostname.
* **A read-only login for the VMS.** A viewer account is ideal. See [Create a read-only VMS user](https://docs.trurec.ai/getting-started/read-only-vms-user.md).
* **On SaaS, access to your router,** or someone who looks after your network, to forward a port to the VMS server's RTSP port. See [Ports and firewalls](https://docs.trurec.ai/networking/ports-and-firewalls.md).

## Get RTSP URLs from your VMS

Most VMS platforms can re-stream their cameras over RTSP, so each camera gets an RTSP URL on the VMS server. Your VMS's documentation will say how to turn this on and where to find each camera's URL.

Check the video is H.264 or H.265. If your VMS can't re-stream, take the video straight from each camera instead. See [Find your camera's RTSP URL](https://docs.trurec.ai/getting-started/rtsp-urls.md).

If the VMS offers a main stream and a sub-stream, you choose which to use for each camera. The sub-stream uses less upload bandwidth. The main stream gives better detection of people far away or small in the picture, and sharper clips. See [Main stream or sub-stream?](https://docs.trurec.ai/getting-started/rtsp-urls.md#main-stream-or-sub-stream).

## Add the cameras as camera links

On SaaS, TruRec AI can't read the list of cameras from a VMS yet. Add a camera link for each VMS camera you want to watch instead:

1. On your router, forward a port to the VMS server's RTSP port.
2. Build a link for each camera: your site's internet address, the forwarded port and that camera's path on the VMS, with the VMS login. For an address taken straight from a camera, use the camera's own login and port forward.
3. In TruRec AI, on the **Cameras** step, choose **I'll add cameras individually**, paste the links, one per line, and choose **Test connection**.
4. Give each working camera a clear name, and connect it.

See [Connect a camera with a camera link](https://docs.trurec.ai/getting-started/camera-links.md) for each step.

![The Streams page listing four cameras, front-door, loading-bay-2, back-door and yard, each with a green Healthy status.](https://mintcdn.com/trurec-ai-public-docs/9VQKp94LpB0n4hkt/images/streams/cameras-receiving-video.png?fit=max\&auto=format\&n=9VQKp94LpB0n4hkt\&q=85\&s=9a7f1bbf63cbd2b64e8b26ccb578b225)

The Streams page with four cameras added, each Healthy. A camera from a VMS looks the same as any other.

## Check the cameras

Each camera shows **Receiving video** during setup, and **Healthy** on the Streams page, once its video arrives. If one doesn't, see [Camera health](https://docs.trurec.ai/streams/camera-health.md).

## Tips

* **Check your VMS licence.** Some VMS platforms count each re-streamed connection as a client.
* **Keep the login read-only.** TruRec AI never needs to control cameras or change VMS settings.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.