H.264H vs H.265

Rebelx

Getting the hang of it
Joined
Jul 28, 2019
Messages
217
Reaction score
91
Location
Australia
HI guys, Newb here. I have a Dahua (OEM) 4208 NVR and 4 POE 2mp starlight cams.

Which of the above codecs should I use? I get about 3 weeks of recording in my 8tb drive.

Thanks heaps!
 

Q™

IPCT Contributor
Joined
Feb 16, 2015
Messages
4,990
Reaction score
3,989
Location
Megatroplis, USA
There's a more than H.264H vs H.265 to consider when determining how long it's going to take to fill your archival video drive, For example...

 

Rebelx

Getting the hang of it
Joined
Jul 28, 2019
Messages
217
Reaction score
91
Location
Australia
Thanks heaps @qtm.

What would you suggest for
1. Best quality?
2. Most efficient use of space?
3. Balance of above?

Thanks.
 

bp2008

Staff member
Joined
Mar 10, 2014
Messages
12,666
Reaction score
14,006
Location
USA
Use H.265 unless you encounter a problem doing so. H.265 is supposed to offer better compression ratios (better quality, smaller files, or even both at the same time!). I'm not aware of any reasons not to when using a compatible NVR.

You'll find lots of advice around this forum saying to use H.264, but that is specifically in regards to Blue Iris software, which you are not using.
 

RainerT

Young grasshopper
Joined
Apr 6, 2018
Messages
32
Reaction score
6
Use H.265 unless you encounter a problem doing so. H.265 is supposed to offer better compression ratios (better quality, smaller files, or even both at the same time!). I'm not aware of any reasons not to when using a compatible NVR.

You'll find lots of advice around this forum saying to use H.264, but that is specifically in regards to Blue Iris software, which you are not using.
Is not using h265 still valid for Blue Iris?
 

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
24,436
Reaction score
47,561
Location
USA
You can use H265, just don't use any codec.

But a lot here find that H264 provided a better image due to the macroblocking of H265, especially if you try to digital zoom.
 

RainerT

Young grasshopper
Joined
Apr 6, 2018
Messages
32
Reaction score
6
Matching fps and Iframe still a good idea?
I do 15 FPS 15 Iframe.
 

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
24,436
Reaction score
47,561
Location
USA
Yes, matching FPS and iframe is still best practice, even more so if you are using Deepstack or CodeProject.
 

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
24,436
Reaction score
47,561
Location
USA
Also keep in mind that for UI3, direct to wire only works with H264. That may or may not be of concern to you.
 

RainerT

Young grasshopper
Joined
Apr 6, 2018
Messages
32
Reaction score
6
Yes, matching FPS and iframe is still best practice, even more so if you are using Deepstack or CodeProject.
Is 15 good for 4mp Dahua?
Also is there a golden middle for. Bit rate?
 

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
24,436
Reaction score
47,561
Location
USA
15 FPS is fine. Shutter speed is more important than FPS.

Most start 4MP bitrate at 8192 and then adjust based on field of view.
 

RainerT

Young grasshopper
Joined
Apr 6, 2018
Messages
32
Reaction score
6
15 FPS is fine. Shutter speed is more important than FPS.

Most start 4MP bitrate at 8192 and then adjust based on field of view.
Any tips on shutter speed settings?
On my own Dahua I have always had auto
 

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
24,436
Reaction score
47,561
Location
USA
You do not want to run these cameras on auto/default settings. When the perp comes by in the middle of the night, auto settings will fail you. That is not as good as it gets.

Here is my "standard" post that many use as a start for dialing in day and night that helps get the clean captures. These are done within the camera GUI thru a web browser.

Every field of view is different, but I have found you need contrast to usually be 6-8 higher than the brightness number at night.

We want the ability to freeze frame capture a clean image from the video at night, and that is only done with a shutter of 1/60 or faster. At night, default/auto may be on 1/12s shutter or worse to make the image bright.

