H.264 vs H.264+ vs H.265 vs H.265+

Joined
Jul 27, 2024
Messages
6
Reaction score
3
Location
USA
I own a few Annke cameras and Annke NVR. Originally I selected H.265+ for all cameras as I believed it is the most efficient codec. However, I am wondering if perhaps this is causing issues with Motion Detect and Smart Detect, especially at night. They work really well during the day but struggle at night.

So I decided to downgrade to H.264 and see if it helps or not.

What are people's experience with these codecs in terms of detection and video storage? Which one do most people use?

Thanks!
 

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
26,512
Reaction score
51,810
Location
USA
This will explain H264 versus H265 a little better and show why you may be experiencing issues at night.

H265 in theory provides more storage as it compresses differently, but part of that compression means it macro blocks big areas of the image that it thinks isn't moving. That can be problematic for digital zooming with H265.

However, it also takes more processing power of the already small CPU in the camera and that can be problematic if someone is maxing out the camera in other areas like FPS and then it stutters.

Further some cameras can handle H265 better than others, even if the camera "claims" to support it.

In theory it is supposed to need 30% less storage than H264, but most of us have found it isn't that much. My savings were less than few minutes per day. And to my eye and others that I showed clips to and just said do you like video 1 or video 2 better, everyone thought the H264 provided a better image.

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 those larger blocks yet increases the camera CPU demand to develop these larger blocks.

1667974399793.png


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 essentially zero.


In my testing I have one camera that sees a parked car in front of my house. H265 sees that the car isn't moving, so it macroblocks the whole car and surrounding area. Then the car owner walked up to the car and got in and the motion is missed because of the macroblock being so large. Or if it catches it, because the bitrate is low, it is a pixelated mess during the critical capture point and by the time H265 adjusts to there is now motion, the ideal capture is missed.

In my case, the car is clear and defined in H264, but is blurry and soft edges in H265.

Digital zooming is never really good and not something we recommend, but you stand a better chance of some digital zoom with H264 rather than a large macroblocked H265. I can digital zoom on my overview camera and kinda make out the address number of the house across the street with H264, but not a chance with H265 as it macroblocked his whole house.

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

Some people have a field of view or goals that allow H265 to be sufficient for their needs.

As always, YMMV.
 
Joined
Jul 27, 2024
Messages
6
Reaction score
3
Location
USA
This will explain H264 versus H265 a little better and show why you may be experiencing issues at night.

H265 in theory provides more storage as it compresses differently, but part of that compression means it macro blocks big areas of the image that it thinks isn't moving. That can be problematic for digital zooming with H265.

However, it also takes more processing power of the already small CPU in the camera and that can be problematic if someone is maxing out the camera in other areas like FPS and then it stutters.

Further some cameras can handle H265 better than others, even if the camera "claims" to support it.

In theory it is supposed to need 30% less storage than H264, but most of us have found it isn't that much. My savings were less than few minutes per day. And to my eye and others that I showed clips to and just said do you like video 1 or video 2 better, everyone thought the H264 provided a better image.

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 those larger blocks yet increases the camera CPU demand to develop these larger blocks.

1667974399793.png


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 essentially zero.


In my testing I have one camera that sees a parked car in front of my house. H265 sees that the car isn't moving, so it macroblocks the whole car and surrounding area. Then the car owner walked up to the car and got in and the motion is missed because of the macroblock being so large. Or if it catches it, because the bitrate is low, it is a pixelated mess during the critical capture point and by the time H265 adjusts to there is now motion, the ideal capture is missed.

In my case, the car is clear and defined in H264, but is blurry and soft edges in H265.

Digital zooming is never really good and not something we recommend, but you stand a better chance of some digital zoom with H264 rather than a large macroblocked H265. I can digital zoom on my overview camera and kinda make out the address number of the house across the street with H264, but not a chance with H265 as it macroblocked his whole house.

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

Some people have a field of view or goals that allow H265 to be sufficient for their needs.

As always, YMMV.
Thanks for your detailed reply. In that case, what about H264 vs H264+?
 

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
26,512
Reaction score
51,810
Location
USA
Thanks for your detailed reply. In that case, what about H264 vs H264+?
It is best to not use the + codec. Stick with straight H264 or H264H.

Anything else has been shown to be problematic in many instances.
 
Joined
Jul 27, 2024
Messages
6
Reaction score
3
Location
USA
So Also H264+...

You didn't wrote what exactly problems You have..
Main issue is that motion detect & smart detect seem to struggle at night as in not detecting events. I read that sometimes H265 contributes to this issue due to compression losses.
 

JanJ

Young grasshopper
Joined
Aug 16, 2023
Messages
30
Reaction score
6
Location
Waynesville, NC
I did a test with HikVision cams a couple years ago... didn't like results of 265 or + of either...
I'm using Synology's Surveillance Station and individual cameras... No DVR...
Well, then Synology came out the Advanced Media Extentions.... Game Changer...
Now H265 is used without an issue.... and I swear those cameras still using H264 are improved with AME install too!!!
Yes I'm using Highest available quality, frame rate, and bit rate.... Because I'm interested in best quality image
$.02
 
Joined
Apr 11, 2020
Messages
706
Reaction score
847
Location
Poland/Portugal
Main issue is that motion detect & smart detect seem to struggle at night as in not detecting events. I read that sometimes H265 contributes to this issue due to compression losses.
If the problem is with detection (not replaying) then in 99% cases is this bad configuration, weak camera AI function or simply bad video quality at night..

show here a few screenshots how NOT detected people looks at night via this camera..
 
Top