Skip to main content

RTSP streams

EverNVR can serve each camera's video over RTSP to another system on the site network, such as a building controller, a video decoder, a video wall or a media player. The recorder serves the video it already receives, so a reader uses no camera connection. This matters for cameras that accept only two or three connections at once. RTSP is off until an administrator turns it on.

The video is the camera's own stream. The recorder does not re-encode it, so readers get the camera's resolution, frame rate and codec.

Turn it on​

An administrator opens Settings → RTSP streams, checks Serve camera streams over RTSP, and saves. The status line shows Running, or the reason the server could not start, such as a port already used by another program.

FieldDefaultNotes
RTSP port8554Plain RTSP
RTSPS port8322RTSP over TLS, with the same certificate as the recorder's web pages. Not available while the recorder serves plain HTTP

Either port can be any from 1024 to 65535 other than the recorder's web port. Open both TCP ports in the host firewall for the systems that will read the streams. RTSP is served over TCP only.

Stream addresses​

Each camera has up to two streams:

AddressStream
rtsps://<recorder>:8322/cameras/<id>/mainWhat the camera records: its main, full-resolution stream
rtsps://<recorder>:8322/cameras/<id>/subThe smaller stream the recorder runs detection on

A camera that records from a single stream has only main. A camera set to detection only has only sub. With plain RTSP, use rtsp:// and the RTSP port.

Settings → RTSP streams lists every camera's addresses, with the codec and resolution of each stream. Integrations get the same information from GET /api/cameras, in each camera's restream field (see the API reference).

Sign in with an API token​

Readers sign in with an API token as the RTSP password. The user name can be anything:

rtsps://reader:evk_...@192.168.1.20:8322/cameras/2/main

A token can read the cameras its account can see, and no others. Account passwords are not accepted. When a token is revoked or expires, or its account loses access to a camera, the recorder ends that token's open streams within a few seconds.

Use RTSPS where you can. Plain RTSP sends the token unencrypted, so anyone who can watch the network traffic can copy it.

What is not served​

  • Cameras with privacy masks. RTSP carries the camera's picture without the masks, so the recorder does not offer these cameras. Integrations can use the masked stream.mjpg instead.
  • Readers outside the site network. Only private, loopback and link-local addresses are served. Remote access through evernvr.com does not carry RTSP.
  • Audio. The streams are video only.

How it works​

When a system first asks for a stream, the recorder starts sending its copy of that stream to the RTSP server, beginning at the next keyframe. This usually takes one to three seconds. When the last reader disconnects, the copy stops ten seconds later. Recording and detection never depend on it. A reader that falls behind is disconnected instead of slowing anything down, and can reconnect.

The RTSP server is MediaMTX, which ships with the recorder.