Concept: Blue Iris Streaming Overview

Details the major steps to configure and deploy Blue Iris.
Start with Onboarding Checklist article.
1. Setup Windows to work well with Blue Iris.
2. Connecting IP cameras.
3. Setting up Storage and Recordings.
4. Configuring your home or office network for Remote Access via a web browser or the phone apps.
5. Creating Triggers and Alerts.
6. Setting up AI with DeepStack
7. Creating Schedules and Profiles
Post Reply
varghesesa
Posts: 44
Joined: Thu Jul 11, 2019 9:52 pm

Concept: Blue Iris Streaming Overview

Post by varghesesa » Tue Jul 06, 2021 2:29 am

Introduction

Blue Iris handles video and audio streams in many ways. It first needs to handle the streams coming from Blue Iris. However, BI also creates video / audio streams to send to different endpoints.
  • Web Interface (UI3)
  • Mobile devices
  • Other web servers or integrations
  • YouTube
  • Facebook live
  • etc
Because BI provides access to camera streams, how a user or integration chooses to use the stream is endless.

Pipelines

The streaming pipelines are a very important concept to understand. It makes understanding the features in BI so much easier. The most common BI pipelines are:
  • Live view: How camera feeds come into BI for view in the console or to be recorded.
  • Playback view: How video / audio is played back from recordings
  • Export to a file is a final common pipeline. While you may not think of saving to a file as a streaming pipeline, in fact, it is and is very similar to the Playback pipeline.
Live View

The key takeaway with live view is the difference in the pipeline between viewing in the console versus viewing from a remote endpoint.

live view.png
live view.png (36.44 KiB) Viewed 543 times
Once a video stream has been decoded, it can be viewed. Thus, in the console the stream from the camera is decoded and displayed.
However, to view on a remote device, the BI server has the responsibility of sending the stream to the Endpoint. In order to do so, BI must first encode the video so that it can be sent over the wire (internet) for the remote device to decode and view.

Playback

Similar to live view, playback is all about playing video as well. However, the source is no longer the camera or live video feed. The source is the recording.

playback.png
playback.png (35.86 KiB) Viewed 542 times
Similar to live view, playback to a remote device also has the extra encoding step.

Recordings

Similar to above, recording to a file also entails a video pipeline.
record.png
record.png (40.66 KiB) Viewed 539 times
From the recordings tab, you have to choose the Video file format and compression settings. Most users save to BVR format so I will table the discussion regarding the other formats. In regards to the Video compression section, a very popular option is Direct to Disc because it saves on CPU. The safer choice is to Re-encode using BI software. Users often start with D2D and switch to Re-encode if there are issues.

Export to file

Export to file reads from the recordings (BVR) similar to playback, however Export to file, then saves the contents into another file format, e.g. MP4.
export to file.png
export to file.png (35.5 KiB) Viewed 538 times
FYI, Decode -> Encode is often referred to as Re-encode. Basically you are converting the video stream from one format to another.

Mapping Pipelines to BI Functionality

Once you understand the BI pipelines, understanding the dialogs and settings becomes so much easier.

Decode

Let's start with Decode. You can instruct BI to decode video via hardware acceleration or BI software. Below are the ways to do so.
  • Live view to console: The video source for live view is the live camera feed.
    • Turn on/off globally for all cameras:
      Hardware accelerated decode = <choose setting based on hardware>. Global settings -> Cameras tab.
      Hardware decode = Default. Camera settings -> Video tab.

      HA.PNG
      HA.PNG (24.83 KiB) Viewed 481 times
    • Turn on/off at camera level
      Hardware accelerated decode = <any setting>. Global settings -> Cameras tab.
      Hardware decode = No. Camera settings -> Video tab. Turns off HA at the camera level. Overrides global setting.
      Hardware decode = <choose setting based on hardware>. If you have an Intel processor with QuickSync and a GPU graphics card, e.g. NVidia, you can mix and match HA across both devices.

      HA camera.png
      HA camera.png (39.06 KiB) Viewed 480 times
    Hardware acceleration is usually enabled if you have supporting hardware (Intel/AMD processor and/or an NVidia graphics card). By doing so, you can save on CPU usage.
  • Playback to console: The difference between live view and playback view is the source is the file recording, not the live camera stream.
    To turn on HA for playback, enable Also BVR. Camera settings -> Video tab.

    also bvr.png
    also bvr.png (22.26 KiB) Viewed 478 times

    Since Playback is much less frequently used than streaming cameras and decoding live streams, Also BVR is off by default.
    Furthermore, the playback window provides the seek/scan functionality in the recording. The seek/scan functionality that comes with playback is not conducive for GPUs. GPUs are good for processing continuous streams. The back & forth associated with video search during playback can lead to an unresponsive user interface while the GPU tries to catch up.
  • Recordings
    • Direct-to-disc (D2D): Saving D2D has no decoding/encoding steps because, by definition, the video content from the camera is being saved directly to disk.
    • Re-encode: The source for recordings is the live camera feed, similar to Live view.
      Therefore, similar to Live view, decoding in hardware or software is determined by the global or camera HA setting as mentioned above for Live view.
The other pipeline permutations should now be easier to understand based on above.
  • Live view to remote endpoint
    Since the source is the live camera feed, decoding will be based on the global/camera HA settings as explained above for Live view.
  • Playback to remote endpoint
    Since the source is the file recording, decoding will be based on the Also BVR setting as explained above for Playback.
  • And finally, when exporting to a file, the source is also the file recording, so decoding will be based on the Also BVR setting as explained above Playback.
Encode
Encoding is much easier to understand because it's the same dialog (Encoder options dialog) that appears in many places.
  • Streaming/playback to remote endpoints: Global settings -> Web server tab -> Advanced -> Configure
  • Export to file: Convert/Export -> Configure
    Keep in mind when saving D2D, motion overlays and text/graphics overlays are stored as meta data. They are not part of the actual video. Therefore you have options whether to include them with the export. When selecting Re-encode, the video will have the overlays if you had them turned on/off when recording. No option to include the overlays later.
    export overlays.png
    export overlays.png (32.22 KiB) Viewed 470 times
  • Record: Camera settings -> Record tab -> Video file format and compression -> Re-encode -> Configure
Regardless of how you get to the encoder options (below is from the Camera settings -> Record tab), encoding in hardware or software is determined by the HA setting in the Encoder option dialog. Encoding with hardware is experimental. Often it does not work and causes problems. The recommendation is to leave HA = No for encoding.
record settings.png
record settings.png (105.64 KiB) Viewed 476 times
Summary

The point to this article is to provide an easy way to understand the video pipelines that exist in BI. By doing so, it should now be a little easier to understand how to change BI settings to resolve video stream issues on your system.
  • If live view from a camera is choppy or jittery, what should I do?
  • If the playback is entirely black on UI3, what should I do?
All the Gotchas and fixes in the Camera Stream Optimization article will be explained in the context of the video pipelines to provide even more context and understanding to the video pipeline concept.

generic pipeline.png
generic pipeline.png (59.83 KiB) Viewed 387 times
Post Reply