Console - Live view

The Camera streams sub-forum puts into practice the Camera streams framework. It takes into account the video pipeline in order to quickly troubleshoot various streaming issues:

My video on my console is choppy. What should I do?
My recordings always show a black screen. What should I do?
I cannot see video on my iPhone/Android/Tablet. What should I do?
Post Reply
varghesesa
Posts: 90
Joined: Thu Jul 11, 2019 9:52 pm

Console - Live view

Post by varghesesa »

Introduction

This article focuses on resolving video quality issues of a camera at the console. This article explains how to resolve many live video issues by knowing the video pipeline.

Warning symbol

If your camera window has the warning symbol below, please resolve. This alone may resolve your issue and not requiring proceeding further.

fps warning.png
fps warning.png (1.9 KiB) Viewed 27878 times

Pipeline nodes

If there is no warning symbol, it becomes more challenging how to resolve the issue. For example the video is choppy when viewing from the console.

Once you know the video pipeline, it becomes easy to understand and troubleshoot the issue. The Camera streams article explains all the video pipelines. For live view at the console, the video path is:
Video path: Camera video / feed -> Decode -> Console view

Camera video / feed

Nothing has a bigger impact on any of the video pipelines than the camera encoding settings. Garbage in = <uncertainty>
We created an entire article for dealing with Cameras, the Camera setup article. If the live view video has issues, go to the Camera settings section and simplify the video encoding so BI has the best shot of interpreting the video.

Decode

The Video tab -> Hardware decode section deep dives into selecting HA and turning it on/off for cameras. That being said, I have seen issues with HA on and off. With it on, there were tickets showing video artifacts (ghost images, discussed further below). With it off, a user's PC could not handle the load of decoding the camera which resulted in significant delays in the video feed.
I have a camera out of 10 cameras that has lately been consistently delayed on blue iris by a minute or more sometimes.
I have also seen tickets where users upgraded their gpu graphics card which improved results. But I do not have the expertise to know when or why the upgrade had a positive affect. The hardware recommendations article -> Server Recommendations section goes into detail about Intel QuickSync via iGPU vs external graphics cards. In general, a PC with an iGPU (QuickSync) is favored. I have seen on occasion where a graphics card upgrade (NVidia) did provide improvements as well.


Gotchas

This section is learnings from past tickets. We apply the video pipeline to quickly get to resolution.

Video artifacts

Gotcha 1: Video distortion

Reported Issues. Many, many artifacts/permutations of the same issue.
  • Green bars as seen below.
    Encoding-HighToBaseline.png
    Encoding-HighToBaseline.png (52.99 KiB) Viewed 27970 times
  • Washed out image
    console-live-view-artifact.png
    console-live-view-artifact.png (95.3 KiB) Viewed 27970 times
The fix: Camera feed node
Simplify encoding. In this case, we changed the camera's encoding from H.264 High to H.264 Baseline. Alter Camera encoding settings until streams work.

Gotcha 2: Ghost images

Reported Issue:
Ghost images. See below.
ghost.png
ghost.png (174.73 KiB) Viewed 27970 times

Very common problem.

Ghost images occur when BI cannot decode the intermediate frames (p-frames / b-frames) coming from the camera. The image on the left, i.e. the actual scene was in the same mp4 video (video created on phone recording the console, not an mp4 export. to be discussed below) and would flash every 1s which was the key frame. In the ghost image (intermediate frame) you can kind of make out the mailbox behind the man walking. FYI, I enlarged the ghost image portion in the second image so you could see the correlation to the original scene. The image is not to scale.

The fix: Decode node
Turned off hwva.
In this case, the encoding/decoding incompatibility was between the camera and Intel QuickSync. For some reason, the camera stats were saying the key frame ratio was 30 (mjpeg stream). It was almost as if the H.265 encoding from the camera was interpreted by the hwva as an mjpeg stream and thus rendering each intermediate frame as if it were a key frame. When hwva was turned off, the key frame ratio was 1 just as the camera settings show (GOP 1 I-frame / 1s).

