enable-chromium-hevc-hardware-decoding
A guide that teach you enable hardware HEVC decoding & encoding for Chrome / Edge, or build a custom version of Chromium / Electron that supports hardware & software HEVC decoding and hardware HEVC encoding.
English | 简体中文
Usage
Chrome & Edge (Mac) & Chromium
Make sure version >= 107 then open directly.
What's the hardware decoding supported HEVC profile?
HEVC Main (Up to 8192x8192 pixels)
HEVC Main 10 (Up to 8192x8192 pixels)
HEVC Main Still Picture (up to 8192x8192 pixels)
HEVC Rext (partially supported, see the table below for details, up to 8192x8192 pixels)
GPU | 8b 420 | 8b 422 | 8b 444 | 10b 420 | 10b 422 | 10b 444 | 12b 420 | 12b 422 | 12b 444 |
---|---|---|---|---|---|---|---|---|---|
Apple Silicon (macOS) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ |
Intel ICL ~ TGLx (Win) | ✅ | ✅[5] | ✅[4] | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ |
Intel TGLx+ (Win) | ✅ | ✅[5] | ✅[4] | ✅ | ✅ | ✅ | ✅ | ✅[4] | ✅[4] |
✅:GPU + software support ❌:GPU not support
Note 1: Intel Macs support HEVC Rext software decoding of 8 ~ 12b 400, 420, 422, 444 contents. Apple Silicon Mac supports HEVC Rext hardware decoding of 8 ~ 10b 400, 420, 422, 444 contents, and software decoding of 12b 400, 420, 422, 444 contents on macOS 13+.
Note 2: Intel Gen10 GPUs support HEVC Rext hardware decoding of 8b 420, 8b 422, 8b 444, 10b 420, 10b 422, 10b 444 contents on Windows. Gen11+ GPUs additionally support HEVC Rext hardware decoding of 12b 420, 12b 422, 12b 444 contents.
Note 3: Although NVIDIA GPUs support HEVC Rext hardware decoding of 8 ~ 12b non-422 contents via CUVIA or NVDEC, but because they did not provide a D3D11 interface, thus Chromium will not support it in the future.
Note 4: HEVC 8b 444, 12b 422, 12b 444 support requires Chrome >= 117.0.5866.0
.
Note 5: HEVC 8b 422 support requires Chrome >= 118.0.5956.0
.
Note 6: To retain the original 4:2:2/4:4:4 chroma sampling, requires Chrome >= 125.0.6408.0
.
What's the hardware encoding supported HEVC profile?
HEVC Main (macOS & Windows & Android, macOS up to 4096x2304 px & 120 fps, Windows up to 1920*1088 px & 30 fps, Android up to the hardware)
Note 1: You need to pass a chrome switch to enable it(--enable-features=PlatformHEVCEncoderSupport
)Test Page.
Note 2: Windows / Mac need to make sure Chrome version >= 109.0.5397.0
,Android need to make sure Chrome version >= 117.0.5899.0
。
What's the OS requirement?
macOS Big Sur (11.0) and above
Windows 8 and above
Android 5.0 and above
Chrome OS (Only supports GPUs that support VAAPI interface, eg: Intel GPU)
Linux (Chrome version >= 108.0.5354.0
, and only supports GPUs that support VAAPI interface, eg: Intel GPU)
What's the API supported?
Video Decode: File, Media Source Extensions, WebCodec (8Bit requires >= 107.0.5272.0
, 10Bit + HEVC with Alpha requires >= 108.0.5343.0
), Clearkey and Widevine L1 (HW only) Encrypted Media Extensions, WebRTC (experimental, need to use Chrome Canary passing --enable-features=PlatformHEVCEncoderSupport,WebRtcAllowH265Send,WebRtcAllowH265Receive --force-fieldtrials=WebRTC-Video-H26xPacketBuffer/Enabled
to enable the feature, or use the Chromium binary provided by this repo, some useful sites here: Media Capabilities, Demo) are supported.
Video Encode: WebCodec (Windows, macOS, and Android, when passing --enable-features=PlatformHEVCEncoderSupport
) is supported.
What's the GPU requirement?
Discrete GPU
Intel DG1 and above
NVIDIA GT635, GTX645 and above
AMD RX460 and above
Integrated GPU
Intel HD4400, HD515 and above
AMD Radeon R7, Vega M and above
Apple M1, M1 Pro, M1 Max, M1 Ultra and above
Detail Table
HDR Supports? (Compared with Edge / Safari / Firefox)
PQ | HDR10 | HDR10+ | HLG | DV P5 | DV P8.1 | DV P8.4 | |
---|---|---|---|---|---|---|---|
Chrome Mac | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ✅ |
Chrome Win | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ✅ |
Edge Mac | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ✅ |
Edge Win | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ✅ |
Safari Mac | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
Firefox Win[1] | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
On Windows platform, Chrome supports PQ, HDR10 (PQ with static metadata), and HLG. Automatic Tone-mapping will be enabled based on static metadata (if present). HDR10+ SEI dynamic metadata wil be ignored while decoding and playback will downgrade to HDR10.
On macOS platform, Chrome supports PQ, HDR10 (PQ with static metadata), HLG. In SDR / HDR / Hybrid mode, the macOS system will automatically perform EDR to ensure that HDR is displayed correctly. Chrome / Edge shared the same code thus has the same decoding ability, Safari also supports the above all HDR formats.
Note 1: Firefox >= 120 just added HEVC decoding support (Windows platform only, experimental, need to manually set media.wmf.hevc.enabled=1
to enable the feature). Based on my testing, Firefox supports HEVC Main profile while doesn't support Main10 profile (HDR contents usually encoded with Main10 profile) yet, if the bug got fixed, I will re-test and update the table later.
Dolby Vision Supports Status
There are two type of support type here:
- Type 1: Supports RPU dynamic metadata and Profile 5 (IPTPQc2).
- Type 2: Supports profiles like Profile 8/9 that has cross-c