How to calculate the file size of security video

Basic concepts

Let’s make a few concepts clear.

In a computer system, bit is the smallest unit of data storage in the computer, representing binary bit. A binary bit can represent 0 and 1 states.

At the same time, the computer stores and interprets information in bytes, and stipulates that a byte is composed of eight binary bits, that is, one byte is equal to eight bits (1byte = 8bit).

The video rate of a camera is the number of data bits transmitted per unit time. Generally, the unit we use is Kbps, that is, k bits per second, how many kilobits per second. For example, 3000kbps, that is, 3000kbits per second, that is, 375 bytes.

In hard disk storage, theoretically, 1TB = 1024gb, 1GB = 1024MB, 1MB = 1024KB.

But in fact, for convenience, manufacturers such as hard disk storage industry define 1TB = 1000GB, 1GB = 1000MB, 1MB = 1000KB. In addition, some space in the hard disk will be occupied by firmware program, so the actual size of 1TB hard disk is 931GB.

Computing method

Well, with the above knowledge, let’s calculate the size of the surveillance video, that is, the size of the video file per unit time multiplied by the time. Unit time (s) file size (byte) = bitstream (BPS) ÷ 8. 24 hours a day video file size = (bitstream ÷8) × 60 × 60 × 24。

For example, for a 1080p, H.265 encoded network camera, the general reference code stream is 2000kbps, then the hard disk space required for this camera to record 24 hours a day is 2000 ÷ 8 × 60 × 60 × 24=21.6GB。 If the bitstream is 1000kbps, the video file size of one day is 10.8GB, the bitstream is 5000kbps, and the file size is 54gb. In order to facilitate the fast calculation, we can roughly remember that the bitstream value (kbps) × 100 is the amount of hard disk space (GB) occupied by the video 24 hours a day, which is convenient for memory and fast for calculation. Of course, if you need accurate data, you can calculate according to the above formula.

Furthermore, many security product service providers now provide their own online video hard disk storage space calculation tools. The calculation methods and principles are basically based on the above analysis. Some options include H.265/H.264 encoding, resolution and other options. In fact, through these options, we can determine the bit stream value of the built-in camera step by step. If we know the bit stream of the camera, we don’t have to be so troublesome.

The development of infrared (fill light) technology for security cameras

Concept of light

Light is an electromagnetic wave with different frequencies, and light of different frequencies will have different colors.

Human eyes can see objects because they can emit light or reflect light (the light that human eyes can perceive). But the light in nature is only part of what the human eye can perceive (see). Through research, we found that the human eye can fully see light with a wavelength between 780 and 400 nm, while the light with a wavelength between 880 and 780 nm can also be slightly perceived by the human eye. The visible light (the light that the human eye can see) is red, orange, yellow, green, blue, and indigo purple. White light is the synthesis of all these spectra.

Similar to the human eye, the image sensor in the camera can also perceive light of a specific wavelength. The photosensitive element of CCD or CMOS is generally composed of silicon. The following figure shows the spectral response curve of silicon:

From the spectrum of silicon, we can see that, in addition to sensing visible light at 780-400nm, silicon is most sensitive to light at 700-1000nm. The range of 800-1000nm is infrared light. Because of this physical characteristic, CCD/CMOS cameras can better perceive infrared light, and human eyes are not sensitive to infrared light. In environments lacking visible light (such as night), security cameras often use infrared supplementary light, which will not Human eyes cause light pollution and also play a relatively concealed effect.

Infrared light

Infrared (IR) is an electromagnetic wave with a wavelength between microwave and visible light, and its wavelength is between 760nm and 1000nm.

According to different detection needs, we can subdivide the infrared light into:

  • Near infrared (NIR): The wavelength range is 700 to 1000 nm (from the range that the human eye cannot detect to the range that silicon can respond to);
  • Short-wave infrared (SWIR): The wavelength range is 1000 to 3000 nm (from the cut-off frequency of silicon to the cut-off frequency of the atmospheric infrared window);
  • Mid-wave infrared (NWIR): The wavelength range is 3000 to 5000 nm;
  • Long wave infrared (LWIR): The wavelength range is 8000 to 12000 or 7000 to 14000 nm;
  • Far infrared (FIR): The wavelength range is 12000 to 30000 nm.

