Back to the glossary
Glossary · Cameras

H.264 vs H.265: video compression for security cameras

Two video compression standards used by cameras and recorders. H.265 was designed to match the picture of H.264 at about half the bitrate, so a drive holds more days, but savings vary by scene and every device must support it.

H.264, also called AVC, was first approved by the ITU-T in 2003, and H.265, also called HEVC, in 2013. In the developers' published tests, H.265 matched the picture quality of H.264 at about 50 percent less bitrate on average, which on a camera system roughly doubles the days a drive holds.

By Seneca SecurityUpdated November 8, 20267 min read

Definitions checked against the standards listed at the end.

01How H.264 and H.265 compress video, frame by frame

Uncompressed, one 4MP picture (2,560 × 1,440 pixels at the 12 bits a pixel video uses) is about 5.5 MB, so 15 a second is about 660 megabits every second. An example H.264 stream for that camera, 5 Mbps, is about 130 times smaller. Both codecs get there the same way. An I-frame is coded on its own, like a photograph. The frames after it, P-frames, store only what changed since the frame before: which blocks moved, and a small correction for each. A new I-frame comes often every 1 to 4 seconds; that spacing is the I-frame interval, or GOP length.

Each picture is first cut into blocks. H.264 works in macroblocks of 16 × 16 pixels, split smaller where there is detail. H.265 starts from coding tree units of up to 64 × 64 pixels and splits each one only as far as the picture needs, so a plain wall costs a few large blocks instead of dozens of small ones. Figure 1 draws both, with the size of every frame in four seconds of video.

Fig 1Four seconds of video, frame by frame
Codec
Scene
I-frame every
Recorder

Swipe the drawing sideways to see all 60 frames.

THE PICTURE, CUT INTO BLOCKS FRAME SIZE, ONE BAR PER FRAME 50 KB100 KB150 KB200 KB250 KB 0 S1 S2 S3 S4 S
I-frameP-frameBlock that changed H.265: blocks up to 64 × 64, split only where there is detail
H.265 · busy corridor · I-frame every 2 s 2.55 Mbps average bitrate for this example, one 4MP camera at 15 fps
I-frame130 kB
Each P-frame17.5 kB
I-frames' share of the bits20%
Storage per camera per day27.5 GB
Against H.264, same scene50% of 5.10 Mbps
Frame 1 of 60

I-frame: every block of the picture is coded from scratch, so this frame is 130 kB. Playback and export can start here.

(130 kB + 29 × 17.5 kB) × 8 ÷ 2 s = 2.55 Mbps

2.55 Mbps × 86,400 s ÷ 8 ÷ 1,000 = 27.5 GB a day

Recorder plays H.265The camera can send H.265. The app, any browser used for viewing and whoever receives an exported clip must play it too.
Frame sizes are examples for a 4MP camera at 15 frames per second, chosen to match the example bitrates in our recordings guide; the H.265 sizes apply the design aim of about half the bits for the same picture to every frame. Real savings vary with the scene and the camera. Blocks are drawn to scale on a 768 × 432 picture so they stay visible: H.264 macroblocks of 16 × 16 pixels split to 8 × 8 at edges, H.265 coding tree units of 64 × 64 split down to 8 × 8.

The codec shrinks every frame, I and P alike. The I-frame interval matters most where nothing moves: in the empty corridor, with H.264, the example bitrate falls from 2.50 Mbps with an I-frame every second to 1.34 Mbps with one every 4 seconds. In the busy corridor it falls only from 6.00 to 4.65 Mbps, because there the P-frames carry most of the bits.

Example: one 4MP camera at 15 fps, an I-frame every 2 seconds
SceneCodecBitrateStorage a day
Empty corridorH.2641.73 Mbps18.7 GB
Empty corridorH.2650.86 Mbps9.3 GB
Busy corridorH.2645.10 Mbps55.1 GB
Busy corridorH.2652.55 Mbps27.5 GB

02H.264 vs H.265: what H.265 changed

H.265 keeps the toolbox of H.264 and makes the tools bigger and finer. The main changes, from the overview published by its developers:

