How does a sub stream work?
A camera or recorder channel encodes the same picture twice. The main stream is the full version, at the camera's top resolution and a high bitrate, and it is what gets recorded to the hard disk. The sub stream is a smaller copy, often around standard definition, with a lower frame rate and a fraction of the bitrate.
Bitrate is the amount of data the stream sends each second, and it is the number that decides how much of a connection the video uses. Both streams run at the same time and each has its own settings for resolution, frame rate and bitrate. Changing the sub stream doesn't touch the quality of the recording.
What do the sub stream settings look like on a recorder?
They sit on the video or encoding page of the recorder's or camera's menu. You pick a camera, then a stream type from a short list, main stream or sub stream, and the same handful of fields appears for each: resolution, frame rate, bitrate and the kind of compression, H.264 or H.265.
A typical pair of settings shows the gap between them. The main stream might read 1920 by 1080, 25 frames a second, 4096 kilobits a second. The sub stream for the same camera might read 640 by 360, 15 frames a second, 512 kilobits a second. On some firmware the sub stream also has a tick box that switches it on or off.
How much bandwidth does a sub stream save?
With the settings above, the sub stream uses one eighth of the main stream's data. For a single camera the difference is small. For a site it decides whether remote viewing works at all.
Take eight cameras. Sent as main streams they need about 32 megabits a second of upload from the site. Sent as sub streams they need about 4. Many internet lines upload far more slowly than they download, so the first figure is out of reach for a lot of premises while the second fits comfortably. That is why every phone app opens the sub stream first.
Where does a CCTV owner meet the sub stream?
You meet it whenever video has to travel somewhere tight. The phone app shows the sub stream by default, often labelled SD, fluent or basic, with the main stream as HD or clear. The recorder's own screen uses the sub stream for the 9 or 16 camera grid and switches to the main stream when you open one camera full screen.
It also appears in the RTSP address. On Hikvision firmware the path ends in 101 for channel 1's main stream and 102 for its sub stream. On Dahua firmware the address carries subtype=0 for main and subtype=1 for sub. Uniview uses s0 and s1 in the path, and TP-Link cameras use stream1 and stream2. The guide to finding your RTSP URL lists the patterns for other brands.
What is the sub stream confused with?
Three things, mostly. The first is recording quality. Lowering the sub stream doesn't make recordings worse, and raising it doesn't make them better, because the recorder saves the main stream.
The second is a third stream. Some cameras offer one more, even smaller or freely configurable, for a specific use. It is separate from the sub stream and usually off. The third is a slow connection itself. A sub stream that stutters on a phone is often set too high for the site's upload speed, not too low; dropping its bitrate or frame rate steadies it.
What are the common sub stream problems and how do you recognise them?
Sub stream faults are mild, but they are easy to mistake for a bad camera.
- Faces and distant figures are a blur on the phone: the stream is small by design. Open that camera alone and switch to HD.
- The main stream address opens and the sub stream address doesn't: the sub stream is switched off for that channel, or the path is wrong for that brand.
- Movement looks jerky: the frame rate is set very low. Around 10 to 15 frames a second is enough for viewing.
- A player shows a grey or broken picture on one stream only: that stream uses a compression mode the player can't read. Setting it to plain H.264 usually fixes it.
- The grid on the phone keeps buffering: all the sub streams together exceed the upload speed. Lower the bitrate on each.
What should you ask an installer about the sub stream?
Ask what resolution, frame rate and bitrate the sub stream is set to on each camera, and what the site's upload speed is. The two should be chosen together: the sub streams of all cameras added up should sit well inside the upload speed.
Ask that the sub stream is left switched on for every channel, and that it uses standard H.264 or H.265 compression. Installers sometimes switch sub streams off to save effort, and viewing from outside then has only the heavy main stream to fall back on.
Which stream matters for alerts from your cameras?
For detection, what matters is whether a person is clear in the picture, not which stream it came from. A person far from the camera can shrink to a few pixels on a small sub stream, while one near a doorway is plain on either. GoKavach's Hikvision and Prama presets build the main stream address, and its Dahua, CP Plus, Honeywell, Uniview, Ezviz and TP-Link presets build the sub stream address; if you paste your own URL, it reads whichever stream that address names.
For watching live, the smaller stream is often the better choice on a slow site connection. On Hikvision, Prama, Dahua, CP Plus, most Honeywell, Uniview, Ezviz and TP-Link devices, GoKavach's live view has an HD and SD switch that moves between the two. Whichever is used, person detection still needs the areas drawn where people walk, as the guide to setting up detection zones explains.