Near infrared (NIR) is just beside the visible section of the human eye, while medium and long-wave infrared (MWIR, LWIR) and far infrared (FIR) are farther than the visible section of the human eye.

Fill light


In the early development of security cameras, Japanese and Korean brands such as SONY, Samsung, Panasonic, and Sharp mainly focused on the performance of cameras such as WDR and low-light. There was not much research and development on infrared technology. In the early days, SONY and Panasonic did not have infrared security cameras. The reason will be explained in detail in the section on the problem of infrared lamps. Security camera manufacturers in Taiwan and China have seen the development prospects of infrared technology in the application of security cameras, and have successively introduced infrared cameras and IR-CUT technology, which have produced very good market effects.

As mentioned earlier, security cameras generally use near-infrared to fill light when the visible light is insufficient. This is because the photosensitive element of CCD/CMOS is made of silicon, and silicon is very sensitive to near-infrared. At the same time, human eyes are not sensitive to near-infrared, which can avoid light pollution and be more concealed during night vision. Security cameras generally use 850nm and 940nm infrared fill light, and 850nm uses more.

As mentioned earlier, the human eye can slightly perceive the light from 880 to 780nm, so the human eye can slightly see the infrared light of 850nm (the red bright spot is visible to the human eye), while the infrared of 940nm is completely invisible, so the 940nm infrared The concealment of the camera is better. But it is a pity that the sensitivity of CCD/CMOS image sensors to 940nm light is much worse than that of 850nm. For better night vision, most infrared cameras now use 850nm infrared lamps.

The figure below shows how the CCD/CMOS image sensor responds to different light.

The filter is made of plastic or glass with special dyes. The red filter can only let red light pass, and so on. The transmittance of the glass sheet is originally similar to that of air, and all colored light can pass through, so it is transparent, but after dyeing the color, the molecular structure changes and the refractive index also changes, which changes the passage of certain colored light.
Image sensor NIR technology

Although silicon can sensitively respond to near-infrared, in order to achieve better infrared night vision, CMOS manufacturers continue to improve the near-infrared imaging effect and sensitivity of image sensors through technology. NIR technology is the focus and core technology of image sensor manufacturers.

Infrared light development

Infrared technology is divided into passive infrared thermal imaging sensing and active infrared light emission. Security cameras generally use active infrared technology.

On the whole, the development of infrared fill light technology for security cameras has gone through 3 generations.

The first generation, traditional LED lights, in-line. A single light-emitting diode is used for packaging with epoxy resin material, and the chip size is generally between 12mil-16mil. The packaged size is generally φ5 or φ8. Condensing light is achieved through the reflective bowl in the chip and the lens on the top of the encapsulated epoxy resin. The lens can be made into different angles to match the angle of the camera lens to achieve the best effect.

Main feature:

  1. The single power is small. The chip size is 12-16mil, the current of a single lamp is very small, and the power is very low. In order to achieve good results, generally increase the number of particles. The number of common particles is generally 24-56, and the irradiation distance ranges from 10 meters to 40 meters. If you want to illuminate farther, it is difficult to use this LED light.
  2. The light decays fast. The epoxy resin lens is easy to break when exposed to heat, and the infrared light is easily refracted back through the broken surface. With the passage of time, more and more fractured surfaces, more and more infrared light is refracted back, and very little can be penetrated. This is the main reason for the fast attenuation and short life of traditional LED lights.
  3. Poor heat dissipation. Traditional LED lights are energized through two pins, emit light, and generate heat at the same time, and the thermoelectricity is not separated. The surrounding temperature is higher, which reduces the life of electronic components. However, if a single LED lamp is broken, it will not affect other LED lamps to continue working.