What is Dual Streaming?
Most IP cameras can provide multiple data streams at the same time, each at a different resolution and frame rate. WAVE requests two data streams, one high resolution and one low resolution, and switches between them to provide the best image quality with the least impact on processing and network efficiency. This “adaptive scaling” is one of the most valuable features of the WAVE VMS.
- High-resolution (Primary) streams provide better quality image display but require significant CPU and network bandwidth to view.
- Low-resolution (Secondary) streams require far less computing power than typical high-resolution streams but provide much lower image resolution at a slower frame rate.
The primary stream is used for high-quality viewing and playback. The secondary stream is used for constant recording, for motion detection, and to save bandwidth and CPU during playback.
Why is Dual Streaming important and how does it work?
Dual Streaming on the Server
If a camera supports dual-streaming, WAVE tries to configure the low-resolution stream at or near 640x360 resolution at 7fps. The server uses the low-resolution stream whenever possible for software motion detection and records both streams to archive unless a different behaviour is specified (see the section related to settings below). However, some cameras may not or cannot comply with default System behaviour, usually for one of these reasons:
- The requested settings are not available from the camera (for instance, the lowest resolution stream is higher than 640x360p)
- A secondary or low-resolution stream is not provided at all
- A low-resolution stream is provided as Primary and a high-resolution stream as Secondary
- User has forbidden the WAVE Server from controlling camera streams or modified them using the camera web-page or a third-party software
In these cases, WAVE Server will perform motion detection on the available stream that has the lowest resolution, as long as that stream is below 1024x768. This behaviour can be modified (see below).
Dual Streaming on the Client
On the Client, by default the stream is selected automatically when viewing live or archive video according to these metrics:
- If network bandwidth between Client and Server is insufficient, the Client switches video items one by one to low-resolution to match the bandwidth limit.
- If CPU usage is too high (too many streams opened, or fast forward/rewind is in use), the Client switches video items one by one to low-resolution until CPU usage is enough to decode all the streams being displayed.
- If user adds more than 16 video items to the layout, new items will be added in low-resolution mode.
- When network bandwidth and CPU load are within normal range, the Client displays high-resolution.
- When an item is larger than 172 pixels in layout and when an item is pulled into Fullscreen display, high-resolution is always displayed.
- When image quality is of limited importance - items smaller than 172 pixels, during fast forward or fast rewind playback, the Client switches to low-resolution.
As a user, it is possible to specify the quality of playback in the Desktop client as follows:
Per camera:
- Right-click on the camera tile.
- Click on Resolution from the drop-down menu.
- Choose the quality from three available options: High, Low, or Auto.
Per layout:
- Right-click on the layout (not a camera tile).
- Click on Resolution from a drop-down menu.
- Choose the quality from three available options (High / Low resolution, Auto).
- Save your choice by right-clicking on the Layout and choosing “Save current layout” from the menu.
Default software settings are optimized for most of available cameras. If needed, there are several settings that can be used to adjust stream processing. (Note that some settings may be unavailable for certain cameras.)
Settings that affect motion detection
Motion detection is performed on the lowest resolution stream detected to a threshold of ≤ 1024x768p. Above that motion detection will not be performed.
Motion Detection (in Camera Settings > Motion)
Toggles motion detection on and off for a given camera.
Disable secondary stream (in Camera Settings > Expert)
If enabled, motion detection will not be performed for the camera, and the secondary stream will not be archived.
Force motion detection for stream (in Camera Settings > Expert)
Occasionally, a camera will report its configuration incorrectly and swap the primary and secondary streams. If the secondary stream is high-resolution, motion detection processing will create a very high CPU load. To correct this you can force motion detection to a specific stream. Note that forcing motion detection to a high-resolution stream will increase CPU usage, possibly to 100% and will likely cause entire System instability.
Settings that affect recording and playback
When certain settings are applied, the server may or may not archive high-resolution or low-resolution streams.
Recording Type: Motion + Lo-Res (in Camera Settings > Recording)
Archives the high-resolution stream when motion is detected and the low-resolution stream when there is no motion, so high-resolution will not always be available for playback.
Disable secondary stream (in Camera Settings > Expert)
If checked, motion detection won’t be performed for the camera, and the secondary stream won’t be archived.
Do not archive primary stream / Do not archive secondary stream (in Camera Settings > Expert)
Use to completely disable archiving of one or both streams.
Video Streams Configuration (in Camera Settings > General or Camera Settings > Web Page tab)
Depending on the camera, camera stream settings may be configured in the either of these tabs. If you choose to control stream settings from one of these tabs you must toggle one of the following options:
- Enable "Keep camera stream and profile settings” (in Camera Settings > Expert).
Enabling this flag prevents the internal optimization performed by WAVE Client and causes FPS and image quality settings in the recording schedule to be ignored. - Disable "Allow System to optimize device settings" (in System Administration > General).
Settings responsible for server motion detection, archiving and playback
Default software settings are optimized for most of available cameras. If needed, there are several settings that can be used to adjust stream processing. Note that some settings may be unavailable for certain cameras.
Motion Detection
Toggles motion detection on and off for a given camera. Can be configured in Camera Settings > Motion.
Recording Type
May affect archive playback. If recording is set to Motion + Low quality, only the low-resolution stream will be archived if there is no motion, so the high-resolution 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-resolution 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 low-resolution stream but will place more load on the server, as the low-resolution 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 with primary stream resolution over 1024x768, 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 behaviour 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 increase server CPU usage up to 100% and potentially cause system instability.
Can be configured in Camera Settings > Expert.