00:00:00/Guide
Main stream vs sub stream: which should you use?
The main stream is the full-resolution, full-framerate version of a camera's view, the one your recorder stores; the sub stream is a lighter copy of the same view, at lower resolution and bitrate, meant for multi-camera grids and remote viewing. Every serious IP camera or NVR publishes both, and the right choice depends on whether the thing at the other end actually needs full detail.
The reason two streams exist is bandwidth arithmetic. A nine-camera wall showing full HD from every camera would need nine full HD streams delivered at once, to a screen that's giving each camera a ninth of the pixels anyway. So the camera encodes its view twice: once properly, for recording and full-screen viewing, and once small, for grids and for phone apps on hotel wifi. Same lens, same moment, two encodings. Some cameras add a third stream on the same logic, but the pattern doesn't change.
Where the two streams show up
You'll meet them anywhere you configure a camera. In the encode settings they're listed as main stream and sub stream, each with its own resolution, framerate and bitrate. In RTSP URLs they're an address parameter: Dahua-style URLs use subtype=0 for the main stream and subtype=1 for the sub stream, and Hikvision-style paths end /101 for channel 1's main stream and /102 for its sub stream. The brand guides for Hikvision and Dahua walk through building and testing those URLs.
Which one should you use?
- Recording: the main stream. It's what NVRs store by default, and the whole point of recording is having the detail later. Some recorders also keep a sub-stream copy so remote playback scrubs smoothly.
- Live grids and phone apps: the sub stream. Nobody can see 1080p of detail in a tile the size of a playing card, and viewing apps usually pick the sub stream for grids on their own.
- Full-screen live viewing: the main stream, if the network between you and the camera can carry it.
Which stream to give an AI system
Usually the sub stream, and it's worth seeing why. A system like Svid doesn't drink the whole stream; it samples frames at a watch level. Precise takes a frame every second at 1080p, Standard takes one every 5 seconds at 720p (the default), and Economy one every 15 seconds at 480p, all motion-gated, so frames that barely differ from the last kept one get no AI calls at all.
Set against those numbers, the sub stream is often plenty. A sub stream running at 720p loses Standard nothing, and even a 480p one fully feeds Economy. The main stream earns its bandwidth when you want Precise, which samples at 1080p, or when the detail you care about is small in the frame; a camera covering a wide yard is a different problem from one over a till. Do check what your sub stream is actually set to before deciding, because plenty ship capped well below 720p (D1 or VGA is common), and raising it in the encode settings is often all the fix you need.
- 01
Open the encode settings
Sign into the camera's or NVR's web interface and find the video or encode page. Both streams are listed there with their resolution, framerate and bitrate.
- 02
Note what each stream can do
Sub streams often default to something small like D1 or VGA. If yours can be raised to 720p without upsetting the network, that's usually worth doing.
- 03
Build both RTSP URLs
Use your brand's pattern: subtype=0 or subtype=1 on Dahua-style kit, /101 or /102 on Hikvision-style paths. The channel number stays the same; only the stream part changes.
- 04
Test them in VLC
Open each URL as a network stream and look at the picture. You're confirming the resolution is what the settings claim, and that the sub stream isn't set to something unusably small.
- 05
Match the stream to the job
Grids and remote viewing take the sub stream; recording takes the main stream. For AI watching, start with the sub stream at Standard or Economy, and move a camera to the main stream if it turns out to need Precise detail.
- What is the sub stream on an IP camera?
- A second, lighter encoding of the same camera view, at lower resolution and bitrate, published alongside the full-quality main stream. It exists so multi-camera grids and remote viewers don't each need a full HD stream per camera.
- Does the sub stream get recorded?
- Recorders store the main stream by default; that's the copy with the detail in it. Some can record the sub stream alongside so remote playback stays smooth on thin connections, but the main stream is where your evidence comes from.
- Is the sub stream good enough for AI video analysis?
- Often, yes. Svid samples frames rather than consuming the whole stream, and its Standard and Economy watch levels work at 720p and 480p, resolutions a decent sub stream can supply. Use the main stream when you want Precise (1080p, a frame every second) or when the detail that matters is small in the frame.
- How much bandwidth does each stream use?
- Typically a large multiple apart. A 1080p main stream commonly runs a few megabits a second, while a sub stream runs a few hundred kilobits, which is why a nine-camera grid over the internet only really works on sub streams. The exact numbers are whatever your encode settings say.
Point Svid at either stream
Create an account at app.svid.ai and paste the RTSP URL, main stream or sub stream. It's captured server-side and becomes searchable, checkable footage either way.
Related footage
Guide
How to connect RTSP cameras to AI
If your camera or recorder exposes an RTSP stream, you can point AI at it directly. Svid reads the feed as-is, captured server-side, with no new hardware to install.
Guide
How to find the RTSP URL for a Hikvision camera
Hikvision cameras and NVRs expose RTSP at a predictable Streaming/Channels URL on port 554, once you've confirmed it in the device's own network settings.
Guide
How to find the RTSP URL for a Dahua camera
Dahua cameras and recorders publish RTSP at a realmonitor URL on port 554, on by default, confirmed in the device's own network settings page.