50+ cam install. Ideal video settings?

loudog212

Getting the hang of it
Dec 8, 2016
19
26
Lanc, PA
On a bigger camera job with a purpose built NVR (LTS/Hikvision). What are ideal stream settings?
H264 vs H265?
FPS, iframe, VBR/CBR and bit rate?

Thank you.
 
  • Like
Reactions: mat200
I found this table from Hikvision on their recommended bit rate based on resolution and fps (Hikvision pdf). There are separate tables for H.264 and H.265. For smoother video, I think you want to stay above 20 fps, preferably 25 fps (the standard for TV in Europe and Asia) or even 30 fps (the standard for TV in North America and Japan).

The i-frame rate is how often the camera takes the entire image as opposed to just the parts of the image where things are moving--here is an explanation I found helpful (use-ip forum posting). I've seen two schools of thought on this. As @wittaj reports, some people set it at the same value as their fps. This will ensure that the camera takes the full image once per second and will improve the video quality. This requires more bandwith and storage capacity, so alternatively, others set it at twice the fps value. So in @wittaj's example of 15 fps, i-frame rate would be 30.

I am interested in hearing others thoughts on this topic. I have several cameras set to 30 fps but I am wonder if this is really necessary as it is taxing my cpu. I think 25 fps would be fine given that it is the TV standard in Europe. For other cameras, I have 20 fps. I am concerned that 15 fps would make it impossible to identify the delinquent teenagers who occasionally trespass on my property.
 
I found this table from Hikvision on their recommended bit rate based on resolution and fps (Hikvision pdf). There are separate tables for H.264 and H.265. For smoother video, I think you want to stay above 20 fps, preferably 25 fps (the standard for TV in Europe and Asia) or even 30 fps (the standard for TV in North America and Japan).

The i-frame rate is how often the camera takes the entire image as opposed to just the parts of the image where things are moving--here is an explanation I found helpful (use-ip forum posting). I've seen two schools of thought on this. As @wittaj reports, some people set it at the same value as their fps. This will ensure that the camera takes the full image once per second and will improve the video quality. This requires more bandwith and storage capacity, so alternatively, others set it at twice the fps value. So in @wittaj's example of 15 fps, i-frame rate would be 30.

I am interested in hearing others thoughts on this topic. I have several cameras set to 30 fps but I am wonder if this is really necessary as it is taxing my cpu. I think 25 fps would be fine given that it is the TV standard in Europe. For other cameras, I have 20 fps. I am concerned that 15 fps would make it impossible to identify the delinquent teenagers who occasionally trespass on my property.

It is shutter speed that matters, not FPS.

I capture license plates of cars going 45mph with 8FPS because I have the shutter speed set to be able to capture freeze frame images.

My cameras are running between 8FPS and 15FPS and you probably know I share many pictures of catching perps and door checkers. Running half the FPS also allows for more storage.

Sure 30FPS can provide a smoother video but no police officer has said "wow that person really is running smooth". They want the ability to freeze frame and get a clean image. So be it if the video is a little choppy....and at 10-15FPS it won't be appreciable. My neighbor runs his at 60FPS, so the person or car goes by looking smooth, but it is a blur when trying to freeze frame it because the camera can't keep up. Meanwhile my camera at 15FPS with the proper shutter speed gets the clean shots.

We wouldn't take these cameras to an NBA game to broadcast, nor would we take the cameras they use at an NBA game to put on a house. Not all cameras are alike and are each designed for a purpose. Another example, I can watch an MLB game and they can slow it down to see the stitching on the baseball. Surveillance cams are not capable of that.

Watch these, for most of us, it isn't annoying until below 10FPS



 
  • Like
Reactions: Valiant and mat200
My cameras "keep up" just fine at 30FPS and fairly high bitrates of 10,240 for 4MP and 16,384 for 4K

I like the best quality I can get out of the cameras. I have yet to have one quit because of this and I can freeze frames just fine


Home_GatorCam-Color4K-T_main_20230625101047_@5c.jpg HOA Entr_StreetView_main_20211227115059_@3.jpgHome_Drive-5442H-ZHE_main_20240215083952_@5.jpgHome_Mini-PTZ_main_20240727205009_@5.jpg
Home_Street-5442-Z4-S3_main_20241020200732_@1.jpgHome_5442-Z4-S3_main_20240215083953_@5.jpgHOA Entr_EntrTag_main_20211227115058_@3.jpg2-Home_GatorCam-Color4K-T_main_20230728085953_@5.jpgHeronIncoming.jpg
 
Last edited:
  • Like
Reactions: mat200
My cameras "keep up" just fine at 30FPS and fairly high bitrates of 10,240 for 4MP and 16,384 for 4K

I like the best quality I can get out of the cameras. I have yet to have one quit because of this and I can freeze frames just fine


View attachment 207856 View attachment 207862View attachment 207860View attachment 207858
View attachment 207857View attachment 207859View attachment 207863View attachment 207855View attachment 207866

You all that match brands of cameras and NVRs are so special :lmao:

