CBR vs VBR recorded video quality

Which encoding method gives better quality recorded video?

  • CBR

    Votes: 22 55.0%
  • VBR

    Votes: 18 45.0%

  • Total voters
    40

ermac

Getting the hang of it
Jun 21, 2018
105
45
London and South Africa
I am sure this topic has been discussed before, but could not find any previous posts here. Security industry white-papers and professional installers both make their cases for either CBR or VBR to record video files.

So storage space and bandwidth aside, I am interested to hear your thoughts purely from a quality perspective on recorded video. Which encoding method will give a higher quality recorded video file, CBR or VBR?

Lets say two exact 2mp cams are looking at the same scene and both are recoding at a resolution of 1080p, with a frame rate set to 30/25 fps.

One has its bitrate set to CBR at 6144 kb/s, the other has bitrate set to VBR at 6144 kb/s and quality level 6 (highest quality VBR setting on Dahua systems).

Which recoding will give the best quality video if 6144 kb/s is the highest kb/s available for both CBR and VBR on this example system.

(Usually as the default, 1080p records at 4096 kb/s, and on Dahua systems the default encoding is CBR).

Looking forward to hearing your thoughts... :)
 
Whichever method produces the highest bit rate, and therefore the largest files, will be the best quality. It is as simple as that. Given an equal bit rate limit, and assuming no bugs in the encoder, CBR (Constant Bit Rate) will always produce equal or better quality than VBR (Variable Bit Rate), because VBR allows the camera to reduce the bit rate if it thinks it can meet your quality goal with less data. This is good for saving space, but not so good if you want the best quality without any compromises.

Some Dahua cameras are capable of going way beyond their normal bit rate limits if you use the ROI (Region of Interest) feature. Basically this feature lets you draw one or more rectangles on the video frame and tell the camera to encode these regions at a specific quality. However I've noticed that this feature bypasses the bit rate limit which is otherwise fairly low on many Dahua cameras. For example I have a particular starlight camera I use as a weather cam and I want the absolute best possible video quality from it, but the highest bit rate it allows at 15 FPS is 5888 Kbps. So what I did was enable the ROI feature and draw just one region across the entire video frame and set it to max quality. As a result the camera regularly encodes above 10 Mbps at night (when there is more noise) and sometimes closer to 20 Mbps!

upload_2018-10-22_8-59-10.png
 
  • Like
Reactions: ermac
Some Dahua cameras are capable of going way beyond their normal bit rate limits if you use the ROI (Region of Interest) feature. Basically this feature lets you draw one or more rectangles on the video frame and tell the camera to encode these regions at a specific quality. However I've noticed that this feature bypasses the bit rate limit which is otherwise fairly low on many Dahua cameras. For example I have a particular starlight camera I use as a weather cam and I want the absolute best possible video quality from it, but the highest bit rate it allows at 15 FPS is 5888 Kbps. So what I did was enable the ROI feature and draw just one region across the entire video frame and set it to max quality. As a result the camera regularly encodes above 10 Mbps at night (when there is more noise) and sometimes closer to 20 Mbps!

View attachment 34377


does ROI of 6 make a difference if the VBR quality is set to 6 (highest) ?
 
Hi all. I have IPC-HDW5231R-ZE and it is set to h264 CBR 720p/bitrate 5k. I use it for church masses streaming. Example here . I tried use VBR with quality 6(best) and max bitrate 5k and picture was much worse with low bitrate. So I returned back to CBR because it is visibly better. Just my 2 cents.
 
Last edited:
For LPR when capturing a plate in a scene that is only 15ft wide at 120ft, and you only get 4-5 frames, I prefer CBR and 30fps.
 
The picture of the church, is very complex, it has a lot of color differences, light changing and small motions. This is a great place to test camera compression and video quality. The video compression has the most amount of problems with this type of picture.
 
It is now 2025,