H.264 vs H.265 side by side
H.264 (AVC)H.265 (HEVC)
First approved by ITU-TMay 2003April 2013
Largest coding block16 × 16 macroblockCoding tree unit of 16 × 16, 32 × 32 or 64 × 64
Intra prediction8 directional modes33 directional modes, plus planar and DC
Transform sizes4 × 4 and 8 × 84 × 4 up to 32 × 32
MotionQuarter pixel motion vectorsQuarter pixel, plus merge mode and advanced motion vector prediction
Filters inside the loopDeblockingDeblocking and sample adaptive offset
Parallel processingSlicesSlices, tiles and wavefront processing
Bitrate for the same pictureThe referenceAbout 50% less on average, in subjective tests

The price is computation: more block sizes, directions and modes to try for every part of the picture. Cameras and recorders do this in dedicated chips, so a recorder or computer built for H.264 may not decode H.265 at all, and no setting changes that.

03How much storage and bandwidth H.265 saves

In the developers' tests, with viewers judging the pictures, H.265 gave the same quality at about 50 percent less bitrate on average. Storage follows bitrate one for one, so half the bitrate means about twice the days on the same drive.

Storage per day = Mbps × 86,400 seconds ÷ 8 bits per byte ÷ 1,000 = Mbps × 10.8 GB

For the busy corridor in Figure 1, one camera writes 55 GB a day with H.264 and 28 GB with H.265. Eight such cameras on an 8 TB drive keep about 18 days with H.264 and about 36 with H.265. The calculator in our guide to how long security camera recordings last works it out for your drives.

The same halving applies to a recorder's incoming bandwidth, a switch uplink and an internet upload for phone viewing or a cloud copy. Our comparison of cloud storage and a local NVR or DVR works out what an upload can carry.

Fifty percent is an average across test videos, not a promise for your camera: the saving depends on the scene, the camera's encoder and its settings. Read each camera's bitrate on the recorder over a full day before you size storage on it.

To compare H.264 and H.265 for your own cameras, use our security camera storage calculator.

04H.265 compatibility: every device must support it

H.265 saves space only if every device that decodes the video can do it.

  • The recorder has to accept H.265 on every channel, at the resolution and frame rate you need. If it decodes only H.264, the camera has to be set to H.264.
  • The viewing software and the phone app have to play it, live and in playback.
  • Browsers. In caniuse tables read in November 2026, Safari plays H.265, while Chrome, Edge and Firefox support it only in part, depending on the computer's hardware and operating system.
  • Exported clips. An officer, an insurer or a lawyer has to be able to play them. Test one export on an ordinary computer before you need it.

Across makers, the common language is ONVIF. Profile T lists both H.264 and H.265 streaming; Profile S, the older one, is being retired, with March 31, 2027 as its last date for conformance submissions. For H.265, look for Profile T on both sides.

05Where H.264 and H.265 show up in NYC and NJ buildings

Many buildings in New York and New Jersey carry several generations of equipment: a recorder from one upgrade, cameras from another, sometimes a DVR still on coax, which compresses the video itself (the recent DVR spec sheets we checked list both codecs). Three situations come up often.

  • New cameras on an older recorder. New cameras may default to H.265 while the recorder decodes only H.264. Set them to what the recorder plays, or plan the recorder upgrade with them.
  • A retention target the drive cannot meet. Where a lease, an insurer or a policy sets a number of days, H.265 is the first setting to check, before buying drives.
  • Viewing over a small upload. Cable internet in many walk-ups uploads far less than it downloads. H.265 and the camera's lower resolution sub stream keep phone viewing usable; see our guide to watching several sites remotely.

06What to ask for, and common mistakes

Ask these about any camera system, including a security camera installation from us.

  1. Which codec does each camera use, on its main stream and its sub stream?
  2. Does the recorder record H.265 on every channel, at the resolution and frame rate we need?
  3. What bitrate does each camera actually run, in Mbps, in its busiest hour?
  4. What I-frame interval is set, and is any smart codec mode turned on?

Common mistakes

  • Turning on H.265 in the camera only. If the recorder or app cannot decode it, the channel may show no picture, or the storage plan counts on a saving that never happens.
  • Stretching the I-frame interval too far. Playback and export start from an I-frame, so searching moves in bigger steps, and a glitch lasts until the next one.
  • Treating a smart codec mode as free. Makers add their own modes on top of both codecs, usually stretching the I-frame interval in quiet moments and compressing unchanging parts of the picture harder. Each is one maker's own: check the recorder, the software and exported clips handle it, and watch a person walking past in the recording.

