New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Widevine integration not working #1297
Comments
You can generate the PSSH box yourself using the included
and then pass that to packager in raw key encryption mode with |
Thank you @cosmin If I use: With this DASH content: The response log is:
The proxy server is more private. If someone would like to test the proxy server URL, let me know. |
Are you able to play other Widevine content on this same platform? For example try some of the Widevine DRM streams from https://shaka-player-demo.appspot.com/demo/#audiolang=en-US;textlang=en-US;uilang=en-US;panel=ALL_CONTENT;panelData=drm:WIDEVINE;build=uncompiled and see if those play. As long as the content is encrypted correctly with the proper key and the PSSH is correct in the MPD then Shaka packager should be doing its job and the playback issues are likely between the browser and license server (including license proxy). For that it might be better to contact Widevine support at https://support.google.com/widevine/troubleshooter/6027072 |
Yes, I'm able to player other Widevine content on the same platform. What is odd is that the media internals: shows the following error: The key ID is not known to me. The WLS response, the MPD and the player logs contain the same key ID, but the value is different from the one in "media internals". Both key IDs are in hex format, so I think the difference is not due to the format. |
I suggest reaching out to Widevine support https://support.google.com/widevine/troubleshooter/6027072 to troubleshoot this further. If you do discover a bug in Shaka Packager itself please re-open it with some details, as it stands there doesn't appear to be anything actionable on the packager side. |
System info
Operating System: Ubuntu 22.04
Shaka Packager Version: packager version v2.6.1-634af65-release
Issue and steps to reproduce the problem
Packager Command:
I'm using the command below to generate Widevine-protected content.
packager in='video_cmaf_480p.mp4',stream=video,segment_template='video/480p/$Number$.m4s',playlist_name='video/480p.m3u8',init_segment='video/480p/init.mp4' --segment_duration 4 --fragment_duration 2 --enable_widevine_encryption --key_server_url https://license.widevine.com/cenc/getcontentkey/XXXXX --content_id 'XXXXX' --signer XXXXX --aes_signing_key 'XXXXX' --aes_signing_iv 'XXXXX' --protection_scheme cbcs --generate_static_live_mpd --mpd_output 'auto.mpd'
What is the expected result?
The generated video can be played normally.
What happens instead?
When I try to play the content, the playback stops after what I think is the clear lead.
Stall detected at 8.13857 for 1.183000087738037 seconds.
From the Chrome console logs, I see that the keys are "usable", but I still don't understand why the video doesn't play.
One of the points that caught my attention was the presence of "DEVICE_NOT_WHITELISTED" in the license response.
One of the messages I see in the Media Internals logs is "no key for key ID XXXXX", although the key ID present in the manifest is the same as the one listed as "usable" in the player logs.
I know the question is becoming too broad, but I think there is really something happening with the packager output.
Since I'm also implementing the Widevine License Proxy, I'll write below other outputs I think could help you better understand my scenario.
This is the license response (XXXXX is just for simplicity or confidential data):
{"status":"OK","status_message":"","license":"XXXXX","license_metadata":{"content_id":"XXXXX","license_type":"STREAMING","request_type":"NEW"},"supported_tracks":[{"type":"UHD1","key_id":"M4hBF55vXouvao+EtAEmAg=="},{"type":"HD","key_id":"2wkibceqWg+e9HteHUDfQA=="},{"type":"SD","key_id":"P7TX0e7OVbC0mGhvoERDhA=="},{"type":"AUDIO","key_id":"NQlm3CFMVmyPkAZ+5WgIAw=="}],"make":"Google","model":"ChromeCDM-Linux-x64-9","security_level":3,"internal_status":0,"session_state":{"license_id":{"request_id":"XXXXX","session_id":"XXXXX","purchase_id":"","type":"STREAMING","version":0,"original_rental_duration_seconds":604800,"original_playback_duration_seconds":20,"original_start_time_seconds":1698676051},"signing_key":"XXXXX","keybox_system_id":26834,"license_counter":0},"drm_cert_serial_number":"XXXXX","device_whitelist_state":"DEVICE_NOT_WHITELISTED","message_type":"LICENSE","platform":"linux","device_state":"RELEASED","pssh_data":{"key_id":[],"content_id":"YWNjb3VudDEtaTEtdjEtdmVyc2lvbjU="},"client_max_hdcp_version":"HDCP_NONE","client_info":[{"name":"architecture_name","value":"x86-64"},{"name":"company_name","value":"Google"},{"name":"model_name","value":"ChromeCDM"},{"name":"platform_name","value":"Linux"},{"name":"widevine_cdm_version","value":"4.10.2710.0"}],"signature_expiration_secs":620890049,"platform_verification_status":"PLATFORM_UNVERIFIED","content_owner":"XXXXX","content_provider":"XXXXX","system_id":26834,"oem_crypto_api_version":16,"resource_rating_tier":0,"service_version_info":{"license_sdk_version":"18.1.2 Built on Aug 16 2023 12:55:00 ([1692215686](tel:1692215686))","license_service_version":"widevine.license-server_20230816.06_p0"},"soc":"x64","client_capabilities":{"session_token":true,"video_resolution_constraints":true,"supported_key_type":[]}}
Side notes:
It wasn't my goal to have multiple different keys for the tests. Although I'm testing with just one track (SD) listed (in the Shaka Packager command and generated manifest), apparently the Shaka Packager either asks for or receives the other keys from WLS.
The PSSH (containing the content_id) is apparently generated by the WLS. Or would it be through Shaka Packager? I ask because in raw key mode Shaka Packager does not generate a PSSH containing the content_id and that is why I stopped using this mode.
I updated the DCSL file today. But the field "device_whitelist_state" is still equal to "DEVICE_NOT_WHITELISTED". Is Ubuntu 22.04 really not whitelisted by Widevine? If so, is that a problem? Shouldn't it stop generating the license before it even reaches the client? Or is it normal behavior for the license to be generated (including the keys) and it is up to the CDM/browser/OS to block the key from being used by the player?
The text was updated successfully, but these errors were encountered: