一份指南,教您为 Chrome/Edge 启用硬件 HEVC 解码和编码,或者构建支持硬件和软件的自定义 Chromium/Electron 版本
一份指南,教您为 Chrome/Edge 启用硬件 HEVC 解码和编码,或者构建支持硬件和软件的自定义 Chromium/Electron 版本
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 | 简体中文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) ✅ ✅[4] ✅[3] ✅ ✅ ✅ ❌ ❌ ❌ Intel TGLx+ (Win) ✅ ✅[4] ✅[3] ✅ ✅ ✅ ✅ ✅[3] ✅[3] NVIDIA Turing ~ Ada (Win) ✅[6] ❌ ✅[6] ✅[6] ❌ ✅[6] ✅[6] ❌ ✅[6] NVIDIA Blackwell (Win) ✅[6] ✅[6] ✅[6] ✅[6] ✅[6] ✅[6] ✅[6] ✅[6] ✅[6]✅: 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.
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: HEVC 8b 444, 12b 422, 12b 444 support requires Chrome >= 117.0.5866.0.
Note 4: HEVC 8b 422 support requires Chrome >= 118.0.5956.0.
Note 5: To retain the original 4:2:2/4:4:4 chroma sampling, requires Chrome >= 125.0.6408.0.
Note 6: Starting from Chrome 137, NVIDIA GPUs support HEVC Rext hardware decoding of 8 ~ 12b contents. (Requires NVIDIA Driver >= 572.16)
HEVC Main (macOS & Windows & Android, macOS up to the hardware[4], Windows up to the hardware[3], Android up to the hardware)
Note 1: Chrome >= 130.0.6703.0 no need any switch. Chrome < 130.0.6703.0 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.
Note 3: Chrome >= 131.0.6759.0 on Windows no longer have the hardcode resolution and framerate limit, it will call MediaFoundation to calculate a resolution and framerate combination based on hardware, resolution up to 7680x4320 and framerate up to 300fps. Chrome < 130.0.6703.0 on Windows, the max resolution is a hardcode value of 1920x1088 & 30fps.
Note 4: If Chrome >= 131.0.6771.0 and Mac has Apple Silicon chips, the max HEVC resolution can support up to 8192x4352 & 120fps. Otherwise the max resolution up to 4096x2304 & 120fps.
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)
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 (requires >= 136.0.7077.0, some useful sites here: Media Capabilities, Demo) are supported.
Video Encode: WebCodec (Windows, macOS, and Android, requires Chrome >= 130.0.6703.0), WebRTC (Windows, macOS, and Android, requires >= 136.0.7077.0), and MediaRecorder (Windows, macOS, and Android, requires Chrome >= 136.0.7064.0, need to pass --enable-features=MediaRecorderHEVCSupport in Chrome 133 ~ 135, Demo) are supported.
Intel DG1 and above
NVIDIA GT635, GTX645 and above
AMD RX460 and above
Intel HD4400, HD515 and above
AMD Radeon R7, Vega M and above
Apple M1, M1 Pro, M1 Max, M1 Ultra and above
Qualcomm Adreno 618 and above
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 >= 133 enables HEVC decoding support by default (Windows platform only). It also supports HEVC Main and Main10 profile (HDR contents usually encoded with Main10 profile), but doesn't seems able to render HLG/PQ correctly.
There are two type of support type here:
For the first type, currently only Chromecast and Windows platforms have very limited support. On Windows platform, Chrome supports encrypted Dolby Vision content, for versions of Chrome >= 110, when manually passing --enable-features=PlatformEncryptedDolbyVision switch and launch Chrome and when the system has installed the Dolby Vision extension and HEVC video extension, Profile 4/5/8 will be supported, "Supported" will be returned when querying the API (Note: For external HDR displays, if HDR mode is turned on, Microsoft's MediaFoundation has a bug and will not return "Supported" results).
For the second type, Profile 8/9 with cross-compatibility such as HLG, HDR10, SDR, using API to query with dvh1, dvhe, dva1, dvav will return "not supported" (for example :MediaSource.isTypeSupported('video/mp4;codecs="dvh1.08.07"')), while when querying with hvc1, hev1, avc1, avc3, "supported" will be returned. The specific version of Chrome has different implementation details:
Chrome >= 122. as long as the platform supports HEVC, then it is supported. Assuming that the API used by developers is MSE, the logic will be something like below:
…
Versions 110 ~ 121 of Chrome on Windows, Dolby Vision is not playable at all if its not encrypted, this is a bug of the browser. Chrome on other platforms, such as macOS, Android, etc, as long as constructing source buffer with hvc1, hev1, avc1, avc3 and the sample entry is not dvh1, dvhe, dva1, dvav, then the playback should be success.
Versions 107 ~ 109 of Chrome, if constructing source buffer with hvc1, hev1, avc1, avc3 and the sample entry is not dvh1, dvhe, dva1, dvav, then the playback should be success.
Chrome 107 does not support the ability to extract HEVC static metadata, and all HDR10 video playback are downgraded to PQ only mode. HLG videos uses the video processor API provided by the GPU vendor for processing tone-mapping has a poor performance on some laptops, and playing 4K video may cause frame dropping.
Chrome 108 supports the ability to extract HEVC static metadata. For videos with static metadata written in the container, the playback is okay on 108, but some videos are not written static metadata to their containers, thus Chrome 108 can not extract the static metadata from these videos which causing the playback to be downgraded to PQ only mode, and the max content light level maybe cut to a low value for these videos. In addition, the HLG Tone-mapping algorithm on Windows platform has been switched to Chrome's own algorithm, which solves the problem of bad performance on the laptop when using video processor for HLG Tone-mapping. However, Chrome has been using 8 bit for Tone-mapping, which resulting an insufficient contrast ratio of the Tone-mapping result.
Chrome 109 makes the HDR -> SDR process to a 16 bit + zero copy process, which improves the accuracy of PQ Tone-mapping on Windows platform, thus the problem of the insufficient contrast ratio for HLG has been also solved, and the video memory usage has been reduced by about 50%.
Chrome 110 solves the problem of incomplete static metadata extraction. It supports the extraction of static metadata from both the bitstream and the container, thus the max content light level issue has been solved, and at this point all HDR issues should have been resolved.
Chrome 119 fixed 10bit video playback issues for AMD GPU on Windows platform (black screen when playing HLG video in SDR mode, 4K freezes, high memory usage, color change when switching full-screen, crash when playing SDR video in HDR mode).
Chrome 122 improved Dolby Vision cross-compatible playback ability.
Chrome 123 ensures that on Windows platforms, PQ/HDR10 video can be rendered at absolute brightness when system HDR mode is enabled. It also solves the problem of abnormal Tone-mapping issue when the window is dragged between SDR monitor / HDR monitor when multiple monitors are connected.
Chrome 124 solves the issue that on Windows platform when the NVIDIA RTX Auto HDR feature is enabled, page scrolling will cause video brightness transition.
Chrome 125 solves all issues with Intel HDR10 MPO, the feature has been re-enabled.
Edge 125 solves the issue of no zero-copy output when using
Linux VaapiVideoDecoder HEVC 硬解码支持的现况总结
Windows平台下HEVC with Alpha的解码实现?+同步相关的编码器的更新
Add information about parsing errors in HEVC
Add info about PlayReady support on Windows
HEVC on Firefox macOS
linux 如何开启hevc硬解码
Linux HW decode NOT work
linux xorg 进程 CPU会逐渐变成100%, 内存也在增大
下载了你的 chromium_110.0.5481.54_linux_x64_with_hevc_hw_decode_encode_support.deb还是没有hevc硬解