Common issues with camera image

wopi82

IPCT Contributor
Joined
Feb 9, 2017
Messages
110
Reaction score
647
Location
Poland
@wittaj
It's exposure time (shutter) expressed in milliseconds instead of fractions of a second. One second is 1000 milliseconds (ms). And so 0.5 of a second is 500ms, 1/100s is 10ms, 1/1000s is 1ms and so on. If I set shutter parameter to a fixed value like 40ms, the camera will only use a shutter speed of 1/25s. In such situation, if it gets too bright (say, the sun has come out after a thunderstorm) the camera won't be able to adjust shutter speed and the image may get overexposed. Now, if I set a range instead of fixed value, like 0ms - 40ms, the camera will have a potential to shorten the exposure if the environment gets too bright. So during the mentioned thunderstorm it will operate most likely with 40ms (1/25s) shutter speed because it is dark, and after the sun appears, it will change its shutter to say 1ms (1/1000s). A range starting with 0ms means, you allow the camera to use its fastest available shutter if necessary. In case of most Dahua cams it is 1/100.000s.
 

wittaj

Known around here
Joined
Apr 28, 2019
Messages
1,074
Reaction score
928
Location
USA
@wopi82 - thanks for the layman terms for it. I have been wrestling with this concept, and I my understanding was close to what you said, but then when I sit in front of the camera GUI to change a setting, I start second-guessing what these mean and end up going with a fixed shutter.

So if for an example in the daytime I have a license plate camera that I am running at 1/2000, I know parts of the day it could be even faster, so if I went 0ms to 0.5ms, it would adjust to a faster shutter if needed, but not fall shorter than 1/2000? Now I realize using a camera as a license plate cam has it's own set of variables, and I don't know if this would work on that camera at night, but is my thought process correct now?

And along those lines, I went into my Dahua camera and it gives me the option under exposure to do it gives me the options of auto, gain, aperture, shutter priority, or manual. Would I set the ms range under shutter or manual or doesn't it make a difference?
 
Last edited:

achalmersman

Getting the hang of it
Joined
Jan 26, 2017
Messages
234
Reaction score
75
Location
Delaware USA
Wow definitely one of the most detailed and informative posts I've read on this forum. Thanks!

Sent from my SM-G965U using Tapatalk
 

cd36

Getting the hang of it
Joined
Oct 31, 2019
Messages
38
Reaction score
26
Location
Canada
Great post, I have one question though and it's a common question when tuning systems where one variable impacts the goal you are trying to achieve. Which one do you change first?

I'm thinking exposure is the primary attribute to adjust, so leave the others (gain, dnr) at default (or off?) and adjust exposure until you are happy with the image, then add in gain and dnr to clean up the image? I've been playing alot with tuning and don't quite have a system down yet but I'm getting close.

I'm not getting shots like some people here are at night but they may have more ambient lighting than me at night too. I'm tuning cameras in rural areas, which means few or no lights at night. And most people object to having their yard lit up like a city street.
 

Dave Lonsdale

Getting the hang of it
Joined
Dec 3, 2015
Messages
223
Reaction score
61
Location
Congleton Edge, UK
Another perhaps "common" camera image issue is using VBR with 4MP cameras.

I have long been in favour of using VBR with my 2MP cameras to save on disk space (continuous recording). However, even when using Dahua's maximum "Reference Bit Rate", my new Dahua T5442T-ZE does not perform well when using VBR. Setting as follows:-

VBR setting.jpg

When I start the camera with this setting, it initially looks OK but after approx 1 minute the image looks like this:-

VBR 4608kbps.jpg

Both the tarmac and the grass progressively become blurred. I also notice that over the one minute, the bitrate falls from over 4Mbps to approx 1Mbps. It would appear that the camera's encoder software does not satisfactorily resolve some parts of the image in this essentially static scene. By contrast, if I change to CBR with the same bitrate setting, the image looks like this:-

CBR 4608kbps.jpg

When I look really closely at the original bitmap images, the detail improves further by increasing the bitrate. Now that Ken Pletzer/BI has introduced substream signal processing, the problem of CPU load has disappeared and I'm now able to use a CBR setting of 8Mbps although really, I now need to go shopping for another hard drive.

