How to understand the magic of bitrate

PFF

n3wb
Jan 9, 2020
15
6
Denmark
Yes, it feels like magic to me. I don't understand half of it, and the more I try to understand the more I misunderstand. So I turn to you for help to setup my cameras, just keep in mind that I might be a functional moron :D
I got 3 different HIKVision cameras:

DS-2CD2345FWD-I - Set to 2688 x 1520, 25 FPS and a Max Bitrate of 8192 and a Max Average Bitrate of 4096. Encoding with H.265+
DS-2CD2442FWD-IW - Set to 2688 x 1520, 20 FPS and a Max Bitrate of 16384. Encoding with H.264
DS-2CD2463G0-I - Set to 3072 x 2048, 20 FPS and a Max Bitrate of 16384 and Max Average Bitrate of 4096. Encoding with H.265+
All connected through Ethernet of course, to a Gigabit switch and recording to a Synology NAS through Surveillance Station.
How do I determine what bitrate I should run? On the first camera, there seems to be a lot of stutter when I view it on my phone through the HIK-Connect app for Android, why is that?
 
Your mileage my vary... A good starting point for cameras with the settings above

2688 x 1520, 25 FPS H.265+ ....Max Bitrate 4096 Average Bitrate of 2048.
2688 x 1520, 20 FPS H.264 .....Max Bitrate 6148
3072 x 2048, 20 FPS H.265+ ....Max Bitrate 3840 Average Bitrate of 2048.


Slightly higher/lower depending upon your requirements. Typically 10 or 15 FPS are typically adequate, but you know your requirements and needs best.

=====

Wireless/Cellular data throughput may (or may not) be as high as a locally attached PC, which could introduce the stutter on you phone.

I don't have any knowledge of the Synology solution and can't provide any assistance/insight on its configuration.


I refer to a bitrate chart which I found searching the net and have kept a copy around for new camera installations. It contains suggested/recommended settings for H.264, H.264+, H.265, and H.256+.
 

Attachments

Thanks @jmhmcse. That is the best bit rate table document I've seen yet, since it has a table for each codec.

For reference, when using Blue Iris one would typically be using H.264 (not +) in order to be compatible with Intel hardware acceleration. Using other NVRs, H.265+ is normally going to be the most efficient choice.
 
Your mileage my vary... A good starting point for cameras with the settings above

2688 x 1520, 25 FPS H.265+ ....Max Bitrate 4096 Average Bitrate of 2048.
2688 x 1520, 20 FPS H.264 .....Max Bitrate 6148
3072 x 2048, 20 FPS H.265+ ....Max Bitrate 3840 Average Bitrate of 2048.


Slightly higher/lower depending upon your requirements. Typically 10 or 15 FPS are typically adequate, but you know your requirements and needs best.

=====

Wireless/Cellular data throughput may (or may not) be as high as a locally attached PC, which could introduce the stutter on you phone.

I don't have any knowledge of the Synology solution and can't provide any assistance/insight on its configuration.


I refer to a bitrate chart which I found searching the net and have kept a copy around for new camera installations. It contains suggested/recommended settings for H.264, H.264+, H.265, and H.256+.

That's the table I usually use (Dynamic are my local supplier). I use it as a starting point as if you read the heading it details "recommended bitrate at general resolution" and I take this to mean if the compression level is set at medium - rather than higher or highest. I wouldn't use H265+ as I've found it sometimes introduces some ghosting, trails and other artefacts in the image, so I don't see the benefit of using it for bitrate or storage savings.
 
Not proficient enough to simply put a link here, but rather a cut/paste from an earlier comment I posted...

I'm having great success in using H.265+ without introducing any artifacts. My disk storage consumption is reduced by 50%+ when using H.265+ over H.254 with hardware acceleration. I'm also successful using H.264+ with hardware acceleration without any artifacts. (two newer/US HK cameras and two very old/CI HK cameras with continuous recording on them all)

Perhaps I push the envelope a bit, but then I get to reap the benefits of it too. I try not to say which combination of codecs anyone should or should not be limited to implementing. There is the simple (recommended/tried-and-true) and then there is what can be done. Whether or not someone else can replicate my success, I don't know; but it works for me.

Your mileage may vary.


This post is from nearly 8 months ago, so the time frame referenced below is now 16 months.

========================


265+ is not compatible with blue iris, not always.

I've been running 8MP HikVision cameras as H.265 with their H.265+ enabled for the past 8 months, using BI4 and now BI5.