As mentioned earlier, the user used his mobile device to create the video, not exporting to a file in BI. The user stated when exporting to a file (MP4), the video was fine. Big clue.

The video path for exporting to video is:
Read the file (recording) -> Decode -> Encode -> Save to MP4.

I also know the default export setting is to re-encode using BI software. Thus the decode node for live view was through hwva, but decode during export is through BI software. A big difference between the two video paths is how decoding is done, so I suspected hwva must be the culprit. An example of using BI functionality to Isolate the issue.

Live view summary

The video pipeline for live view is very basic: Camera feed -> Decode -> Live view. If your live view quality is poor you only have 3 options.
  • Revisit the camera feed settings: Camera setup article has best practices. (Fix for Gotcha 1)
  • Toggle hwva on/off and see if video improves. Video tab article discusses hwva and the many other BI server settings affecting streams. (Fix for Gotcha 2)
  • If you turned off hwva (above) and the issue was resolved, maybe upgrade drivers or upgrade the graphics card.
  • Maybe revisit your connector settings. Switch from Generic/RTSP driver (Step 2) to a vendor driver (Step 3) and see if it makes a difference.
If still an issue, support may need to get involved and remote test.


Streaming artifacts
These gotchas are more about the video quality being smooth, i.e. not choppy, jittery, lagging etc.

Gotcha 1: Choppy streams
Choppy streams, i.e. the live view or the playback is not smooth or the seconds on the time overlay are not sequential. These issues are almost entirely due to camera encoding settings. If the cameras are speaking Spanish and BI is speaking English, neither party can understand each other resulting in a poor experience.

Video path: Camera video -> Decode -> Console view
  • Camera video: Check out the camera stats, Status -> Cameras tab. The FPS should be at least 15 fps.
  • Camera video: Look at the key frame ratio in Camera -> Stats. Anything less than 0.5 may provide a bad experience. Set Key frame interval = fps, e.g. 15.
  • Revisit Camera setup article.
Gotcha 2: Camera streams lagging or sluggish or high latency

Video path: Camera video -> Decode -> Console view

Almost always, camera streams are sluggish because BI is not receiving enough key frames (i-frames). Need to alter encoding settings on the camera.
As stated above, key frame ratios less than 0.5 lead to sluggish cameras.
Revisit Camera setup article.


CPU maxed out

The other reason for lagging camera feeds in live view is the cameras are high resolution and the BI server cannot keep up. If your CPU is running above 80%, it is working too hard. In my opinion, above 50% is concerning. My CPU with (4) 2 MP cameras (I know, not much) hovers around 8%.

See CPU Utilization Gotcha for possible fixes.

Gotcha 3: Stuttering at common intervals, e.g. every 1 or 2s.

Video path: Camera video/feed -> Decode -> Console view

Camera feed: Change stream setting from Constant Bit Rate (CBR) to Variable Bit Rate (VBR)
Suppose a key frame is sent from the camera every 1s. If the CBR setting is too low, then the camera needs to perform image optimizations to get the frame across the network. Those optimizations lead to the glitches. So simply changing the camera setting to VBR instead of CBR should resolve the issue. In general, setting your cameras with VBR is a better user experience. CBR should only be considered if you have network bandwidth issues.

Live view summary

Streaming artifacts are often due to camera encoding settings or HA as seen above. Occasionally, Video tab settings can affect streams. If the above suggestions do not resolve the issue, revisit the Video tab article. Below are settings that generally work. The highlighted settings are the ones that usually get people in trouble when set or unset to non-default values.

console live view_video settings.png
console live view_video settings.png (34.2 KiB) Viewed 27951 times


Submitting a ticket
Remote testing
If you cannot resolve on your own, put the camera on the WAN for Remote testing.


Post Reply