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.14k stars 56 forks source link

Add requirements for Widevine L1 Windows support #70

Open avelad opened 2 months ago

avelad commented 2 months ago

Can you add the requirements for Widevine L1 support for Windows?

Thanks!

StaZhu commented 2 months ago

I don't think it requires anything special, as long as HEVC is supported, then it should be supported:

/** Detect HEVC Widevine L1 support (only Windows is supported). */
try {
  await navigator.requestMediaKeySystemAccess('com.widevine.alpha.experiment', [
    {
      initDataTypes: ['cenc'],
      distinctiveIdentifier: 'required',
      persistentState: 'required',
      sessionTypes: ['temporary'],
      videoCapabilities: [
        {
          robustness: 'HW_SECURE_ALL',
          contentType: 'video/mp4; codecs="hev1.1.6.L120.90"',
        },
      ],
    },
  ]);
  console.log('Widevine L1 HEVC main profile is supported!');
} catch (e) {
  console.log('Widevine L1 HEVC main profile is not supported!');
}
avelad commented 2 months ago

Windows 10 - Chrome 124

My processor is Intel(R) Core(TM)2 Quad CPU Q8300@ 2.50GHz and my GPU is NVIDIA GeForce 730. Clear HEVC videos play in Chrome without problem.

Shaka probe support

chrome media internals

StaZhu commented 2 months ago

hmm, I thought both had the same level of support, then it seems that the two support are inconsistent.

From my understanding, MF CDM query support info from media foundation API, while clear HEVC query support info from D3D API, that the main difference, but I have no idea whats detailed requirement for MF CDM API.

StaZhu commented 2 months ago

Hmm, I am using RTX3070 and Win11, I can reproduce this "No Capablitiy" issue, it seems only Chrome/Edge 124 has such issue, when you are using Chrome/Edge 125+, its coming back, do you mind submit a issue ticket to https://issues.chromium.org ?

avelad commented 2 months ago

I have the same problem with Chrome Beta. I would like to report the problem, but I don't know how to report it... What data is necessary?

StaZhu commented 2 months ago

My understanding is that your screenshot is enough. when you finish submit the issue, please attach the crbug link here.

avelad commented 2 months ago

Done: https://issues.chromium.org/issues/336648774 ! Thanks!

StaZhu commented 2 months ago

Can you try to upgrade to Chrome 124.0.6367.92? It seems the issue has been fixed.

avelad commented 2 months ago

Same result

avelad commented 2 months ago

@xhwang-chromium can you help us with this? Thanks!

xhwang-chromium commented 2 months ago

Thanks for reporting. Let's continue the discussion in the chromium bug.