Maybe not all cameras and not all h.265 implementations, but some do work. It's even mentioned in BI5's help support is coming if not already here.

Not all cameras or camera stream formats will be compatible with this technology. The
software will attempt to disable this feature and return to software decoding if necessary,
and this condition should be logged to the Messages page in Status. For the best chance at
compatibility, you should ensure that the stream is encoded as “simple” as possible via
direct camera settings. H.264 “main” profile without manufacturer-specific add-ons such as
+ or “smart” modes is most likely to be compatible. However as hardware decoding and
their associated drivers improve, newer encoding methods such as H.265 and “high” profiles
may also be supported soon if not today.


I understand it's best to keep things as simple as possible (KISS) in user guides and intro's, but there are also advantages to the the disk savings of 265/265+ encoding methods. It took time and I did a lot of trial and error to come up with a workable combination settings within BI to capture, record, and playback the video, but it CAN be done.

Yes, there is some CPU overhead but on a dedicated system with CPU to spare I'd rather use the CPU than buy more storage.

3840*2160, VBR, Highest quality, 12FPS, continuous record is around 20GB a day; less than half of what H.264 produced.

HV-Model-Ver-2019-06-21.png


HV-Settings-2019-06-21.png


Typical Daily Storage-2019-06-21.png



BI5 Video Settings-2019-06-21.png
 
  • Like
Reactions: bp2008
I appreciate all of your help, thanks a lot :)
I got a question though, why is it that we don't just set the bitrate to the highest possible if our cameras are connected through Ethernet? As far as I understand, Bitrate affects the quality of what is recorded, so shouldn't we want the highest quality possible?
 
Oh and side-question: Why do you not set your FPS to the highest possible? Is there something to gain there, when it comes to reviewing footage?
 
I appreciate all of your help, thanks a lot :)
I got a question though, why is it that we don't just set the bitrate to the highest possible if our cameras are connected through Ethernet? As far as I understand, Bitrate affects the quality of what is recorded, so shouldn't we want the highest quality possible?

Depending on which NVR you are using there is a maximum incoming bandwidth across all cameras. For instance on the 8 channel K series NVR it's 80Mbps and on the 16 channel it's 160Mbps. Regardless of what the tables show you'll find in practice that the IP cameras will utilise whatever bandwidth you set and usually burst above it periodically. So you need to ensure that the your total bandwidth for all cameras is below the maximum for the recorder.

With regard to the FPS I'm in agreement. While many will say 10 or 12 FPS is sufficient, I prefer to record at full frame rate. Hard disk space is relatively cheap and so as long as the recorder can handle the total bandwidth I'll record full frame. It may be that someone up to no good in view of one of your cameras may only turn to face the camera momentarily, so you've more chance of capturing that face when recording full frame. In such a case shutter speed is just as or more important to ensure that the captured still is clear. Some of the Hikvision models (the new Color Vu for example) default to 1/12 second shutter speed so it's important to ensure that minimum shutter speed > FPS. Some using Blue Iris or other software may be restricted by the PC hardware they are using and so record at lower frame rates for that reason.
 
I also use high bitrate and high fps rate, as I use my cameras mainly to record wildlife so picture quality is most important for me. But yeah storage space is the downside...I don’t even get an hour with each 4gb file :)

I am using Blue Iris. Maybe worth pointing out that whilst Blue Iris does struggle to display full fps live, especially with multiple cameras/windows on screen, it does record the stream fine for later playback (at full fps).
 
Like most things in life, it depends on =your= wants and needs vs affordability; it's a balance. My posted settings work fine for me.

As noted earlier.... "Your mileage my vary... A good starting point ". These are only recommendations and suggestions, accept or decline as you wish.
 
Depending on which NVR you are using there is a maximum incoming bandwidth across all cameras. For instance on the 8 channel K series NVR it's 80Mbps and on the 16 channel it's 160Mbps. Regardless of what the tables show you'll find in practice that the IP cameras will utilise whatever bandwidth you set and usually burst above it periodically. So you need to ensure that the your total bandwidth for all cameras is below the maximum for the recorder.

With regard to the FPS I'm in agreement. While many will say 10 or 12 FPS is sufficient, I prefer to record at full frame rate. Hard disk space is relatively cheap and so as long as the recorder can handle the total bandwidth I'll record full frame. It may be that someone up to no good in view of one of your cameras may only turn to face the camera momentarily, so you've more chance of capturing that face when recording full frame. In such a case shutter speed is just as or more important to ensure that the captured still is clear. Some of the Hikvision models (the new Color Vu for example) default to 1/12 second shutter speed so it's important to ensure that minimum shutter speed > FPS. Some using Blue Iris or other software may be restricted by the PC hardware they are using and so record at lower frame rates for that reason.

