Dual Streaming & Adaptive Scaling
-----------------------------------
Affected Roles: All Users
Related Digital Watchdog VMS Apps: DW Spectrum
Last Edit: May 22, 2025
-----------------------------------
What is Dual Streaming?
Most IP cameras can provide multiple data streams at the same time, each at a different resolution and frame rate. DW Spectrum requests two data streams, one high-resolution and one low-resolution, switching 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 in DW Spectrum.
- High-resolution (Primary Stream) – provides a high-quality image but requires significant CPU and network bandwidth to view. Generally used for high-quality viewing and playback.
- Low-resolution (Secondary Stream) – requires less computing power than the high-resolution stream but also provides low image resolution at a slower frame rate. Used for continuous recording, motion detection, and to save bandwidth and CPU resources while viewing playback.
The Value of Dual Streaming
Dual Streaming on the Server
If a camera supports dual streaming, DW Spectrum tries to configure the low-resolution stream at or near 640x360 resolution at 7 FPS by default. The server uses the low-resolution stream whenever possible for motion detection and records both streams to archive unless a different behavior is specified. However, some cameras may not or cannot comply with default system behavior, usually for one of the following reasons:
- The requested settings are not available from the camera. For example, the lowest resolution stream is higher than 640x360p.
- A Secondary stream is not provided at all.
- A low-resolution stream is provided as the Primary Stream and a high-resolution stream as the Secondary Stream.
- A user has forbidden the DW Spectrum Server from controlling camera streams or has modified the camera streams using the camera web page or with third-party software.
In these cases, the DW Spectrum Server will perform motion detection on the available stream that has the lowest resolution, if that stream is below 1024x768p. This behavior can be modified (see below).
Dual Streaming in the Client
In the DW Spectrum Client, the stream is automatically selected when viewing live or archived video according to these metrics:
- If network bandwidth between the Client and Server is insufficient, the Client switches to low-resolution to save bandwidth.
- If CPU usage is too high, due to too many streams being open simultaneously or you are using the fast forward or rewind viewing controls, the Client switches to a low-resolution display until the CPU usage is low enough to decode all streams that are being displayed.
- If the 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 the high-resolution stream.
- When an item is larger than 172 pixels in layout and when an item is pulled into full screen display, high-resolution video is always displayed.
- When image quality has limited importance, items smaller than 172 pixels, while fast forwarding or rewinding through archived video, the Client will switch to low-resolution.
As a user, it is possible to specify the quality of playback in the DW Spectrum Client as follows:
- Per camera:
- Right-click on the camera tile in the layout.
- Select “Resolution” from the context menu.
- Choose which resolution quality to display (High, Low, Auto).
- Per layout:
- Right-click in the layout (not on a camera tile).
- Select “Resolution” from the context menu.
- Choose the resolution quality to display (High, Low, Auto).
- Save your changes by right-clicking on the layout tab and selecting “Save current layout”.
Default software settings are optimized for most cameras. If needed, there are several settings that can be used to adjust stream processing. Some settings may be unavailable for certain cameras.
Settings That Affect Motion Detection
Motion detection is performed on the low-resolution stream, up to a threshold of 1024x768p. Motion detection will not be performed on video streams with a higher resolution.
- Motion Detection (Camera Settings > Motion)
- Toggles motion detection ON or OFF for a given camera.
- Disable Secondary Stream (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 (Camera Settings > Expert)
- Occasionally, a camera will report its configuration incorrectly and swap the primary and secondary streams. If the secondary stream is using a high-resolution (>1024x768), motion detection processing will create a significant CPU load. To correct this, you can force motion detection to a specific stream. Be aware that when forcing motion detection to a high-resolution stream, CPU usage will increase (possibly to 100%) and will cause system instability.
Settings That Affect Recording and Playback
When certain settings are applied, the Server may not archive video streams.
- Recording Type: Motion + Lo-Res (Camera Settings > Recording)
- Archives the high-resolution stream when motion is detected and the low-resolution stream when there is no motion. As a result, high-resolution video will not always be available for playback.
- Disable Secondary Stream (Camera Settings > Expert)
- If enabled, motion detection will not be performed for the camera and the secondary stream will not be archived.
- Do not archive primary stream / Do not archive secondary stream (Camera Settings > Expert)
- Using this option will completely disable video recording to the archive for both the Primary and Secondary streams.
- Video Streams Configuration (Camera Settings > Advanced)
- Depending on the camera, camera stream quality and other settings can be configured for each device. Alternatively, you can also adjust camera stream settings directly within the camera itself using the Web Page tab. If you choose to control stream settings from one of these tabs, you must perform one of the following:
- Keep camera stream and profile settings (Camera Settings > Expert)
- Enabling this setting prevents the internal optimization of DW Spectrum and causes FPS and image quality settings in the Server’s recording schedule to be ignored. The stream settings will then be deferred to the camera’s internal settings.
- Allow System to optimize device settings (System Administration > General)
- Disabling this setting will negate the System settings responsible for automatically optimizing devices.
- Keep camera stream and profile settings (Camera Settings > Expert)
- Depending on the camera, camera stream quality and other settings can be configured for each device. Alternatively, you can also adjust camera stream settings directly within the camera itself using the Web Page tab. If you choose to control stream settings from one of these tabs, you must perform one of the following:
Settings Responsible for Server Motion Detection, Archiving and Playback
Default software settings are optimized for most cameras. If needed, there are settings that can be used to adjust stream processing. Some settings may be unavailable for certain devices.
- Motion Detection (Camera Settings > Motion)
- Toggles motion detection ON/OFF for each camera and can be configured to detect motion by masking specific areas and designating detection sensitivity.
- Recording Type (Camera Settings > Recording)
- Determines the method by which the Server will record video to the archive. Using any motion-based recording type will result in video being recorded primarily when motion is detected by the camera. Choosing a hybrid motion recording type (e.g., Motion + Lo-Res) will archive the high-resolution stream when motion is detected and a low-resolution stream when there is no motion.
- Primary Stream Resolution (Camera Settings > Advanced)
- Controls the image quality of the primary stream for live and archive playback.
- Secondary Stream Resolution & FPS (Camera Settings Advanced)
- Affects secondary stream quality. Specifying a high resolution and frame rate will result in better image quality when viewing the secondary stream, but it will place a greater load on the Server as the secondary stream is decoded by the CPU.
- Use only one of the following settings:
- Affects secondary stream quality. Specifying a high resolution and frame rate will result in better image quality when viewing the secondary stream, but it will place a greater load on the Server as the secondary stream is decoded by the CPU.
Keep camera stream and profile settings (Camera Settings > Expert)
-
-
-
- Enabling this setting prevents the internal optimization of DW Spectrum and causes FPS and image quality settings in the Server’s recording schedule to be ignored. The stream settings will then be deferred to the camera’s internal settings.
-
-
Allow System to optimize device settings (System Administration > General)
-
-
-
- Disabling this setting will negate the System settings responsible for automatically optimizing devices.
-
-
- Disable Secondary Stream (Camera Settings > Expert)
- If enabled, motion detection will not be performed for the camera and the secondary stream will not be archived.
- Do not archive primary stream / Do not archive secondary stream (Camera Settings > Expert)
- Using this option will completely disable video recording to the archive for both the Primary and Secondary streams.
Complications with Client Adaptive Scaling
DW Spectrum’s adaptive scaling automatically uses the primary stream when viewing cameras, while also automatically adjusting to use the secondary stream if the software detects high resource consumption. However, this is not without variables that can create issues for the user.
In most cases, DW Spectrum automatically determines if a saved layout can reasonably display high resolution images for all the cameras with the hardware’s limited processing resources, the system automatically used the secondary streams.
However, in specific cases, there may be times where a layout is set to display all camera streams using their primary streams first. Depending on the cameras and the DW Spectrum Client machine’s CPU and processing abilities, the Client may crash as cameras are being added to the layout. This would be due to the CPU utilization exceeding 100% before DW Spectrum can automatically adjust the video streams.
To mitigate such issues:
- Open a new layout in the Client and add cameras, one at a time.
- Use the Task Manager (Windows) application or System Monitor (Ubuntu Linux) to monitor the Client machine’s CPU use. If you notice that the CPU utilization is high, right-click on one of the cameras in the layout and select “Resolution” then set it to the “Low” setting.
- Continue adding cameras and monitoring the CPU use until all desired cameras for the layout have been added.
- Right-click in an empty space within the layout and select “Resolution” then set it to the “Low” setting.
- Right-click on the layout tab and select “Save Layout”.
As a result, DW Spectrum will automatically use the secondary stream for all cameras within the layout while viewing the cameras by preventing excessive CPU usage by the Client. This will have no effect on the actual recording settings and each camera can be viewed in high resolution when viewing each camera independently and/or full screen.
For More Information or Technical Support
DW Technical Support: 866.446.3595 (option 4)
https://www.digital-watchdog.com/contact-tech-support/
______________________________________________________________________________
DW Sales: 866.446.3595 [email protected] www.digital-watchdog.com