You are using an unsupported browser. Please update your browser to the latest version on or before July 31, 2020.
close
You are viewing the article in preview mode. It is not live at the moment.
Dual-Streaming Explained
print icon

DW Spectrum – Dual Streaming/Adaptive Scaling

-----------------------------------

Related Digital Watchdog VMS Apps:  DW Spectrum

Last Edit: August 21, 2024

-----------------------------------

 

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, 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 DW Spectrum 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, DW Spectrum 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 behavior is specified (see the section related to settings below). However, some cameras may not or cannot comply with default System behavior, 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 DW Spectrum Server from controlling camera streams or modified them using the camera web-page or a third-party software

In these cases, the DW Spectrum 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).

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 to low-resolution to save bandwidth
  • If CPU usage is too high (too many streams opened, or fast forward/rewind is in use), the Client switches to Lo-Res display until CPU usage is low 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 Lo-Res 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-Res 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 Lo-Res

 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.
    • Left-click on “Resolution” from a drop-down menu.
    • Choose the quality from three available options (High / Low resolution, Auto).
  • Per layout:
    • Right-click on the layout (not a camera tile).
    • Left-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 Hi-Res 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 do either of the following

Either: enable "Keep camera stream and profile settings” (in Camera Settings > Expert). Enabling this flag prevents the internal optimization performed by DW Spectrum and causes FPS and image quality settings in the recording schedule to be ignored.

Or: 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 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 with primary stream resolution over 1024x768, and secondary stream won’t be archived. Can be configured in Camera Settings > Expert.

 

Complexities With Client Adaptive Scaling

Spectrum’s Adaptive Scaling is a wonderful function that will try to provide the highest streams automatically when viewing cameras, then automatically adjust to the use of secondary streams if the software detects high resource usage.  However, this is not without variables that can create issues for a user.

 

For example, Spectrum will automatically determine that a saved layout with 30 cameras will not reasonably be able to display high resolution images and will immediately use the secondary streams.

However, a saved layout with 12 cameras will likely cause Spectrum to attempt to display their high-resolution images first.  Depending on the cameras and client machine’s CPU, the client software or client system may crash, as the CPU resources may exceed 100% before Spectrum can automatically adjust the streams.

 

To alleviate issues that may be related to this:

 

      1. Open the client with a new layout
      2. Add cameras to the layout one-by-one, keeping an eye on your client machine’s CPU usage.
      3. Adaptive Scaling will normally automatically adjust, however if you notice that your CPU usage is high, right-click on a camera, select “resolution”, then set to “low”.
      4. Repeat steps 2 and 3 as necessary until your desired layout is completed.
      5. Right-click an empty space on your layout and set the resolution to “low”.
      6. Save the layout.

This will allow Spectrum to immediately use the secondary streams, avoiding potential issues due to excessive CPU resource usage by the client.  This will have no effect on the recording settings, and the full resolution is still available when viewing the cameras independently.

 

 

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

scroll to top icon