Feed showing too bright in BI and too dark in UI3

Corvus85

Getting the hang of it
Joined
Aug 18, 2021
Messages
498
Reaction score
79
Location
Australia
Hey all,

I'm having a very strange problem ever since I set BI up where the footage (live or recorded) as seen from BI is much, MUCH brighter and washed out than in UI3. This is especially pronounced at night. All my cameras are IPC-T5442TM-AS.

It doesn't matter whether I'm accessing BI directly through the PC/monitor it's installed on, or whether I'm using Parsec to control it remotely. Any monitor I use BI on is showing the footage from it as being washed out. This more closely resembles the footage I'm getting from the web page of the cameras themselves (which is also washed out), so at first, I adjusted brightness and contrast levels according to how that image looks directly from the cameras, and I got a nice, high contrast, detailed image. Great, right?

However, this resulted in the feeds/recordings being WAY too dark when viewing in UI3/Blue Iris mobile app, no matter what phone or PC/web browser/monitor I view it on.

So then I went the other way - I adjusted the cameras to suit what I'm seeing in UI3/Blue Iris mobile app - and when I get that nice, crisp, contrast viewing through those, I switch back to BI and it's washed out again.

See the bottom screenshot to see what I mean. This was all taken on a single screenshot, so it's not pieced together via multiple systems. Going clockwise from the top left, we have the direct camera feed from its web control, BI as seen through Parsec (which is also how it looks on the actual machine it's running on), and then UI3 on Edge (and it looks the same, no matter what other browser I use).

1642948158371.png

The problem is, while it looks the best through UI3 right now, I suspect the reason I'm having very obvious alerts cancelled is due to BI working with a washed out image. And if I lower the brightness/contrast within the camera's web control page, it'll look absurdly dark in UI3, making it useless when I'm out of the house at night and I want to view them. It becomes SO dark that everything beyond the Hyundai's front grill is a crushed black mess, and only the highlights off the truck in the background are visible. In fact, you can barely tell there's a truck there at all.

How can I make the feed look the SAME regardless of which way I choose to view it? Surely I'm not the only one to come across this problem.
 

looney2ns

IPCT Contributor
Joined
Sep 25, 2016
Messages
15,600
Reaction score
22,814
Location
Evansville, In. USA
First off, the IR reflection off the top of the fence it causing issue's and the light from the side lights both affecting the exposure of your cam. You will need to get those areas out of the frame of view for best results.

With that said, I don't really see any problem with the shot you posted when the reflection is taken into account.
 

bp2008

Staff member
Joined
Mar 10, 2014
Messages
12,672
Reaction score
14,015
Location
USA
I saw your thread on reddit earlier today but didn't notice the screenshots...

There's really no excuse for the contrast changing so much from one player to the next. It can only be explained by most people having a poor eye for fine details. A fact which applies just as much to people writing video processing software as it does to anyone else. So a certain amount of f*ck-up is to be expected, because these issues crop up and the people with the power to fix it don't notice or just don't care.

Unfortunately in this case, there's very little you can do about it besides changing the setting for Full/Limited dynamic range in the few places where such a setting is exposed. Nvidia control panel, and Blue Iris's streaming profile configuration panel. Nvidia at least provides settings for this, whereas I've never found equivalent settings in AMD or Intel graphics control panels.

See how you lose a little bit of the brightest details at every stage?

1642978973021.png < Camera web interface
1642978979608.png < Blue Iris local console via Parsec
1642979022083.png < UI3


And your main complaint, how the black level varies so much between the images. Right there in the camera's web interface, the darkest spot I could find measured 28 on brightness. 28 where it should have been, could have been 0. Why it is so far off, I can only guess. Maybe the video player in the camera's interface is just badly tuned, or maybe the stream is actually encoded like that. Who knows.

1642980081125.png


By the time Blue Iris has decoded and rendered that, and Parsec has encoded and decoded it again and rendered it on your client device, the color value is now down to 11. That is at least 5 opportunities for software to foul up the contrast. More, really, because I'm sure there were multiple conversions between RGB and YUV colorspaces along the way. Possibly if you had a screen capture directly from the Blue Iris machine, it would be different. I have no idea how accurate Parsec is with its video processing. But I'd like to think that Parsec and Blue Iris do things more competently than a Chinese IP camera manufacturer that still thinks Internet Explorer is a cool browser to write plugins for.

1642980155498.png


Then we have UI3. I wrote UI3, but not the low-level video player components which it uses. I can tell you there is no way for UI3 to control how the decoder and renderer handles the video at such a low level as to affect this. At least with UI3 using the HTML5 player, you're at the mercy of the web browser, the operating system, the GPU vendor, or whatever it is that provides the low level video components. It is pure luck that the darkest spots come out with final RGB values of 0 without apparent quality loss. And it is bad luck that some of the brightest details are lost (as in my first example above). But for all I know that loss could happen during Blue Iris's re-encoding of the video stream.

1642980172728.png
 

MikeLud1

