> ## 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.

# Find your camera's RTSP URL

> Find the RTSP address for a camera, check that it works, and fix the usual problems before you connect it to TruRec AI.

An RTSP URL is the address of a camera's live video. Most IP cameras have one. It's usually in the camera's settings or its manual. On SaaS, it's the basis of each camera's [camera link](https://docs.trurec.ai/getting-started/camera-links.md): the same path, with your site's internet address and a forwarded port in place of the camera's address on your network.

> [!NOTE]
>
> **On Enterprise:** if TruRec AI runs in your own environment, our team gathers camera addresses and logins with you during setup.

## What an RTSP URL looks like

```text theme={null}
rtsp://192.168.1.64:554/Streaming/Channels/102
```

| Part | Example | What it is |
| - | - | - |
| Address | `192.168.1.64` | The camera's IP address or hostname on your network. |
| Port | `554` | The RTSP port. 554 is the usual default. |
| Path | `/Streaming/Channels/102` | Which stream to read. This varies by brand and model. |

Most cameras also need a username and password. On SaaS, they go in the camera link, as `rtsp://username:password@…`. See [What a camera link is](https://docs.trurec.ai/getting-started/camera-links.md#what-a-camera-link-is). Don't email them to us.

## Check the video format

TruRec AI supports cameras that send **H.264** or **H.265** video. You'll find the format on the camera's video or encoder settings page, often labelled "video encoding" or "codec". When you test a camera link, the result usually shows the format too.

## Where to find it

1. **The camera's settings page.** Type the camera's IP address into a browser on the same network, sign in, and look under network, streaming or RTSP settings.
2. **The camera's manual,** or the manufacturer's website. Search for your model number and "RTSP".
3. **Your recorder.** If your cameras record to an NVR or VMS, you can often take the video from the recorder instead. See [Connect an NVR](https://docs.trurec.ai/getting-started/connect-an-nvr.md) or [Connect a VMS](https://docs.trurec.ai/getting-started/connect-a-vms.md).

![Placeholder for a screenshot of a camera's streaming settings](https://mintcdn.com/trurec-ai-public-docs/5I91lj0e8JsZnCM3/images/placeholder.svg?fit=max\&auto=format\&n=5I91lj0e8JsZnCM3\&q=85\&s=ab7b9c66a12cea27470d5c7c85bcc66c)

Image to come: a generic camera settings page, with the RTSP or streaming section highlighted.

### Main stream or sub-stream?

Many cameras offer two streams: a high-quality main stream and a lower-quality sub-stream. You choose which one to use for each camera.

* **The sub-stream** uses less of your site's upload bandwidth. TruRec AI reads each camera's video as it is, so a smaller stream means less to upload. See [Bandwidth](https://docs.trurec.ai/networking/ports-and-firewalls.md#bandwidth).
* **The main stream** gives better detection of people far away or small in the picture, and sharper clips.

You can use the main stream on some cameras and the sub-stream on others.

Each stream usually has its own path. For example, many Hikvision cameras use `/Streaming/Channels/101` for the main stream and `/Streaming/Channels/102` for the sub-stream, and many Dahua cameras use `subtype=0` and `subtype=1` in the URL. Check your camera's manual for yours.

## Test it before you connect

On SaaS, TruRec AI tests each camera link from our cloud when you choose **Test connection**, the same way it will read the video. The result says whether it worked, and why if it didn't. See [If a link fails the test](https://docs.trurec.ai/getting-started/camera-links.md#if-a-link-fails-the-test).

To check the path first, you can play the camera's RTSP URL on a computer on the same network as the camera:

1. Install [VLC](https://www.videolan.org/vlc/) on that computer.
2. Choose **Media** > **Open Network Stream**.
3. Paste the RTSP URL and choose **Play**. Enter the camera's login if VLC asks for one.

If it plays there but the test in TruRec AI can't reach it, the path and login are right, and the problem is the port forward or your site's internet address.

## Common problems

| Problem | What to try |
| - | - |
| Nothing plays | Check the path for your model. Also check RTSP is turned on in the camera's settings. |
| It asks for a login again and again | Check the username and password. A read-only viewer account is enough. |
| It plays in VLC, but the test in TruRec AI can't reach it | Check the port is forwarded on your router to the camera's RTSP port, and that the link uses your site's internet address. See [Connect a camera with a camera link](https://docs.trurec.ai/getting-started/camera-links.md). |
| It worked when you added it, but the camera now shows **Camera disconnected** | See [Camera health](https://docs.trurec.ai/streams/camera-health.md). |
| It worked, then stopped | Some cameras only allow a few video connections at once. Close other viewers, or take the video from the recorder. |
| The camera's address keeps changing | Give the camera a fixed IP address, or reserve one for it on your router, so the port forward keeps pointing at it. If your site's internet address changes, ask your provider for a fixed one, or use a dynamic DNS name. |


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