But yeah, matching a system one can probably "push" them more and be more stable as hopefully they were designed to work together!

I used to be an FPS snob too and eventually I saw I wasn't getting anything out of it I wasn't with lower FPS, except when I wanted to add more cameras, I either needed to update the VMS hardware or cut FPS LOL.

It took me awhile to get on the 15FPS boat so many BI users preached, but I have seen how BI and the system can get more stable doing so. Personally, most of us using BI don't feel like we are missing anything running 15FPS.

Hollywood movies for the big screen are shot at 24FPS, so I don't think I need more than that for my mobile device LOL.

Kinda like the BI versus NVR debate, each have their reasons and opinions for running the FPS they do.
 
  • Like
Reactions: mat200
On a bigger camera job with a purpose built NVR (LTS/Hikvision). What are ideal stream settings?
H264 vs H265?
FPS, iframe, VBR/CBR and bit rate?

Thank you.

Hi @loudog212

2 key issues to know when starting :
1) What is the system capable of ( often with so many cameras the limit will be determined by the video storage write speed supported )
2) What are the results you want / need from the video capture ?

First I would try H264 at 15 fps, max on bit rate - and see if the NVR can handle the theoretical max bandwidth from that.

Remember, images standing still produce less bandwidth when using video compression - so a system which looks able to handle the bandwidth when views are static may have issues when all screens have significant movement in them.
( example testing a store's cameras after the close vs .. say on Black Friday in person sales )
 
Last edited:
  • Like
Reactions: bigredfish
You all that match brands of cameras and NVRs are so special :lmao:

But yeah, matching a system one can probably "push" them more and be more stable as hopefully they were designed to work together!

I used to be an FPS snob too and eventually I saw I wasn't getting anything out of it I wasn't with lower FPS, except when I wanted to add more cameras, I either needed to update the VMS hardware or cut FPS LOL.

It took me awhile to get on the 15FPS boat so many BI users preached, but I have seen how BI and the system can get more stable doing so. Personally, most of us using BI don't feel like we are missing anything running 15FPS.

Hollywood movies for the big screen are shot at 24FPS, so I don't think I need more than that for my mobile device LOL.

Kinda like the BI versus NVR debate, each have their reasons and opinions for running the FPS they do.


Some VMS systems are not able to run higher FPS and bitrate. The OP deserves to know that it IS quite possible to run high quality video given the right equipment - LOL
 
@wittaj and @bigredfish What shutter speeds do you recommend for day time and night time? Also, will higher shutter speeds have any negative impact on the cameras themselves?

Shutter speed (like FPS and bitrate) will have no detrimental effect on the mechanics of the camera.

Generally you can get away with MUCH faster shutter during the day when you have more light. Nighttime is the hard part, depending again on your scene and ambient light.

I generally run a range for daytime to allow for overcast, rainy days, etc. Usually 0-2ms
Nights I try and run no slower than 1/120 and usually fixed shutter. Freezing video with motion at night is hard without good lighting.
For LPR cameras, seeing only the plate in otherwise compete darkness, we'll run 1/1000 - 1/2000 fixed shutter
 
  • Like
Reactions: mat200
Some VMS systems are not able to run higher FPS and bitrate. The OP deserves to know that it IS quite possible to run high quality video given the right equipment - LOL

Yep like my neighbor with his Lorex NVR capped at bandwidth of 40Mbps and the system keeps dropping his bitrate down so that all the cameras can run LOL.

But even then, it is possible to max out any equipment running max settings. A member here needs to run multiple NVRs because one can't cut it LOL.

The key is to recognize that all NVRs are not created equal and the bandwidth limit plays a big role in bitrate, resolution, and FPS capabilities.

But I think any of us running these cameras at 15FPS would consider our video as high quality...
 
  • Like
Reactions: mat200
@wittaj and @bigredfish What shutter speeds do you recommend for day time and night time? Also, will higher shutter speeds have any negative impact on the cameras themselves?

The shutter is an electronic shutter and not an actual shutter like you may be used to on a "real" camera, so the camera itself isn't impacted by the speed.


In terms of getting the most out of the camera, here is my "standard" post that many use as a start for dialing in day and night that helps get the clean captures and help the camera recognize people and cars.

Start with:

H264
8192 bitrate
CBR
15FPS
15 iframes

Every field of view is different, but I have found you need contrast to usually be 6-8 higher than the brightness number at night.

We want the ability to freeze frame capture a clean image from the video at night, and that is only done with a shutter of 1/60 or faster. At night, default/auto may be on 1/12s shutter or worse to make the image bright.

In my opinion, shutter (exposure) and gain are the two most important parameters and then base the others off of it. Shutter is more important than FPS. It is the shutter speed that prevents motion blur, not FPS. 15 FPS is more than enough for surveillance cameras as we are not producing Hollywood movies. Match iframes to FPS. 15FPS is all that is usually needed.

Many people do not realize there is manual shutter that lets you adjust shutter and gain and a shutter priority that only lets you adjust shutter speed but not gain. The higher the gain, the bigger the noise and see-through ghosting start to appear because the noise is amplified. Most people select shutter priority and run a faster shutter than they should because it is likely being done at 100 gain, so it is actually defeating their purpose of a faster shutter.

Go into shutter settings and change to manual shutter and start with custom shutter as ms and change to 0-8.3ms and gain 0-50 (night) and 0-4ms exposure and 0-30 gain (day)for starters. Auto could have a shutter speed of 100ms or more with a gain at 100 and shutter priority could result in gain up at 100 which will contribute to significant ghosting and that blinding white you will get from the infrared or white light.

Now what you will notice immediately at night is that your image gets A LOT darker. That faster the shutter, the more light that is needed. But it is a balance. The nice bright night static image results in Casper blur and ghost during motion LOL. What do we want, a nice static image or a clean image when there is motion introduced to the scene?

In the daytime, if it is still too bright, then drop the 4ms down to 3ms then 2ms, etc. You have to play with it for your field of view.

Then at night, if it is too dark, then start adding ms to the time. Go to 10ms, 12ms, etc. until you find what you feel is acceptable as an image. Then have someone walk around and see if you can get a clean shot. Try not to go above 16.67ms (but certainly not above 30ms) as that tends to be the point where blur starts to occur. Conversely, if it is still bright, then drop down in time to get a faster shutter.

You can also adjust brightness and contrast to improve the image. But try not to go above 70 for anything and try to have contrast be at least 7-10 digits higher than brightness.

You can also add some gain to brighten the image - but the higher the gain, the more ghosting you get. Some cameras can go to 70 or so before it is an issue and some can't go over 50.

But adjusting those two settings will have the biggest impact. The next one is noise reduction. Want to keep that as low as possible. Depending on the amount of light you have, you might be able to get down to 40 or so at night (again camera dependent) and 20-30 during the day, but take it as low as you can before it gets too noisy. Again this one is a balance as well. Too smooth and no noise can result in soft images and contribute to blur.

Do not use backlight features until you have exhausted every other parameter setting. And if you do have to use backlight, take it down as low as possible.

After every setting adjustment, have someone walk around outside and see if you can freeze-frame to get a clean image. If not, keep changing until you do. Clean motion pictures are what we are after, not a clean static image.
 
  • Like
Reactions: mat200
Yep like my neighbor with his Lorex NVR capped at bandwidth of 40Mbps and the system keeps dropping his bitrate down so that all the cameras can run LOL.

But even then, it is possible to max out any equipment running max settings. A member here needs to run multiple NVRs because one can't cut it LOL.

The key is to recognize that all NVRs are not created equal and the bandwidth limit plays a big role in bitrate, resolution, and FPS capabilities.

But I think any of us running these cameras at 15FPS would consider our video as high

That would be like me suggesting and comparing an old XP PC with 4MB RAM to run your VMS.

I’m well aware, as you know, that any system can be pushed past its limit. But examples like your friends cheap 40 Mbps NVR are ridiculous.

A member here needs to run multiple NVRs because one can't cut it LOL.

Sure if you run enough cameras at high enough settings, again any system can be pushed past its limit including BI. There are a number of factors that might require a 2nd NVR. Number of channels being one, buying an underpowered NVR to save $ is another.
 
Thank you @wittaj for the detailed instruction on how to adjust the shutter speed, etc. Just so I understand, on ip cameras the effect of shutter speed is independent of fps? In other words, once I calibrate the shutter speed, gain, brightness, and contrast, the quality of the images in the video will not change based on fps. Fps would just change how smooth or choppy the video appears. Is that right?
 
Also, does anyone adjust their cameras' settings from the command line using curl to execute functions on the cameras' api? I have a luminescence sensor on the front and rear of my house and think I could adjust the shutter speed, etc., based on the what the sensor shows. That way, I can adjust for weather etc, automatically by programming the settings into Home Assistant. Does anyone do this?
 
  • Like
Reactions: Valiant
Thank you @wittaj for the detailed instruction on how to adjust the shutter speed, etc. Just so I understand, on ip cameras the effect of shutter speed is independent of fps? In other words, once I calibrate the shutter speed, gain, brightness, and contrast, the quality of the images in the video will not change based on fps. Fps would just change how smooth or choppy the video appears. Is that right?

Correct
 
  • Like
Reactions: Cold-Lemonade
@wittaj Do you increase your bit rate for camera's with higher megapixel counts? How many megapixels do you have in mind for your starting point?

Yes, that is my standard because most are starting with a 4MP camera, but I should probably adjust that. He is where most of us start:

2MP - 4096
4MP - 8192
8MP - 12,000 to 16,384 (some 8MP cameras don't allow higher bitrates)

And then for each field of view, we suggest then moving the bitrate up and down until YOU don't see a difference.

The higher the bitrate, the more storage that is needed and vice versa.

But if with YOUR eyes and your monitor, you don't see a difference between 8192 and 16,384, no need to run the higher bitrates.

As always YMMV and some may run max bitrates regardless. Personally I have seen that the 8MP can get oversharp with higher bitrates.