In my experience, VBR is overrated for surveillance. It demands extra chipset resources to decide bitrate on the fly, and camera/NVR chipsets are still a weak point. Because VBR must calculate the “right” bandwidth in real time, it can momentarily allocate too little—skipping crucial details when something appears and disappears quickly. For surveillance, that makes the camera effectively useless.

If, like me, you use cameras for security, you need them to capture everything they can. VBR might make sense for long, mostly static scenarios—say, monitoring a bird’s nest for a month—but if you want the safest high quality for zooming, CBR is my go-to.

I’ve seen VBR react too slowly, so important frames take time to sharpen. Streaming in 4K doesn’t fix that: even at 16× zoom, you might miss a small object someone reveals and hides within a second.

Many 4K surveillance camera chipsets have limited processing headroom, and real-time VBR can stress the encoder, compromising quality during rapid motion.

Case study: a 4K camera with VBR faces a road. A car blasts past. The chipset may not raise bitrate fast enough to preserve plate details. Same risk with people sprinting.
CBR, by contrast, keeps a constant bitrate, maintaining image fidelity during rapid or fleeting motion.
 
Last edited:
  • Like
Reactions: bigredfish
But why use H265+ as that requires additional processing demands on already undersized processors and macroblocking will result in similar issues to VBR of the camera not adjusting fast enough.
 
  • Like
Reactions: bigredfish
^^^^^
This

Switch to h.264H and get better quality
 
H264 CBR here on 30+ cameras, all set at a high enough bitrate to get clean imaging.

I also run a periodic script to set bitrate on my cameras in case a power off/on resets the rates. Dahuas seem to revert to a ridiculous, lower bitrate if they lose power despite setting (and storing) bitrate higher.

If overall data rate seems too much, just get bigger storage drives. A two drive RAID of 24 TB drives does it nicely for 24 hours continuous plus motion recordings here. I don't have to worry about the cameras generating too much data.
 
But why use H265+ as that requires additional processing demands on already undersized processors and macroblocking will result in similar issues to VBR of the camera not adjusting fast enough.
I have done some tests with H265+ and I don't understand why, but when i zoom in
But why use H265+ as that requires additional processing demands on already undersized processors and macroblocking will result in similar issues to VBR of the camera not adjusting fast enough.
here is the whitepaper about this proprietary technology H265+ by hikvision.
It is just well optimized!


h265+ CBR vs VBR

I quote:
 Constant Bitrate Control
With H.265+ on, the average bitrate can be kept as thehalf value of the Max. bitrate (take the office surveillance as the example, the actual bitrate reduction rate may vary with different surveillance scenes) and the image quality can be optimized since the H.265+ technology makes full use of every bit.

 Variable Bitrate Control

In the variable bitrate mode, the instant bitrate varies according to the scene busyness,while the image quality is steady. When H.265+ is on, the bitrate change can be divided into two cases. If the set average bitrate value is limited, the H.265+ encoding can provide a better image quality with the limited bitrate. If the set average bitrate value is high for the monitoring scene, the actual average bitrate can be lower than the predefined value, thus the storage can be saved.
 
That whitepaper is just marketing stuff.

SmartCodec (+ variants) can create lots of problems with playback / search - many have seen it jumps and skips over time, plus it is proprietary to the manufacturer and can be problematic with other VMS systems.

Most of us have found H265 in these cameras suck.

H265 in theory provides more storage as it compresses differently, but part of that compression means it "macro blocks" (technically coding tree units) 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, it may actually do a very poor job with 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. For some cameras that then becomes problematic to do other functions as the little processor is now maxed out.

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.

Third party VMS systems do better with H264. That is the tried and true standard. H264H is ok as well.

As always, YMMV.
 
  • Like
Reactions: bigredfish
IMHO
At the level we are operating at, any tech that has a primary purpose of reducing storage needs vs improving image quality is fucking joke. HD space is cheap relative to TCO and an unnecessary distraction.

Now if you’re running a system with 200-300+ cameras it may have more validity, so you two dozen people out of the 180,000 members can ignore this