IPCT Contributor
Joined
Apr 5, 2017
Messages
2,203
Reaction score
4,241
Location
Brooklyn, NY
I also see the same issue, below is a post on it. I found that Blue Iris software decode does not handle Full/Limited dynamic range correctly. If I use Nvidia decode everything looks normal on all viewing devices.

 

Corvus85

Getting the hang of it
Joined
Aug 18, 2021
Messages
498
Reaction score
79
Location
Australia
With that said, I don't really see any problem with the shot you posted when the reflection is taken into account.
Seriously? You don't see any HUGE brightness/contrast differences between the images and can't imagine how they'd affect object recognition/sensitivity?

I can tell you there is no way for UI3 to control how the decoder and renderer handles the video at such a low level as to affect this. At least with UI3 using the HTML5 player, you're at the mercy of the web browser, the operating system, the GPU vendor, or whatever it is that provides the low level video components.
If that's the case, then why does the direct feed from the camera's web control look vastly different to the feed from UI3 while using the same browser? Doesn't this mean it has to be entirely within the BI decoding?

If I use Nvidia decode everything looks normal on all viewing devices.
What are those of us without dedicated GPUs supposed to do?
Surely I'm not the only one running integrated graphics who has this problem.

there's very little you can do about it besides changing the setting for Full/Limited dynamic range in the few places where such a setting is exposed. Nvidia control panel, and Blue Iris's streaming profile configuration panel.
Sure enough, I had 'full color' selected within the rendering options, however when I unchecked it, it made a small but noticeable difference. It still makes the BI mobile app far from usable though. It's so damn dark that I can hardly even tell the make of the car, let alone the model.

What else am I supposed to do?
 
Last edited:

Corvus85

Getting the hang of it
Joined
Aug 18, 2021
Messages
498
Reaction score
79
Location
Australia
Guys, the plot thickens.

Just on a hunch, I decided to change that camera's encoding to H265 instead of H264 - and I'm just gonna let this screenshot of the direct camera feed speak for itself.

1643023597775.png

On the left is H265, and on the right is H264. Both screenshots were taken on the same machine, same web browser, just seconds apart. This is even before it hits BI.

The funny thing is - changing this setting doesn't affect how the image looks in BI at all either way, and the H265 image is far closer to what I'm seeing in BI and UI3.

So... Problem solved, right?

Except I specifically didn't want to run my cameras in H265 because I plan to build a HomeAssistant dashboard featuring the live view of these cameras, and I've heard there are compatibility issues with pulling H265 streams from within HomeAssistant.

Either way, it shouldn't be behaving like this, right?

Any suggestions? Or has anyone actually done this?
 

bp2008

Staff member
Joined
Mar 10, 2014
Messages
12,672
Reaction score
14,015
Location
USA
If that's the case, then why does the direct feed from the camera's web control look vastly different to the feed from UI3 while using the same browser? Doesn't this mean it has to be entirely within the BI decoding?
If the camera's web interface is using HTML5 Media Source Extensions (MSE) to decode and render the video, then yes any differences between it and UI3 would be caused by Blue Iris's decoding and re-encoding of the video. I don't know what the camera is using in its web interface though. Could be MSE. Could be a plugin. Could be a javascript-based decoder and canvas-based renderer.

What are those of us without dedicated GPUs supposed to do?
Surely I'm not the only one running integrated graphics who has this problem.
You're not the only one. Nvidia decoding is really energy-inefficient anyway, so it isn't a great solution to the problem.

Some people just tune the brightness and contrast in the camera's web interface for best results in whatever application they use the most.

Most people, I think, have trouble even recognizing there is a problem, and that unfortunately includes the people making IP cameras and video decoders, which is how you end up with this situation in the first place.

Sure enough, I had 'full color' selected within the rendering options, however when I unchecked it, it made a small but noticeable difference. It still makes the BI mobile app far from usable though. It's so damn dark that I can hardly even tell the make of the car, let alone the model.

What else am I supposed to do?
Maybe add more light so the vehicles are brighter in the video. LOL.

Just on a hunch, I decided to change that camera's encoding to H265 instead of H264 - and I'm just gonna let this screenshot of the direct camera feed speak for itself.
I can't say if the difference is due to the way the stream was encoded. That would require more expertise and specialized software tools than I possess.

The visual difference might be caused by how H.265 video is decoded and rendered in the camera's web interface compared to how it is done with H.264. Meaning, it could be just more differences in how the video players operate.

