Back to Glossary
Video

H.264 vs H.265

What Is the Difference Between H.264 and H.265?

H.264 and H.265 are two generations of one family of video standards, both written by the ITU and ISO/IEC video groups. H.265, also called HEVC, followed H.264 ten years later, aiming for the same picture at half the bitrate.

Most of the gain comes from bigger, more flexible blocks. H.265 can code a flat stretch of sky as one large unit and still split a detailed area finely, and it predicts each block from its neighbors in more directions. The price is encoding work, and a decoder that not every device has. Licensing differs as well: H.265’s patents sit in several licensing pools, and AV1 vs HEVC sets that against AV1’s royalty-free terms.

  H.264 H.265
First published 2003 2013
Largest coding block 16 × 16 pixels 64 × 64 pixels
Prediction directions within a frame 8 33
Encoding work Lower Much higher
Browser playback Every major browser Depends on the device and system

H.264 or H.265: Which Should You Use?

Choose H.264 when you can’t predict the player and H.265 when you can. A real estate app, for example, might play its 4K HDR property tours in H.265 inside its own iOS app and give agents H.264 copies to share anywhere.

Use H.264 for

  • Streams that older devices must play

    Apple's own HLS spec asks for some H.264 versions next to the HEVC ones, for backward compatibility.

  • Many renders on modest hardware

    H.265 takes much more processing to encode, so the same machine gets through more H.264 exports.

  • Video calls in the browser

    The IETF's rules for WebRTC require browsers to implement H.264's Constrained Baseline profile, along with VP8.

Use H.265 for

  • HDR and 10-bit video

    YouTube names H.265 as its codec for HDR live streams, and Apple's HLS spec carries HDR video in HEVC.

  • 4K streams to Apple devices

    Apple's sample HLS ladder goes up to 2160p in HEVC, while its H.264 ladder stops at 1080p.

How Much Smaller Is H.265 Than H.264?

The standard promises half. Services that publish settings for both codecs plan on a smaller saving, about a quarter less data at 1080p.

50% less

the goal of the standard

same perceived quality, per ITU and Fraunhofer HHI

25% less

Apple's HLS ladder at 1080p

1080p reaches viewers on slower connections

29% less

YouTube live at 1080p30

the streamer needs less upload speed

How H.264 and H.265 Work in CE.SDK

CE.SDK’s video editor takes both codecs in and can write both out, but only H.264 is safe to assume everywhere.

H.265 import depends on the device’s decoder

Your users can bring H.264 and H.265 video in MP4 or MOV files into the editor on Web, iOS, Android and Server. Whether H.265 plays depends on the browser, the operating system or the device, so CE.SDK’s docs advise testing on the hardware you target and keeping an H.264 fallback where you don’t control the source.

H.265 export needs an encoder check

In the browser and on mobile, CE.SDK exports H.265 into MP4 where the platform can encode it. An export the platform cannot encode fails rather than switching codecs, so read hevcEncode after checkCapabilities() and fall back to H.264 yourself, as in the code below.

H.264 is the default

Left on Auto, an MP4 export writes H.264 at the Main profile, and MP4 exports from CE.SDK’s native Node.js package are H.264 too. H.264 exports also take a profile and a level, which set the highest bitrate the file may use. Firefox and Chrome on Linux have no AAC encoder, so their MP4 exports pair the H.264 video with Opus audio.

Export H.265 where the device can encode it
import { VideoCodec } from '@cesdk/engine';
await engine.editor.checkCapabilities();
const canUseHevc =
  engine.editor.getCapabilityState('hevcEncode') === 'supported';
// An export the platform cannot encode fails, so the fallback lives here.
const blob = await engine.block.exportVideo(page, {
  mimeType: 'video/mp4',
  videoCodec: canUseHevc ? VideoCodec.HEVC : VideoCodec.H264
});
Export to MP4 guide

Can this browser decode and encode H.265?

H.265 support in a browser comes from the operating system and the hardware underneath, so two computers running the same browser can give different answers.

Codec Decodes Encodes
H.264 video Not checked Not checked
H.265 (HEVC) video Not checked Not checked
AAC audio Not checked Not checked
Opus audio Not checked Not checked

Decoding opens and plays a file. Encoding writes one, as an export does.

The check asks about 1080p video at 30 fps through WebCodecs, the API CE.SDK's web export encodes with. In your app, go by CE.SDK's own checkCapabilities() result. Mobile browsers may report codecs here, but CE.SDK doesn't support video editing in them.

FAQs

Browsers lean on the operating system and the hardware for H.265. MDN notes that Chrome on Windows needs hardware support for it, and Edge on Windows needs Microsoft's HEVC Video Extensions from the Microsoft Store, while Safari on a Mac plays it out of the box. H.264 plays in every major browser.

Yes. YouTube's upload settings recommend H.264, but its live streaming settings list H.265 and AV1 next to H.264 and recommend lower bitrates for those two than for H.264.

It is H.265's profile for 10 bits per color channel, the depth HDR needs, and nearly all hardware that decodes H.265 supports it. H.264 video is mostly 8-bit.

Yes. An MP4 or MOV file can hold either one, and CE.SDK writes both into MP4. A WebM file holds neither: it is reserved for VP8, VP9 and AV1.