If the retention period turns out shorter than calculated, or the operator station stutters on four 4K streams, the cause is often codec and stream settings. The video encoding standard directly determines the amount of data the camera produces, and therefore network and storage costs. H.264 (AVC) was the video surveillance standard for many years; H.265 (HEVC) targets the same image quality at a lower bitrate. The decision, however, depends not only on compression ratio but on compatibility and decoding load on the client side.
The two standards in brief
H.264 and H.265 are video coding standards developed jointly by ITU-T and ISO/IEC. With larger and more flexible coding blocks, advanced motion prediction and filtering tools, H.265 provides more efficient compression, especially at high resolutions and in scenes with static backgrounds. The price is more processing power for encoding and decoding.
In surveillance, this price is felt not on the camera but on the viewing side. The camera encoder is hardware designed for the job. The operator station, however, has to decode many streams at once and, without hardware decoding support, the load falls on the CPU.
Settings that affect bitrate
| Setting | Effect | Typical approach in surveillance |
|---|---|---|
| Resolution | More pixels mean more data | According to the image goal (DORI) |
| Frame rate (FPS) | More frames mean more data | 12–15 fps is enough for most scenarios |
| GOP / I-frame interval | A long GOP reduces data but affects seeking and error tolerance | 1–2× the FPS; smart GOP with care |
| VBR / CBR | VBR varies with the scene, CBR is constant | Capped VBR |
| Quality / compression level | Balance of detail and artifacts | High quality on cameras that need to produce evidence |
| Smart codec (ROI, dynamic GOP) | Big savings in static scenes | After testing VMS and analytics compatibility |
GOP is the most misunderstood parameter. An I-frame is a full image; the P-frames between carry only the change. Making the GOP very long lowers bitrate, but when you jump to a point in the recording, the player has to go back to the nearest I-frame, and if there’s loss on the network, corruption lasts until the next I-frame. On a 15 fps camera, a GOP of 15–30 frames, i.e. an I-frame every one or two seconds, is a balanced starting point for surveillance.
Bitrate control mode determines capacity as much as codec choice. With uncapped VBR, night IR noise or rain pushes bitrate to unexpected levels. Capped VBR saves in quiet scenes while limiting the peak. But if you set the cap too low, the image becomes blocky in scenes with motion. Right at the moment of the incident.
How much gain should you expect on site?
Lab comparisons show that H.265 can deliver a significant bitrate reduction compared with H.264 at the same quality; with surveillance cameras, however, the real gain varies with the camera’s encoder quality, scene motion and night noise. In noisy scenes under IR at night, both codecs raise bitrate. So the decision should be made by measurement:
- Record 3–5 representative cameras at the same resolution, FPS and quality settings, first with H.264, then with H.265, for a week each.
- Compare average and peak bitrate values by day and night.
- Assess image quality by watching the same events from the recordings (details such as plates, faces and labels).
- Check client CPU/GPU usage and VMS behavior (search, export, analytics).
Convert the average bitrate you measured directly into capacity. Example calculation: a camera producing an average of 4 Mbit/s writes 4 × 86,400 / 8 = 43,200 MB per day, i.e. about 43.2 GB. However much the codec change lowers the average bitrate, the retention period in the same disk space grows by that proportion. Do the calculation with the night and day average measured in your own scene, not the typical value on the datasheet.
Compatibility checks
- VMS/NVR: H.265 recording and playback support, smart codec support.
- Clients: Decoding many high-resolution H.265 streams requires a GPU; hardware decoding capacity must be calculated for video walls and operator stations (control center design).
- Web and mobile: Browser and mobile device support varies by platform; keeping the substream in H.264 can be a practical solution.
- Analytics: Verify that server-based analytics supports the H.265 stream.
- Export: Provide a player or suitable format so the parties you hand incident recordings to can play them.
- ONVIF: Profile T covers H.264 and H.265 support (ONVIF guide).
Test the client with a real scenario: open the busiest view that will be open on the operator screen at once (e.g. a 16-tile grid) and watch CPU and GPU usage in the task manager. If GPU decoding isn’t kicking in, check the driver or the VMS client setting. If frames are dropped, the problem is in the client, not the recording.
Main stream and substream
Cameras usually produce more than one stream: a high-resolution main stream for recording and a low-resolution substream for live viewing and remote access. Mixed setups such as H.265 for the main stream and H.264 for the substream can strike a good balance between storage savings and client compatibility.
Having the VMS automatically switch to the substream in grid view and to the main stream when a single camera is enlarged noticeably reduces client load. Verify that this behavior is enabled and that the substream is really taken from the camera; in misconfigured systems, the grid view also decodes the main stream.
Common configuration mistakes
- Switching the codec to H.265 but leaving the capacity calculation at the old bitrate value
- Enabling smart codec on all cameras without testing VMS search and export
- Raising the GOP to the level of minutes and slowing down time jumps in recordings
- Not including night bitrate peaks from uncapped VBR in the disk and uplink calculation
- Making the substream H.265 too without checking H.265 support for web and mobile access
H.265 is a powerful tool for reducing storage and network costs, but it isn’t a decision criterion on its own. Capacity should be calculated with measured bitrate (NVR capacity guide) and compatibility tested from camera to client.
Frequently asked questions
Does H.265 always halve disk usage?
No. The standard targets a lower bitrate at the same visual quality; however, the gain on site varies by encoder, scene and settings. Decide by measuring on your own cameras.
Are smart codecs safe?
They can noticeably reduce data in static scenes; however, some implementations can cause compatibility issues during search, analytics or export. They should be tested with the VMS.
Can H.265 be viewed in a browser?
Browser support varies by platform and hardware decoding support. For web clients, the VMS’s transcoding option or an H.264 substream is considered.
For profile optimization on your existing system, see our storage planning service.