Dahua 4k color X

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
24,437
Reaction score
47,561
Location
USA
You generally want to match the FPS and iframes. For some systems like Blue Iris, not having them match can be the difference between it capturing motion or not. It also deals with compression of the video.

This will explain H264 versus H265 a little better.

The left image is H264, so all the blocks are the same size corresponding to the resolution of the camera. H265 takes areas that it doesn't think has motion and makes them into bigger blocks and in doing so lessens the resolution. In theory H265 is supposed to need half the bitrate because of the macroblocking. But if there is a lot of motion in the image, then it becomes a pixelated mess. The only way to get around that is a higher bitrate. But if you need to run the same bitrate for H265 as you do H264, then the storage savings is zero. Storage is computed based on multiplying bitrate, FPS, and resolution.

1638584913822.png

So my one camera sees a parked car in front of my house. H265 sees that the car isn't moving, so it macroblocks almost the whole car. Now a door checker comes by and the motion is missed by the macroblock being so large. Or if it catches it, because the bitrate is low, it is a pixelated mess.

The car is clear and defined in H264, but is blurry and soft edges in H265.

H265 is one of those theory things that sounds good, but reality use is much different.
 

NightLife

Getting comfortable
Joined
Sep 10, 2021
Messages
490
Reaction score
1,096
Location
Canada
@wittaj , you rock man. Again, and again you take time to write things up in such a way that it makes brilliant sense. You should consider tech journalism :)


I always wondered why we were repeatedly steered away from using H.265. Now it's locked and loaded. Thanks!
 

ronoob

n3wb
Joined
May 6, 2020
Messages
13
Reaction score
5
Location
Romania, Cluj-Napoca
You generally want to match the FPS and iframes. For some systems like Blue Iris, not having them match can be the difference between it capturing motion or not. It also deals with compression of the video.

This will explain H264 versus H265 a little better.

The left image is H264, so all the blocks are the same size corresponding to the resolution of the camera. H265 takes areas that it doesn't think has motion and makes them into bigger blocks and in doing so lessens the resolution. In theory H265 is supposed to need half the bitrate because of the macroblocking. But if there is a lot of motion in the image, then it becomes a pixelated mess. The only way to get around that is a higher bitrate. But if you need to run the same bitrate for H265 as you do H264, then the storage savings is zero. Storage is computed based on multiplying bitrate, FPS, and resolution.

View attachment 110742

So my one camera sees a parked car in front of my house. H265 sees that the car isn't moving, so it macroblocks almost the whole car. Now a door checker comes by and the motion is missed by the macroblock being so large. Or if it catches it, because the bitrate is low, it is a pixelated mess.

The car is clear and defined in H264, but is blurry and soft edges in H265.

H265 is one of those theory things that sounds good, but reality use is much different.
Hi Wittaj!

So, based on this, are you using H264 with Color4K-X? or H265?

Thanks!
 

zexoni70

Getting the hang of it
Joined
Dec 12, 2021
Messages
96
Reaction score
83
Location
Serbia
H264 is what I use for all my cameras.
Dear @wittaj in the pictures below are also the settings in all my cameras.

H.264.jpg

But what I would ask is the setting for I Frame Interval where it offers 20 or 40, so I'm interested in which value is better and what actually changes by setting the I Frame Interval to 20 or 40 ...?

I Frame Interval.jpg

I would also ask you to explain to me the difference between AI Codec vs Smart Codec vs General i.e. which is the best to choose from the offered codec if H.264 is used as encoding mode?

Codec.jpg

Greeting and thanks! :wave:
 
Last edited:

zexoni70

Getting the hang of it
Joined
Dec 12, 2021
Messages
96
Reaction score
83
Location
Serbia
Hi @wittaj I would just have one more question for you and if you can explain to me if what is the difference in these three ways of Encoding Strategy (General, Smart Codec and AI Codec)?
Which of the three offered to choose, ie. what do you think is best and what did you choose in your camera settings?
Just to note that I own a camera IPC-HDW3849H-AS-PV-S3 and that it doesn't have that quality as your 4K Full color, so I would like to adjust it the best I can !

Encoding Strategy.jpg

Thanks and sorry if I'm boring? :) :wave:
 
Last edited:

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
24,437
Reaction score
47,561
Location
USA
The general codec is the basic codec that it will comply with your settings for variable or constant bitrate and the bitrate number.

AI codec will reduce the video bitstream for anything recorded that isn't AI triggered to save storage space. This is used primarily if you are using IVS rules.

Smart codec will reduce the video bitstream for non triggered video recording to save storage space. This is used primarily for those using smart motion detection.

Personally, I would recommend the general codec. We recommend CBR over VBR, so AI and Smart codec basically mimics VBR and as such you could miss something important.
 

flynreelow

Known around here
Joined
Dec 12, 2016
Messages
1,198
Reaction score
1,086
The general codec is the basic codec that it will comply with your settings for variable or constant bitrate and the bitrate number.

AI codec will reduce the video bitstream for anything recorded that isn't AI triggered to save storage space. This is used primarily if you are using IVS rules.

Smart codec will reduce the video bitstream for non triggered video recording to save storage space. This is used primarily for those using smart motion detection.

Personally, I would recommend the general codec. We recommend CBR over VBR, so AI and Smart codec basically mimics VBR and as such you could miss something important.

excellent info as usual.
 

ronoob

n3wb
Joined
May 6, 2020
Messages
13
Reaction score
5
Location
Romania, Cluj-Napoca
The general codec is the basic codec that it will comply with your settings for variable or constant bitrate and the bitrate number.

AI codec will reduce the video bitstream for anything recorded that isn't AI triggered to save storage space. This is used primarily if you are using IVS rules.

Smart codec will reduce the video bitstream for non triggered video recording to save storage space. This is used primarily for those using smart motion detection.

Personally, I would recommend the general codec. We recommend CBR over VBR, so AI and Smart codec basically mimics VBR and as such you could miss something important.
But then, are you recording all the time? Or only on motion detection etc?
If yes, wouldn't that eat a lot of space, especially if you have more 4k cameras?
 

zexoni70

Getting the hang of it
Joined
Dec 12, 2021
Messages
96
Reaction score
83
Location
Serbia
But then, are you recording all the time? Or only on motion detection etc?
If yes, wouldn't that eat a lot of space, especially if you have more 4k cameras?
I have five 4K cameras and I set each one to activate NVR recording on Motion Detection (MD), as I only have one 4 TB WD Purple HDD, I think in my case it is unnecessary to set the NVR to record all the time ...
 

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
24,437
Reaction score
47,561
Location
USA
Beat practice is to record 24/7 because motion detection isn't perfect and something can always happen that doesn't trigger motion detection.

I have my system dialed in pretty good but occasionally someone will have on the right mixture of clothing that the system struggles to see a person and I would have completely missed it if not for 24/7 recording.
 
Joined
Aug 8, 2018
Messages
7,386
Reaction score
25,889
Location
Spring, Texas
But then, are you recording all the time? Or only on motion detection etc?
I think in my case it is unnecessary to set the NVR to record all the time ...
There are multiple reasons that recording on motion only is not a good idea, such as not all motion in view trips the cam to record and being able to trace before and after video can be very important to understand just what went on. See these posts.


 
Top