Even jpeg snapshots directly from the camera (http://xx.xx.xx.xx/cgi-bin/snapshot.cgi) have different contrast. This kind of inconsistency in how the contrast is handled is one of my pet peeves and I spend way too much time obsessing over it. Even as the developer of UI3 there ain't shit I can do about it, because I don't actually write the low level stuff that processes the video.
 

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
24,821
Reaction score
48,396
Location
USA
Mine is much worse than yours - some of my cams look completely black. I simply turn the brightness up on my phone all the way to max when opening up UI3 and it is tolerable.
 

looney2ns

IPCT Contributor
Joined
Sep 25, 2016
Messages
15,600
Reaction score
22,814
Location
Evansville, In. USA
As I've already stated, I see a picture that needs to have the FOV adjusted so the porch lights are not in the FOV. Or light from those porch lights are not hitting the lens. It is affecting the overall exposure of the scene in a negative way. But you don't seem to want to listen.
 

Corvus85

Getting the hang of it
Joined
Aug 18, 2021
Messages
498
Reaction score
79
Location
Australia
As I've already stated, I see a picture that needs to have the FOV adjusted so the porch lights are not in the FOV. Or light from those porch lights are not hitting the lens. It is affecting the overall exposure of the scene in a negative way. But you don't seem to want to listen.
I don't think you understand.
Yes, the positioning is not optimal - but that's besides the point. We're talking about relative brightness here between the image that the camera itself produces, and how BI renders it.

Even if the camera was positioned perfectly, there would still be a massive difference in brightness/contrast between these two images. Ergo, this isn't specifically a positioning problem, because it affects all my cameras.
 

Corvus85

Getting the hang of it
Joined
Aug 18, 2021
Messages
498
Reaction score
79
Location
Australia
Ok so I've tried something else. I've changed the encoder from 'Intel + VPP' to just 'Intel', and.... Well... It's hard to tell because it's currently daylight, but I think it made a positive difference.

I'll report back tonight when it's dark and I can tell more definitively.
 

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
24,821
Reaction score
48,396
Location
USA
I run H264 and some I use NVIDIA and others are Intel+VPP

I haven't really noticed a difference changing them around either.
 

Corvus85

Getting the hang of it
Joined
Aug 18, 2021
Messages
498
Reaction score
79
Location
Australia
I run H264 and some I use NVIDIA and others are Intel+VPP
I was wondering what the difference is between 'Intel' and 'Intel+VPP' and I came across this:

4.3.2 - April 12, 2016

  • The Intel hardware decoding on Options/Cameras now has become a drop list was an additional choice, either No, Yes, or Yes with Video Post Processing (VPP). The new setting additionally moves the post-decode color space conversion from NV12 to RGB32 into hardware as possible.
It's very possible that BI was applying some post-processing (ie. contrast) filter over the camera feed, causing the output to be darker than the camera source feed - and when I had 'full range color' selected in the webserver settings, that compounded the problem and caused it to be darker still on UI3.

This seems to be the most likely hypothesis at the moment, but I'll wait till tonight to confirm.
 

Mike A.

Known around here
Joined
May 6, 2017
Messages
3,827
Reaction score
6,383
Understand that it's not what you're showing here as far as differences but fixing the positioning likely will help things a lot by avoiding it being so dark to begin with.

You can do a lot more about that easier than you can the rest.
 

Corvus85

Getting the hang of it
Joined
Aug 18, 2021
Messages
498
Reaction score
79
Location
Australia
Understand that it's not what you're showing here as far as differences but fixing the positioning likely will help things a lot by avoiding it being so dark to begin with.
1. Not physically possible at this stage.
2. Even if it were perfectly positioned to your definition, the video feed itself would show massive differences in contrast/brightness between the source feed and BI. The images given in my OP were just an example. This occurs on ALL 8 my cameras.
 

Corvus85

Getting the hang of it
Joined
Aug 18, 2021
Messages
498
Reaction score
79
Location
Australia
Guys, I can confirm that my hypothesis was CORRECT.

I now have a comparable image between the camera feed, BI and UI 3 on my devices.
To confirm, all I did was change the codec from H264 to H265 on all my cameras, then changed the BI decoder from 'Intel+VPP' to 'Intel'.
I also unchecked 'Use full range color' in the Web Server encoding settings.

Thanks for all your suggestions!
 

Corvus85

Getting the hang of it
Joined
Aug 18, 2021
Messages
498
Reaction score
79
Location
Australia
Ok I spoke to soon.

Now I'm realizing that the recorded footage is 'washed out' as per the original examples.
I don't understand how this can be possible, since I'm using direct-to-disk. Even exporting it as an mp4 file shows it as washed out compared to the live feed.
To summarize, the live direct feed, BI and UI3 all look the same, but recordings - either when played through BI or when exported - all show as washed out.

Any ideas?
 

MikeLud1

IPCT Contributor
Joined
Apr 5, 2017
Messages
2,203
Reaction score
4,241
Location
Brooklyn, NY
Ok I spoke to soon.

Now I'm realizing that the recorded footage is 'washed out' as per the original examples.
I don't understand how this can be possible, since I'm using direct-to-disk. Even exporting it as an mp4 file shows it as washed out compared to the live feed.
To summarize, the live direct feed, BI and UI3 all look the same, but recordings - either when played through BI or when exported - all show as washed out.

Any ideas?
Checkoff Also BVR on each camera also set the Hardware decode in each camera not from global settings
1643114404214.png
 
Top