h264 vs h265

Miacomo

n3wb
Joined
Oct 9, 2022
Messages
23
Reaction score
7
Location
Pennsylvania
What's everyone running and why? 264 vs 265. The pros and cons of them. I'm currently running 265 main stream and 264 for sub
 

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
25,141
Reaction score
49,011
Location
USA
If you are using BI or an NVR, you need to match codec for main and sub.

Obviously every field of view is different and some use H265 without issue, but most of us have found H264 to be better.

This will explain H264 versus H265 a little better.

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. 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 and then it stutters.

In theory it is supposed to need 30% less storage than H264, but most of us have found it isn't that much. Mine was 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 yet increases the CPU demand to develop these larger blocks.

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.

1665527014622.png

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, but you stand a better chance 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.

As always, YMMV.
 

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
25,141
Reaction score
49,011
Location
USA
For many of us yes that is the case. But it does come down to your field of view and how hard you are driving the camera.
 
Top