← BlogUse cases4 min read

By Pritika Bakshi, Principal Video Streaming Engineer, creekX.io

On this page

How many people can watch one IP camera at once?

A zoo puts its new penguin camera on the home page. The local news picks it up, a few hundred people open the page at once, and the camera stops answering. IP cameras are built for a recorder and a couple of staff, not an audience. The fix is to put a streaming server between the camera and the public.

Camera: One connection; Server: Copies per viewer; Viewers: Hundreds at once
  1. CameraOne connection
  2. ServerCopies per viewer
  3. ViewersHundreds at once
Concept diagram, not a performance chart.

How a server changes it

The server pulls the camera once, over RTSP on your own network, and makes a copy for every viewer. The camera only ever has one connection, however many people watch. It also means the camera never faces the internet, which matters because cameras often run old firmware. See streaming IP cameras to a website without a cloud subscription.

What we measured

On a 16-core cloud server, one 720p stream at 2.5 Mbit/s, each step held for a minute:

Viewers WebRTC Low-latency HLS
50 all connected, 2.8% CPU all connected, 1.9% CPU
100 all connected, 5.2% CPU all connected, 3.4% CPU
300 all connected, 10.6% CPU all connected, 8.0% CPU

No viewer stalled. One caution: at 300 viewers the data actually delivered was below what 300 full-rate viewers need, so the test machine's own network was likely the ceiling. Read 300 as "connected without trouble", not as the server's limit. We also ran 500, but there the delivered data fell further short, so we don't quote it.

What really limits it

The internet connection. Every viewer takes the full bitrate: 300 viewers at 2.5 Mbit/s is 750 Mbit/s. On a 4-core server with about 890 Mbit/s of upload we planned for about 150 viewers at 1080p. For bigger audiences, put low-latency HLS behind a CDN: see HLS behind a CDN. For many cameras rather than many viewers, see creekX Cameras, sold separately; one server held 150 cameras using 0.72 of a core with recording off.

Frequently asked questions

How many people can watch an IP camera at the same time?

Connected directly, only a few. Through a streaming server that pulls the camera once, our tests held 300 viewers of one 720p stream with no stalls. Beyond that, the network connection sets the limit.

Will lots of viewers slow down the camera?

Not with a server in between. The server pulls the camera once and makes copies for every viewer, so the camera only ever has one connection.

Follow the build