chromiumembedded / cef

Chromium Embedded Framework (CEF). A simple framework for embedding Chromium-based browsers in other applications.
https://bitbucket.org/chromiumembedded/cef/
Other
3.38k stars 467 forks source link

widevine on recent versions seems to not work out of the box #3820

Closed LT-code closed 2 weeks ago

LT-code commented 3 weeks ago

Describe the bug I am trying to make widevine work in CEF 130 and I don't find any information on the net about it (but that widevine is downloaded automatically and should work).

To Reproduce Steps to reproduce the behavior:

  1. Download https://cef-builds.spotifycdn.com/cef_binary_130.1.2%2Bg48f3ef6%2Bchromium-130.0.6723.44_linux64_client.tar.bz2
  2. tar xvf cef_binary_130.1.2+g48f3ef6+chromium-130.0.6723.44_linux64_client.tar.bz2
  3. ./cefsimple --disk-cache-dir=./cache/ --user-data-dir=./user-cache
  4. go to https://bitmovin.com/demos/drm (or spotify)
  5. See that it does not work

Expected behavior I expect it to work out of the box as mentioned in this option https://cef-builds.spotifycdn.com/docs/109.0/structcef__settings__t.html#ae2641ed883320108351d67b02f189fbe or here https://forums.freebsd.org/threads/chromium-enable-drm-playback-by-building-the-www-linux-widevine-cdm-port-with-poudriere.91217/.

Screenshots Test made on https://bitmovin.com/demos/drm image

Versions (please complete the following information):

Additional context Does the problem reproduce with the cefclient or cefsimple sample application at the same version? Yes I have the same problem. I can see that libwidevinecdm.so was downloaded but still not working.

> ./cefsimple --disk-cache-dir=./cache/ --user-data-dir=./user-cache
> ls ./user-cache/WidevineCdm/4.10.2830.0/_platform_specific/linux_x64/libwidevinecdm.so
-rw------- 1 user user 18733688 Oct 29 10:43 root/WidevineCdm/4.10.2830.0/_platform_specific/linux_x64/libwidevinecdm.so

Does the problem reproduce with Google Chrome at the same version? Chromium doesn't seem to be impacted. Although I see that there is a widevine lib link at the same place than the chromium bin (I tried to copy it to my cefclient directory but does not work) :

> chromium --version
Chromium 130.0.6723.69 Arch Linux
> ls /usr/lib/chromium/ -l
total 283496
-rw-r--r-- 1 root root    693540 Oct 23 08:39 chrome_100_percent.pak
-rw-r--r-- 1 root root   1093307 Oct 23 08:39 chrome_200_percent.pak
-rwxr-xr-x 1 root root   2543168 Oct 23 08:39 chrome_crashpad_handler
-rwsr-xr-x 1 root root    225784 Oct 23 08:39 chrome-sandbox
-rwxr-xr-x 1 root root 263478368 Oct 23 08:39 chromium
-rwxr-xr-x 1 root root    244296 Oct 23 08:39 libEGL.so
-rwxr-xr-x 1 root root   6621152 Oct 23 08:39 libGLESv2.so
-rwxr-xr-x 1 root root     25104 Oct 23 08:39 libqt5_shim.so
-rwxr-xr-x 1 root root     27320 Oct 23 08:39 libqt6_shim.so
-rwxr-xr-x 1 root root   5059528 Oct 23 08:39 libvk_swiftshader.so
-rwxr-xr-x 1 root root    608616 Oct 23 08:39 libvulkan.so.1
lrwxrwxrwx 1 root root        58 Oct 21 17:34 libwidevinecdm.so -> WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so
drwxr-xr-x 2 root root      4096 Oct 28 17:12 locales
-rw-r--r-- 1 root root   8949946 Oct 23 08:39 resources.pak
-rw-r--r-- 1 root root    687473 Oct 23 08:39 v8_context_snapshot.bin
-rw-r--r-- 1 root root       107 Oct 23 08:39 vk_swiftshader_icd.json
drwxr-xr-x 3 root root      4096 Oct 21 17:34 WidevineCdm**

I can reproduce the same behavior in previous CEF versions (129, 128, 127).

I might be completely blind about it but I am open to be shout at and available for test whatever come to your mind to correct my mistake.

magreenblatt commented 3 weeks ago

Try running with full logging enabled and look for cdm-related messages.

LT-code commented 3 weeks ago

Hi @magreenblatt, Thank you for your awnser, I should have sent them at first. I have run it 3 times. The first time the "no library found" is normal because the cache path was cleared, that's when cef download in the cache the widevinecdm library. The second and third run, the library is found but still can't use widevine content.

1 > [1:1:1029/154259.657447:VERBOSE1:cdm_registration.cc(294)] Widevine enabled but no library found
1 > [224861:224861:1029/154259.657451:VERBOSE1:cdm_registration.cc(294)] Widevine enabled but no library found
1 > [231019:231030:1029/155007.354540:VERBOSE1:widevine_cdm_component_installer.cc(402)] Updating hint file with Widevine CDM 4.10.2830.0

2 > [227843:227843:1029/154541.137896:VERBOSE1:cdm_registration.cc(291)] Registering hinted Widevine 4.10.2830.0
2 > [1:1:1029/154541.137896:VERBOSE1:cdm_registration.cc(291)] Registering hinted Widevine 4.10.2830.0
2> [231019:231030:1029/155007.354540:VERBOSE1:widevine_cdm_component_installer.cc(402)] Updating hint file with Widevine CDM 4.10.2830.0

3 > [228657:228657:1029/154622.006002:VERBOSE1:cdm_registration.cc(291)] Registering hinted Widevine 4.10.2830.0
3 > [1:1:1029/154622.006004:VERBOSE1:cdm_registration.cc(291)] Registering hinted Widevine 4.10.2830.0
3 > [231019:231030:1029/155007.354540:VERBOSE1:widevine_cdm_component_installer.cc(402)] Updating hint file with Widevine CDM 4.10.2830.0

Even if widevine is well downloaded, it's not working.

LT-code commented 2 weeks ago

@magreenblatt Hi Marshall, do you have a fix for that ?

magreenblatt commented 2 weeks ago

Try the Widevine demos at https://shaka-player-demo.appspot.com/demo/

LT-code commented 2 weeks ago

Thx for your answer, it helped a lot. I need proprietary codecs... Do you know a link where I can download cef already built with them plz ? If not, I'll build it by my self Waiting for your answer @magreenblatt and I will close the issue (that is not an issue).

magreenblatt commented 2 weeks ago

We don't provide builds with proprietary codecs due to licensing reasons. You can search the CEF Forum for threads that provide build instructions.