What is Dual Streaming?
Most IP cameras can provide multiple data streams, each at a different resolution and frame rate.
- Primary (High-resolution) streams provide better quality image display but require significant CPU and network bandwidth to view.
- Secondary (Low-resolution) streams require far less computing power than typical high-resolution streams but provide much lower image resolution, at a slower frame rate.
If a camera supports dual-streaming, Nx Witness requests two data streams (high‑resolution and low‑resolution) and uses them to save CPU and bandwidth usage.
Why is Dual Streaming important how does it work?
Server: the low resolution stream is used to do software motion detection and to preserve CPU and network . Both streams are recorded to archive unless a different behavior is specified (see below).
Client: the stream is selected automatically when viewing live or archive video:
- If bandwidth between client and server is insufficient, the client switches to display Lo-Res to save bandwidth.
- If CPU usage is too high (too many streams opened, or fast forward/rewind is used), the client switches to Lo-Res display until CPU usage is low enough to decode all the streams displayed in client.
If specific settings are applied, server may or may not archive Hi-Res or Lo-Res streams (see below).
Even though Nx Witness requests and tries to configure the Lo-Res stream at or near 640x360 resolution at 7fps, some cameras may not comply, usually for one of these reasons:
- do not support such settings, provide a Lo-Res stream with resolution higher than 640x360p
- do not provide a Lo-Res stream at all
- provide a Lo-res stream as Primary and Hi-Res stream as Secondary
In these cases the Nx Witness Server will perform motion detection on the available stream that has the lowest resolution, as long as that stream is below 1024x768. This behavior can be modified (see below).
Settings that are responsible for server motion detection, archiving and playback
Default software settings should work fine with most of the cameras. If not, there are several settings that can be used to adjust stream processing. Note that some settings may be unavailable for certain cameras.
Specifies if the server detects motion on a given camera. Can be configured in Camera Settings > Motion.
May affect archive playback. If recording is set to Motion + Low quality, only the Lo-Res stream will be archived if there is no motion, so Hi-Res stream will not always be available in archive.
Can be configured in Camera Settings > Recording.
Primary Stream - Resolution
Controls the image quality of the High-Res stream for live and archive playback.
Secondary Stream - Resolution and FPS
Affects secondary stream quality. Specifying a higher resolution and frame rate will result in better image quality when viewing Lo-Res stream but will place more load on the server, as the Lo-Res stream is decoded by the server CPU.
Both Primary and Secondary stream settings can also be configured from:
- Camera Settings > Advanced > Video Streams Configuration
- The camera web page. In this case, use only one of the following settings:
- Camera Settings > Expert > “Keep camera stream and profile settings” - enable, or
- System Administration > General > Allow System to optimize device settings - disable
Do not archive Primary and/or Secondary streams
May affect the archive playback. Can be configured in Camera Settings > Expert.
Disable secondary stream
May affect archive playback and motion detection. If enabled, motion detection won’t be performed for the camera, and secondary stream won’t be archived. Can be configured in Camera Settings > Expert.
Force motion detection for Primary or Secondary stream
This setting overrides the default behavior and may force the server to use a specific stream to detect motion. For instance, it can be used in the following cases:
- There is no secondary stream - force motion detection to the primary stream
- Secondary stream has too high resolution (greater than 1024x768) - force motion detection the primary stream.
Note that these settings may overload server CPU. Can be configured in Camera Settings > Expert.