Atlas Knowledge Base
Dashboard
Camera Stream

Camera Stream


Camera Stream

The Camera Stream service connects SBN Media to IP cameras over RTSP. When a camera is opened, it connects to the camera, pulls its live video, and relays it into SBN Media so it can be viewed, recorded, and analysed.

Overview

Camera Stream is the device-stream service for RTSP cameras. It does not hold a fixed list of cameras - a camera is identified by its URL, and a stream is created on demand. When a client (for example SBN Video) opens a camera, SBN Media asks a Camera Stream instance to connect to that camera's RTSP address and relay its video to the client.

It is one of SBN Media's *device-stream* services, so it shares the on-demand creation, load-balancing, per-instance limits, and reconnect behaviour common to all of them - see Device Streams (SBN-Media/Devices/device-streams). This page covers only what is specific to cameras.

Camera Stream connects *out* to the camera, so there is no inbound port to open for it. Both plain rtsp:// and TLS-encrypted rtsps:// cameras are supported; the camera's username and password are carried in the URL.

  1. Runs: When configured. A deployment can run more than one to carry more cameras.
  2. Required: Required to view, record, or analyse RTSP camera video. Not needed in an audio-/alarm-only deployment.
  3. Depends on: NATS. Downstream services (the transmuxer for browser playback, and the analytics services) consume the stream it produces.

Configuration

Camera Stream has no settings of its own beyond the shared devicestream configuration described on the Device Streams page (SBN-Media/Devices/device-streams) - stream limits, timeouts, reconnect, and load-balancing all apply to it.

A camera is opened by its URL rather than configured here:

  1. rtsp://user:password@host:port/path - a standard RTSP camera.
  2. rtsps://user:password@host:port/path - a camera reached over TLS.

The one shared setting you are most likely to tune for cameras is the per-instance limit, keyed by the rtsp type:

devicestream:
# Accept up to 100 cameras on one instance; run more instances for more.
maxStreams:
rtsp: 100

After changing this in sbn-media.local.yaml, apply it with ./sbn-media config reload. See Device Streams for the full list of common settings and how capacity and scaling work.

FAQ

How do I add a camera?

You do not configure cameras on this service - a camera is opened by its URL (rtsp://user:password@host:port/path, or rtsps://... for an encrypted camera). When a client opens that URL, a Camera Stream instance connects and relays the video.

How many cameras can one instance handle?

Up to devicestream.maxStreams.rtsp if you set it, otherwise devicestream.defaultMaxStreams (1000). The practical number is lower and depends on the host's CPU and network and on the cameras' resolution and bitrate. Add instances to carry more - see Device Streams.

Does the camera traffic need a firewall opening?

Camera Stream connects out to the camera, so it needs to reach the camera's RTSP port - it does not listen for inbound connections itself. Use rtsps:// for cameras that support TLS.

Why does a camera not play in the browser?

Camera Stream only ingests the camera's video; converting it to a format a browser can play is done downstream by the transmuxer. If video reaches SBN Media but will not play in a browser, look at the transmuxer rather than Camera Stream.

Related pages

  1. SBN Media Overview (SBN-Media/overview)
  2. Device Streams (SBN-Media/Devices/device-streams)
  3. Installing and Configuring SBN Media (SBN-Media/installation)
  4. Watchdog (SBN-Media/Platform/watchdog)




Was this helpful?