I think you have a slight misunderstanding of how these work. The frame rate does not have an effect on storage consumption as your implying. Your bit rate is what determines storage consumption. 10-15 FPS isn’t suggested as “good enough” it’s actually better! When you change your FPS, your just changing how your bandwidth is divided up. Dropping from 30 FPS to 15 FPS you have effectively doubled the amount of data in each frame making for a better still image. Also, running your cameras at full frame rate is taxing its resources. The processor in the camera is having to work harder, and can cause freezing in your footage. When I first started doing this, I had the same mentality. I ran all my cameras at full frame rate, and was unaware of the bandwidth setting and it effect, leaving it at the default value. I had many issues during my trial and error period of about a year. Now after several years, and several systems installed, I have learned to keep the frame rate low, (15) and max out the bit rate. Don’t worry about mobile viewing, that’s why we have dual streams! And don’t exceed around 80% of the recorders total bandwidth capacity. You need a little room for overhead when the camera spikes it’s bit rate due to motion. Those spikes will cause the footage to freeze because you have maxed out or even exceeded the max bandwidth of the recorder
 
I think you have a slight misunderstanding of how these work. The frame rate does not have an effect on storage consumption as your implying. Your bit rate is what determines storage consumption. 10-15 FPS isn’t suggested as “good enough” it’s actually better! When you change your FPS, your just changing how your bandwidth is divided up. Dropping from 30 FPS to 15 FPS you have effectively doubled the amount of data in each frame making for a better still image. Also, running your cameras at full frame rate is taxing its resources. The processor in the camera is having to work harder, and can cause freezing in your footage. When I first started doing this, I had the same mentality. I ran all my cameras at full frame rate, and was unaware of the bandwidth setting and it effect, leaving it at the default value. I had many issues during my trial and error period of about a year. Now after several years, and several systems installed, I have learned to keep the frame rate low, (15) and max out the bit rate. Don’t worry about mobile viewing, that’s why we have dual streams! And don’t exceed around 80% of the recorders total bandwidth capacity. You need a little room for overhead when the camera spikes it’s bit rate due to motion. Those spikes will cause the footage to freeze because you have maxed out or even exceeded the max bandwidth of the recorder

No I don't misunderstand how they these work, I've been installing CCTV since 1993 and IP systems since around 2004. Of course it's bit rate that determines storage consumption. However you wouldn't increase the frame rate without also increasing the bit rate to suit to avoid degradation of the image quality, so indirectly frame rate will affect storage. Granted it's not a linear function and doubling the frame rate will not double bandwidth as this is dependant on I frame interval, compression level, complexity of the scene, noise in low light etc. That is why tables are available with recommended bit rates for a given resolution and frame rate, but should only be used as a guide.

10-15 FPS is better than 25FPS? No it is not. Yes you'll get a better still image if you divide less frames into a given bit rate however you should chose your frame rate to suit your capture requirements. My requirement is that I record at full frame rate. If someone moves through the field of view of a camera in 2 seconds and glances toward it briefly, I'd rather have 50 frames than 20 to chose the best still, for a shot at identification. Increasing the bit rate way beyond those in the manufacturers guidelines is a waste of time. You'll be unlikely to see a discernible difference in the captured still - believe me your eyes are not that good. I've tried this with identical cameras viewing the same scene. Maxing out the bit rate will tax a cameras resources far more than running it at full frame at the recommended settings. Furthermore you'll quickly exceed the NVR's maximum bandwidth.
 
  • Like
Reactions: bigredfish
It’s hard to say that you won’t see a difference with higher bit rate beyond a certain level... as others have stated, it’s really up to each ones needs. I can create a scenario for you where you can in fact see a difference in clarity all the way up the the max supported bit rate of a particular camera. Just try viewing it on a larger screen. The higher bit rates help to support that. If your viewing on an average size computer monitor, say 22”, you will in fact reach a point where you can’t notice a difference beyond a certain bitrate. Now display that on a 65” television! You can go back to the camera and start bumping the bit rate up and see the difference once again. For that reason, why not max out your cameras bit rate. Why limit yourself. You never know what you will be viewing your footage on when the time comes. And like you said, storage is cheap