Video Quality and Max Bitrate interplay

pjl

n3wb
Joined
Nov 18, 2019
Messages
8
Reaction score
0
Location
California, USA
I have Hikvision DS-2CD2H45FWD-IZS cameras and am using SecuritySpy on a Mac Mini. The video cameras settings contain:

  • Resolution: 2688 x 1520
  • Bitrate Type: Variable
  • Video Quality: Medium
  • Frame Rate: 15fps
  • Max Bitrate: 3072 Kbps
The Max Bitrate strikes me as odd. For a fixed resolution and frame rate, I assume "Medium" quality affects how much compression is done (where, naturally, lower quality = higher lossy compression). Anyway, for said resolution, frame rate, and quality, I'd assume there would be a theoretical "natural" maximum bitrate that the camera would "want" to send if the Max Bitrate value were either infinite or just greater that the "natural" bitrate.

But what happens when the value of Max Bitrate is less than the "natural" bitrate? How does the camera just "throw away" bits? Wouldn't that effectively be a lower Video Quality?

Why is there a Max Bitrate setting at all? Why isn't Video Quality enough?
 

Parley

Known around here
Joined
Dec 19, 2015
Messages
5,661
Reaction score
16,173
Location
Cypress, California
I always run best quality for my cameras. I just by larger capacity TB hard disk drives for the storage. :) If bits are "thrown" away then the picture quality suffers. I was watching the bit rate on my new 4K PTZ camera and it was all over the place. Jumping from a low of around 7000KPS to maybe 24,000KPS. I think I settled on a maximum bitrate of 12, 400. Picture seems to be fine. If I was you I would up the bitrate to at least something in the 4000 range. By the way how does the video look?
 

pjl

n3wb
Joined
Nov 18, 2019
Messages
8
Reaction score
0
Location
California, USA
That doesn't really answer my question. I'm asking how Video Quality interplays with Max Bitrate specifically.
 

bigredfish

Known around here
Joined
Sep 5, 2016
Messages
17,727
Reaction score
49,327
Location
Floriduh
One of the more knowledgeable HiK guys will stop by and probably know, but a guess is "Video Quality" is compression, bitrate is well, bitrate.

Agree with @Parley in that I tend to run max bitrate within reason, and do, especially at night, see a difference between ay 4096 and 8192.
 

Robert G.

Getting comfortable
Joined
Oct 6, 2018
Messages
298
Reaction score
569
Location
North America
I'm going to take a shot at this question, hopefully you will not take my attempt to answer with the tone you replied to @Parley with.

While I may not answer exactly 'I'm asking how Video Quality interplays with Max Bitrate specifically. ' I will share my two cents.

Video quality is how much compression the camera is performing on the data available.

Max Bitrate sets a limit on the bitrate. If you drop the bit rate way down and there is a lot of movement in the video from frame to frame, it will be all pixelated. A high bitrate is needed when there is a lot of change from frame to frame.

Video quality is compression of the bits available, if you have high quality but a low bitrate it is still going to look like crap as there are just not enough bits to work with.

That is my attempt to answer, I will not reply to this thread again as I don't get into fights online.
 

RubberDucky

Young grasshopper
Joined
Jan 8, 2020
Messages
30
Reaction score
9
Location
Canada
The OP tone seemed fine to me. Methinks some do protest too much.

Anyway, I can't comment on hikvision cameras specifically but quality is different than bitrate. Size of macro blocks, range of motion estimation, slice usage, how adjacent frames are used, quantization levels, specific algorithms, and other parameters are hidden inside the "quality" choice. The "natural" bit rate resulting from these choices can vary hugely and as the data changes so bitrate is used to control this. The encoder is constantly monitoring the resultant bitrate and adjusting its parameters accordingly. Even then not all parameters will be dynamically adjusted. Some have limits on the rate or range of adjustment and others are fixed by the chosen quality level so one can see different effects at the same bitrate depending on the dataset and initial quality settings.

In the end you need both, setting one doesn't define the other.
 
Last edited:

fullboogie

Getting the hang of it
Joined
Mar 4, 2019
Messages
157
Reaction score
85
Location
Texas
OP, keep in mind that max bitrate is only a ceiling, it does not force the NVR to record at that bitrate. You can see that by fiddling with the settings and then real time monitoring a camera's usage. I think the max bitrate setting is for those using lower quality NVR's, like the "K" series, and very high resolution cams that end up overwhelming the capabilities of the NVR. Setting the max bitrate on those cams to something lower can solve some of those problems.
 

bp2008

Staff member
Joined
Mar 10, 2014
Messages
12,681
Reaction score
14,043
Location
USA
VBR = Variable Bit rate

The idea behind VBR is to have the encoder produce a constant quality stream by automatically varying the bit rate up or down as needed depending on how much detail and activity there is in the scene. It is fairly unpredictable how much bit rate will be needed. So the max bit rate setting is like a safety limit. It is a way to make sure the bit rate never reaches a level your system would not be able to handle.

The Max Bitrate strikes me as odd. For a fixed resolution and frame rate, I assume "Medium" quality affects how much compression is done (where, naturally, lower quality = higher lossy compression). Anyway, for said resolution, frame rate, and quality, I'd assume there would be a theoretical "natural" maximum bitrate that the camera would "want" to send if the Max Bitrate value were either infinite or just greater that the "natural" bitrate.
Yes, but it is fairly unpredictable how much bit rate the camera will want to use. For example if you pointed the camera at a blank white wall, evenly lit, it might produce a 100 Kbps stream. But then if someone walked straight in front of the camera up close, the bit rate could suddenly surge up to several Mbps.

But what happens when the value of Max Bitrate is less than the "natural" bitrate? How does the camera just "throw away" bits? Wouldn't that effectively be a lower Video Quality?
Yes, if the camera can't reach its quality target while staying within the max bit rate, then the max bit rate takes precedence. The resulting quality will be lower than the quality target.

Why is there a Max Bitrate setting at all? Why isn't Video Quality enough?
Because sometimes you really need to ensure your bit rate doesn't exceed a certain amount. For example if you are sending the video over a slow connection, or if your NVR has a limit on input bit rate, or if you have a contractual obligation to provide X days of recording, etc.
 
Top