In my opinion, shutter (exposure) and gain are the two most important parameters and then base the others off of it. Shutter is more important than FPS. It is the shutter speed that prevents motion blur, not FPS. 15 FPS is more than enough for surveillance cameras as we are not producing Hollywood movies. Match iframes to FPS. 15FPS is all that is usually needed.

Many people do not realize there is manual shutter that lets you adjust shutter and gain and a shutter priority that only lets you adjust shutter speed but not gain. The higher the gain, the bigger the noise and see-through ghosting start to appear because the noise is amplified. Most people select shutter priority and run a faster shutter than they should because it is likely being done at 100 gain, so it is actually defeating their purpose of a faster shutter.

Go into shutter settings and change to manual shutter and start with custom shutter as ms and change to 0-8.3ms and gain 0-50 (night) and 0-4ms exposure and 0-30 gain (day)for starters. Auto could have a shutter speed of 100ms or more with a gain at 100 and shutter priority could result in gain up at 100 which will contribute to significant ghosting and that blinding white you will get from the infrared or white light.

Now what you will notice immediately at night is that your image gets A LOT darker. That faster the shutter, the more light that is needed. But it is a balance. The nice bright night static image results in Casper blur and ghost during motion LOL. What do we want, a nice static image or a clean image when there is motion introduced to the scene?

In the daytime, if it is still too bright, then drop the 4ms down to 3ms then 2ms, etc. You have to play with it for your field of view.

Then at night, if it is too dark, then start adding ms to the time. Go to 10ms, 12ms, etc. until you find what you feel is acceptable as an image. Then have someone walk around and see if you can get a clean shot. Try not to go above 16.67ms (but certainly not above 30ms) as that tends to be the point where blur starts to occur. Conversely, if it is still bright, then drop down in time to get a faster shutter.

You can also adjust brightness and contrast to improve the image.

You can also add some gain to brighten the image - but the higher the gain, the more ghosting you get. Some cameras can go to 70 or so before it is an issue and some can't go over 50.

But adjusting those two settings will have the biggest impact. The next one is noise reduction. Want to keep that as low as possible. Depending on the amount of light you have, you might be able to get down to 40 or so at night (again camera dependent) and 20-30 during the day, but take it as low as you can before it gets too noisy. Again this one is a balance as well. Too smooth and no noise can result in soft images and contribute to blur.

Do not use backlight features until you have exhausted every other parameter setting. And if you do have to use backlight, take it down as low as possible.

After every setting adjustment, have someone walk around outside and see if you can freeze-frame to get a clean image. If not, keep changing until you do. Clean motion pictures are what we are after, not a clean static image.
 

RainerT

Young grasshopper
Joined
Apr 6, 2018
Messages
32
Reaction score
6
I can not think in ms. What is the shutter equivalent?
 

Alaska Country

Getting comfortable
Joined
Jun 10, 2021
Messages
437
Reaction score
632
Location
Alaska
The easy way to use is to do a conversion using the number 1000. Just divide the denominator (bottom number of the fraction) of the shutter speed into 1000.

To find the ms of a shutter speed of 1/100 simply divide 1000 by 100 which is equal to 10 ms. For 1/500 of a second shutter speed then 1000/500 is equal to 2 ms. For 1/8 of a second shutter, then 1000/8 is equal to 125 ms (too slow to stop any motion)

To stop movement, a higher shutter speed is desirable. A 125 ms (1/8) speed is too long for any action shots. A 10 ms (1/100) shutter would be better, with 4 ms (1/250) being a good goal depending on lighting conditions. If doing LPR, then 1 ms (1/1000) or .5 ms (1/2000) for night images are useable shutter speeds for this application.
 

RainerT

Young grasshopper
Joined
Apr 6, 2018
Messages
32
Reaction score
6
So if I do range on shutter speed it will act like auto but only in the specific range?
 
Top