StaZhu / 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.
MIT License
1.15k stars 56 forks source link

最新的beta版 104.0.5112.20(正式版本)beta (64 位)默认支持 #15

Closed maboloshi closed 2 years ago

maboloshi commented 2 years ago

如题, 最新的beta版 104.0.5112.20(正式版本)beta (64 位)已默认支持 不需要使用启动参数

StaZhu commented 2 years ago

目前还没有,可能是你看错了?

代码显示默认禁用:https://source.chromium.org/chromium/chromium/src/+/main:media/base/media_switches.cc;l=278?q=platformHEVCDecoderSupport&ss=chromium

maboloshi commented 2 years ago

测试视频 https://lf3-cdn-tos.bytegoofy.com/obj/tcs-client/resources/hevc_8k60P_bilibili_1.mp4 image

chrome://media-internals/ 页Player Properties输出

render_id: 71
player_id: 0
created: 2022-06-28 02:53:17.272 UTC
origin_url: https://lf3-cdn-tos.bytegoofy.com/
kFrameUrl: https://lf3-cdn-tos.bytegoofy.com/obj/tcs-client/resources/hevc_8k60P_bilibili_1.mp4
kFrameTitle: 
url: https://lf3-cdn-tos.bytegoofy.com/obj/tcs-client/resources/hevc_8k60P_bilibili_1.mp4
kTextTracks: 
kTotalBytes: 0x163974d4
kIsStreaming: false
kIsSingleOrigin: true
kIsRangeHeaderSupported: true
kRendererName: RendererImpl
pipeline_state: kPlaying
info: Effective playback rate changed from 0 to 1
kAudioTracks: [object Object]
kVideoTracks: [object Object]
kMaxDuration: 149.675
kStartTime: 0
kBitrate: 19929271
kIsAudioDecryptingDemuxerStream: false
kAudioDecoderName: FFmpegAudioDecoder
kIsPlatformAudioDecoder: false
kIsVideoDecryptingDemuxerStream: false
kVideoDecoderName: D3D11VideoDecoder
kIsPlatformVideoDecoder: true
dimensions: 7680x4320
kResolution: 7680x4320
event: kPause
seek_target: 0
duration: 149.675
video_buffering_state: [object Object]
debug: FFmpegDemuxer: av_read_frame(): End of file
audio_buffering_state: [object Object]
pipeline_buffering_state: [object Object]
StaZhu commented 2 years ago

把chrome://gpu的贴出来,chrome://media-internals的没啥用~

maboloshi commented 2 years ago

chrome://gpu

image

StaZhu commented 2 years ago

可能是命中实验了。

maboloshi commented 2 years ago

就是说 没大规模开启 全靠人品🤣

StaZhu commented 2 years ago

是的,稳定了后会全量的,也就这两个版本。

worlddemo commented 2 years ago

这个是 Google 官方确定的消息吗,目前 Google 怎么解决 HEVC 版权问题的

StaZhu commented 2 years ago

可以使用”OS“提供的解码器,这个功能是”可选“的

maboloshi commented 2 years ago

技术文 https://blog.csdn.net/ByteDanceTech/article/details/125551027

worlddemo commented 2 years ago

是这样,理论上这个功能不是技术上的问题,Google 早期应该还是出于本身的 Youtube 的因素没做支持 我们开发者提供的 HEVC pr,Google 确定会 release 到 Chrome 版本吗 比较好奇的是这个问题

StaZhu commented 2 years ago

不是技术问题,是没人做(或者意愿不强)的问题,至少之前从来没看到有人提Patch到Crrev, Chrome的朋友2020年就把ChromeOS 的 VAAPI的HEVC硬解实现好了,但是没人想着实现其他平台的,现在Win的实现是Intel这边的一个老哥因为WebRTC下的一个有人提的issue把代码实现好了2月份合进去的,我做macOS也是类似,最开始做这个仅仅是想着造福下社区,本身也不指望能被包含到正式Chrome,能合到主分支也是带着BUILDFLAG,开关不打开,代码也是并不会包含到正式Chrome内的,用Electron啥的想用也只能自己编译,因此这个Repo你看到创建时间是4月份,因为那个时间点想用这个功能只能自己拉代码编译,建的目的也是让大家不用自己重新编一遍,后面Chrome Media的朋友可能是觉得基本所有平台都实现好了,这个事情确实恶心业界很久,才同意加到Chrome Canary以及后面的正式版本的,具体内部如何被说服合入正式版,我作为开发者并不清楚,总归,HEVC现在快加入w3c标准了,如果你后面感兴趣实现硬编码或者webrtc的部分,欢迎共享代码。

sunjun commented 2 years ago

有没有版权的因素在里面 是不是支持hevc解码需要给组织交版权费