Other comments:-
Unsurprisingly, for the same bitrate setting, the image gets worse if I increase the key frame rate to match the frame rate (Identical if I use Dahua's maximum reference setting of 6.144Mbps).
Surprisingly (to me), the image quality is almost the same when using h.264 compression with the same bitrate setting.
The camera's firmware version is 7/20.
Motion blur and image trails are also more pronounced with VBR, even though there's a kick in bitrate.
This VBR issue is exactly the same in my B5442E-Z4E (FW 11/19).
I didn't see that others have commented about Dahua VBR problems at 4MP.
Regardless of this issue and the other little niggles reported in other posts, I still love my 5422 series cams.

I'm kind of hoping that wopi82 will take the trouble to add some words of wisdom.
 
Joined
Dec 28, 2019
Messages
2,475
Reaction score
4,442
Location
New Jersey
I never commented on this little detail of the 5442 series, thinking it was just me or my particular installation and hardware. I have seen the exact, same, results trying to use VBR with the 5442 cameras I have, T-AS and a B-ZE. With VBR the video degrades into blocky areas rather quickly, never actually timed it, but it was very annoying. Maintaining a CBR works much, much better. Although when switching from the substream to the main stream in UI3 the video still starts out blocky but builds to full resolution over a few seconds. I'm using 15FPS, iframe at 15, 8192 for a bit rate with H265 encoding.
 
Last edited:

bigredfish

Known around here
Joined
Sep 5, 2016
Messages
5,844
Reaction score
9,375
Location
Florida USA
Ditto for my 5442 bullets both fixed, NI, and VF But then I’ve always been a CBR h.264h guy and tend to run max (well 8192 at least) bitrate and 30fps with matching Iframe. (NVR user) I may experiment with Iframe ..but have had issues especially with LPR trying to use VBR on 5231’s and an Axis cam.

BTW Nice place Dave, just like mine, only bigger, and better landscaped :rofl:
 

aristobrat

IPCT Contributor
Joined
Dec 5, 2016
Messages
2,969
Reaction score
3,097
Both the tarmac and the grass progressively become blurred. I also notice that over the one minute, the bitrate falls from over 4Mbps to approx 1Mbps. It would appear that the camera's encoder software does not satisfactorily resolve some parts of the image in this essentially static scene.
Wonder if h.264 vs h.265 plays into this? I run my two 5442s on VBR with h.264 and have never seen them go fuzzy like your example. The scenes they cover are a lot more mundane than yours, though. Also not sure if that plays into it.
 
Last edited:

Shockwave199

Getting comfortable
Joined
Mar 13, 2014
Messages
956
Reaction score
475
Location
New York
I never run vbr with anything video. Always ends like with this problem. How does the video behave when motion wakes up the bit rate? You can lose precious details in that transition as well. For me it's always CBR. Never an issue in the past or now with my 2431's.
 

biggen

Getting comfortable
Joined
May 6, 2018
Messages
813
Reaction score
785
I'm not seeing any of these VBR issues and I have three 5442s all running VBR. My IFrames are set to double the frame rate and VBR is set to the reference bit rate. Codec is H.265. I"ve noticed if I reduce the IFrame to match the frame rate, then I get a blocky "pulsating" video. But setting it to double clears it all up.
 
Joined
Apr 26, 2016
Messages
991
Reaction score
659
Location
Colorado
Another perhaps "common" camera image issue is using VBR with 4MP cameras.
I figured it was something I was doing wrong, even reported the issue to @EMPIRETECANDY but he guessed maybe a firmware issue with my camera. Glad someone mentioned this, will test that out on my 5442!
Thanks to @Dave Lonsdale & @sebastiantombs will give CBR a try on that particular camera. I mostly get that effect when the light level is kind of poor (like later afternoon indoors) or where a portion of the image is significantly darker than other parts of the image (I was trying it out pointing through the dining room [bright] and down a long hallway [mostly dark], almost like it was a WDR problem).
 

Dave Lonsdale

Getting the hang of it
Joined
Dec 3, 2015
Messages
223
Reaction score
61
Location
Congleton Edge, UK
Ditto for my 5442 bullets both fixed, NI, and VF But then I’ve always been a CBR h.264h guy and tend to run max (well 8192 at least) bitrate and 30fps with matching Iframe. (NVR user) I may experiment with Iframe ..but have had issues especially with LPR trying to use VBR on 5231’s and an Axis cam.

BTW Nice place Dave, just like mine, only bigger, and better landscaped :rofl:
Hello again bigredfish

I have checked out the image quality with your settings (actually 25fps, I have PAL) and can say that it absolutely definitely shows less detail. At 30fps there is only one third the number of data bits available for each frame when compared with 10fps. When using a CBR setting of 8192kbps, this is equivalent to only 2730kbps per frame and so you have the choice of capturing 30 "fairly good" images per second of your intruder or 10 frames per second of the best quality images (or filling up your hard drive really quickly using 20Mbps).

Also, motion blur etc is not better with your settings. Following wopi82's lead, I use (daytime) settings of shutter priority 0-5mS (far shorter than a 33.3mS frame time) and NR of only 10 (0-10mS and NR of 10 at night).

Am I overlooking something guys?
 
Last edited:

Dave Lonsdale

Getting the hang of it
Joined
Dec 3, 2015
Messages
223
Reaction score
61
Location
Congleton Edge, UK
Wonder if h.264 vs h.265 plays into this? I run my two 5442s on VBR with h.264 and have never seen them go fuzzy like your example. The scenes they cover are a lot more mundane than yours, though. Also not sure if that plays into it.
Hi aristobrat

As I mentioned, I was surprised to see that when I tried h.264 instead of h..265 with the same bitrate setting, the image quality was only slightly worse. Regarding your success with VBR, my guess is that with your scene, the bitrate does not decline very much (mine declines more than four fold). If this is the case then I don't think you're saving much hard drive space using VBR.
 

bigredfish

Known around here
Joined
Sep 5, 2016
Messages
5,844
Reaction score
9,375
Location
Florida USA
Hello again bigredfish

I have checked out the image quality with your settings (actually 25fps, I have PAL) and can say that it absolutely definitely shows less detail. At 30fps there is only one third the number of data bits available for each frame when compared with 10fps. When using a CBR setting of 8192kbps, this is only 2730kbps per frame and so you have the choice of capturing 30 "fairly good" images per second of your intruder or 10 frames per second of the best quality images (or filling up your hard drive really quickly using 20Mbps).

Also, motion blur etc is not better with your settings. Following wopi82's lead, I use (daytime) settings of shutter priority 0-5mS (far shorter than a 30mS frame time) and NR of only 10 (0-10mS and NR of 10 at night).

Am I overlooking something guys?

I dont recall even mentioning my shutter speed or motion blur, Dave? I dont use 30mS.
I actually run between 0-2mS (LPR cameras) and 0-8.33mS depending on the scene and ambient light. If blur was an issue I doubt I’d be getting great plate captures at 120ft at night with vehicle speeds at 25-30mph.
HOA Entr_EntrTag_main_20200929231319_@3.jpg

I think maybe you’re confusing FPS with shutter speed

I’m quite happy with my 5442 image quality at 8192kbps and a few at 10,240 using CBR and 1/60- - 1/120 shutter speed at 30fps
Static low light
DVR_DriveWest_main_20200518203858_@1.jpg HOA Rear_Overview_main_20200118184106_@4.jpg

Vehicles on hwy traveling at 50MPH
HOA Entr_IPC_main_20200830111209_@3.jpg HOA Entr_Entrance_main_20200919161405_@3.jpg HOA Entr_Entrance_main_20201007124445_@3.jpg HOA Entr_Entrance_main_20201009114756_@3.jpg


Go back and read what you said in your first post:
“Both the tarmac and the grass progressively become blurred. I also notice that over the one minute, the bitrate falls from over 4Mbps to approx 1Mbps.”..........
When I look really closely at the original bitmap images, the detail improves further by increasing the bitrate.


This is because VBR scales bitrate up and down depending on the complexity of the scene. That’s why your static scene slowly deteriorates over time. While it is better for storage, and theoretically can produce even higher bitrates than CBR when the scene demands it (heavy motion activity for example) the problem some of us see is the ramp up time (reaction time) from low to higher bitrate when VBR kicks in. This is especially pronounced in a dark scene running 1/2000 shutter, at extreme zoom capturing plates at 25-30mph at an angle when you will only get 3-5 frames of video to begin with.
 
Last edited:

Dave Lonsdale

Getting the hang of it
Joined
Dec 3, 2015
Messages
223
Reaction score
61
Location
Congleton Edge, UK
Hi bigredfish, I think my words may have been ambiguous - sorry for that!

My remarks about shutter speed and motion blur were merely defending the use of a frame rate of 10fps instead of 30fps and not about your other settings. I was trying to point out that regardless of the frame rate, the time the shutter is open per frame is very much shorter and therefore the frame rate is not a factor with motion blur apart from that caused by the amount of data that’s available. Please read again what I said with that in mind.

Yes, I was also trying to say the cause of the decline in image quality was the reduction in the variable bitrate - the point you have re-enforced. One additional comment in that regard (I stand to be corrected if I’m wrong) is that for Dahua cameras, the VBR can NEVER exceed the CBR figure and so your decision to use CBR in preference to VBR will always deliver the best result - a factor that I have only recently appreciated.

Sorry for the confusion, please don’t be offended.
 
Last edited:

bigredfish

Known around here
Joined
Sep 5, 2016
Messages
5,844
Reaction score
9,375
Location
Florida USA
Hi bigredfish, I think my words may have been ambiguous - sorry for that!

My remarks about shutter speed and motion blur were merely defending the use of a frame rate of 10fps instead of 30fps and not about your other settings. I was trying to point out that regardless of the frame rate, the time the shutter is open per frame is very much shorter and therefore the frame rate is not a factor with motion blur. Please read again what I said with that in mind.

Yes, I was also trying to say the cause of the decline in image quality was the reduction in the variable bitrate - the point you have re-enforced. One additional comment in that regard (I stand to be corrected if I’m wrong) is that for Dahua cameras, the VBR can NEVER exceed the CBR figure and so your decision to use CBR in preference to VBR will always deliver the best result - a factor that I have only recently appreciated.

Sorry for the confusion, please don’t be offended.
Agreed. FPS doesn’t affect image quality. No offense taken ;)

However if I can run 30fps vs 10, there are situations such as the LPR scene I described, or fine detail fast movements where I’d rather have 30 pictures to choose from vs 10, faster FPS can be preferable.

The practical benefit of VBS and lower FPS for most of us is storage at the end of the day, not image quality.
 
Top