A recorder for IP cameras. Each camera compresses its own video and sends it over the network, and the NVR stores the streams on its drives in the building. It is sized by channel count and incoming bandwidth.

A recorder for analog and HD over coax cameras. Each camera sends its picture on its own coax cable, and the DVR converts it to digital, compresses it with H.264 or H.265 and stores it on its drives.

Cameras

IP Camera

A camera with its own network address that compresses its own video and sends it over an Ethernet cable, usually Cat6, which also carries its power by PoE. It records to an NVR, a cloud service or its own card.

Areas of a camera view where movement starts a recording or an alert. Recording on motion saves storage, but nothing outside the zones is kept, and rain, headlights and moving trees can set it off.

Bandwidth is the most a link or service is rated to carry; throughput is what actually gets through after overhead, sharing and retries. Size camera uploads and Wi-Fi on measured throughput, not the rate on the box.

Explained in depth

08H.264 vs H.265 questions

Is H.265 better than H.264?

For storage and bandwidth, yes: it was designed to deliver the same picture at about half the bitrate, and published tests found close to that on average. It is not better if a recorder, app or computer in the chain cannot play it, so check every device first.

Does H.265 lower video quality?

Not at a fair bitrate: at the same bitrate it usually looks as good as H.264 or better. The risk is a smart mode or a very low bitrate setting used to save more, which can blur moving faces, so check recorded video of a person walking past.

How much storage does H.265 save?

About half on average, so a drive holds roughly twice the days. In the example on this page, a 4MP camera in a busy corridor writes 55 GB a day with H.264 and 28 GB with H.265. Real savings vary, so read the bitrates on your recorder.

Can one recorder use both H.264 and H.265 cameras?

Usually, if the recorder supports H.265 at all, since each channel records whatever its camera sends. Check the spec sheet for H.265 on every channel at the resolution you need, and for ONVIF Profile T when the cameras come from another maker.

Why will an H.265 clip not play on my computer?

The computer or browser has no H.265 decoder for it. Safari plays H.265, while Chrome, Edge and Firefox play it only on some hardware and systems. Export with the recorder's own player, or ask whether it can export a copy in H.264.

Sources and standards

  • ITU-T Recommendation H.264Advanced video coding for generic audiovisual services. The ITU-T lists the first edition as May 2003; the edition in force is dated June 2026. Source of the H.264 block, transform and slice structure in the table.
  • ITU-T Recommendation H.265High efficiency video coding. The ITU-T lists the first edition as April 2013; the edition in force is dated January 2026.
  • Sullivan, Ohm, Han and Wiegand, 2012Overview of the High Efficiency Video Coding (HEVC) Standard, IEEE Transactions on Circuits and Systems for Video Technology, vol. 22, no. 12. Source of the coding tree block sizes of 16, 32 or 64 luma samples against the 16 × 16 macroblock, the 33 directional intra modes against eight in H.264, transforms from 4 × 4 to 32 × 32, merge mode and advanced motion vector prediction, sample adaptive offset, tiles and wavefront processing, and the aim of about 50 percent bit rate reduction for equal perceptual quality.
  • Ohm, Sullivan, Schwarz, Tan and Wiegand, 2012Comparison of the Coding Efficiency of Video Coding Standards, Including High Efficiency Video Coding (HEVC), same journal and issue. Source of the subjective test result: quality equivalent to H.264 at approximately 50 percent less bit rate on average.
  • ONVIF Profile T and Profile SProfile T lists H.264 and H.265 video streaming. The Profile S page states that the profile is being deprecated, with March 31, 2027 as the last date for conformance submissions.
  • caniuse, HEVC/H.265 video formatBrowser support table, read November 2026: supported in Safari 13 and later, partial support in current Chrome, Edge and Firefox.
  • Recorder specification sheetsCodec lists of current HD over coax DVRs and network recorders, read from makers' published specification sheets.
  • The arithmetic on this pageBitrate = (I-frame + (N − 1) × P-frame) × 8 × frames per second ÷ N, for N frames in a group; storage per day = Mbps × 10.8 GB; an uncompressed 4MP picture = 2,560 × 1,440 × 12 bits = about 5.5 MB. Frame sizes in Figure 1 are examples.

Have a building to plan?

We walk the building, then send a written scope. Same-day quotes when we can. Licensed and insured.

Back to the glossary