greetings. this is my first time trying to download protected streaming media. for
posterity and to help others, ill leave a summary of what ive done and then ask
my question.
the first step is figuring out how to download the video. for obvious reasons i cant
go into detail what video it was but let us say that it is protected both by a sign-in
and by widevine drm. im running ubuntu so everything i do is in the terminal. this
is what i enter into the terminal to download the video.
yt-dlp --verbose --allow-u --cookies-from-browser chromium+GNOMEKEYRING [url]
its important to say that because of the way this video is protected, the cookies
that yt-dlp uses must not be very old. make sure to close your browser while yt-dlp
is scanning the cookies file. and keep in mind that yt-dlp looks in the wrong directory
for some reason, and the cookies must be manually copied into that location as far
as i can tell because the options to provide a path to the cookie file seem to be broken.
using --list-formats with the aforementioned command will list the formats that are
available. copy the format ID and use it with -f [format id] to get your desired format.
in this case, i wanted mp4.
the result of this will be an encrypted file. if you open this file with your browser it will
actually play. pretty neat.
now, at the same time that you were doing this, you also needed to be collecting the
data that is needed to decrypt the video file. there are many ways to do this, and this
is how i chose to do it. first, install the browser extension tampermonkey. this extension
runs scripts in the background for you, parsing and analyzing data that your browser
is producing. but it doesnt come loaded with the script you need. that script is called
emelogger. simply install that and then you are ready to go to the page where your target
video is hosted. i use chromium. go to more tools->developer tools in the top right.
click on the console tab. there you will see this text.
[EME] MediaKeySession::generateRequest
and text underneath that should be your pssh. next go to the network tab. type "lic" in
the search bar. there should be a url that mentions a license or requesting a license.
copy that.
next, take your pssh and license url and go to https://cdrm-project.com/ and fill in the
forms. this should result in a key that can be used to decrypt the video file.
decrypting the video file can be done with a utility published by bento4. all the necessary
tools can be downloaded from bento4.com. i downloaded the binaries directly rather
than compile them myself. the utility to use to actually decrypt the video file is
mp4decrypt. the documentation for this tool says the following
usage: mp4decrypt [--key <n>:<k>] <input> <output>
--show-progress: show progress details
--key: <n> is a track index, <k> a 128-bit key in hex
(several --key options can be used, one for each track)
so, on linux, having the video file and the tool in the same directory, simply type
mp4decrypt [key] [encrypted video file]
and you will finally be ready to watch this video, whatever it might be.
---
the pssh, gotten in the same way i described, is very long.
AAAAQHBzc2gAAAAA7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or may not be right, i dont know
https://www.youtube.com/youtubei/v1/player/get_drm_license?alt=json&key=AIzaSyAO_FJ2SlqU8Q4ST EHLGCilw_Y9_11qcW8
plugging these in to cdrm-project.com yields nothing, not found. so i would
very much like some advice as to whether im doing something wrong or if
cdrm simply doesnt have the key in this instance. thanks.
+ Reply to Thread
Results 1 to 14 of 14
-
-
If ever you get a suspect pssh have a look what is inside it by using an online-tool to decode the base64:- https://base64.guru/converter/decode.
Decoding your pssh
[Attachment 76107 - Click to enlarge]
produced this.
Code:@pssh�ï�©y�J�£�'��!� "YOUTUBE:539f12f4a3b3173bHã���ôpssh�ðy�@B�«�æ[à�_����<WRMHEADER xmlns="http://schemas.microsoft.com/DRM/2007/03/PlayReadyHeader" version="4.0.0.0"><DATA><PROTECTINFO><KEYLEN>16</KEYLEN><ALGID>AESCTR</ALGID></PROTECTINFO><KID>wwTK4SodFV+X10vacSBEGQ==</KID><CHECKSUM>5kJ+76Cqats=</CHECKSUM><LA_URL>https://www.youtube.com/api/drm/playready?source=YOUTUBE&video_id=539f12f4a3b3173b</LA_URL></DATA></WRMHEADER>
I normally use a rule-of-thumb that says widevine pssh start with 4 As and PlayReady 3 As. But that is blown-apart by this one!Noob Starter Pack. Just download every Widevine mpd! Not kidding!.
https://files.videohelp.com/u/301890/hellyes6.zip -
It's nice to see you did your homework, but youtube is slightly different than most other services.
The PSSH is essentially meaningless, and you can use the same one for all videos. You can even use a PSSH with the content id of "nothing", and it'll work:
Code:AAAAMXBzc2gBAAAA7e+LqXnWSs6jyCfc1R0h7QAAAAAAAAANIgWei2GKeEjj3JWbBg==
The issue is that youtube needs json data with the request, and cdrm-project can't handle that. You'd need to get a CDM of your own and use a script. -
As an aside, there are in fact two PSSH boxes in this base64-encoded initialization data: one Widevine and one PlayReady. Not often seen in the wild, but allowed by the CENC specification.
Code:PSSH Box v0 SystemID: DRMSystemId<edef8ba979d64acea3c827dcd51d21ed/Widevine> WidevinePsshData<protection_scheme: unknown, content_id: 594f55545542453a35333966313266346133623331373362> PSSH Box v0 SystemID: DRMSystemId<9a04f07998404286ab92e65be0885f95/PlayReady> PlayReadyPsshData { record: [PlayReadyRecord { record_type: RightsManagement, record_value: WRMHeader { version: "4.0.0.0", data: WRMData { kids: [PlayReadyKid { value: None, algid: None, checksum: None, content: "wwTK4SodFV+X10vacSBEGQ==" }], protect_info: Some(ProtectInfo { keylen: Some(16), algid: Some("AESCTR") }), checksum: Some("5kJ+76Cqats="), la_url: Some("https://www.youtube.com/api/drm/playready?source=YOUTUBE&video_id=539f12f4a3b3173b"), lui_url: None, ds_id: None, custom_attributes: None, decryptor_setup: None } } }] }
-
-
Just a curiosity if he past the content on link above I saw not show the correct PSSH but this
/Decoded
PSSH in Base64 AAAAMXBzc2gBAAAA7e+LqXnWSs6jyCfc1R0h7QAAAAAAAAANIg Wei2GKeEjj3JWbBg==
PSSH Box version 1
SystemID Widevine
DRMSystemId<edef8ba9-79d6-4ace-a3c8-27dcd51d21ed>
PSSH data WidevinePsshData<
protection_scheme: CENC,
content_id: 9e8b618a78
>
How to get the right with this information? -
sorry i know it is decoded correctly but i just want to understand what it is for. i'll explain i'm reading so many posts but i can't find the solution to my problem. i have my subscription which is playready and widevine the pssh in INIT and cenc is not widevine so i can't understand how to get i(widevine)t. it's too easy to post the link here i would like to understand how to do it myself
-
Hello,
I'm back and apologize for the late reply. Unfortunately, I don't have much time to follow up and write in detail. I'm still trying to understand how to obtain the correct PSSH. I have a non-live video for which I want to retrieve keys, but I only receive a cached key that doesn't work.
Here re more than one the MPD stream:HTML Code:https://dca-fs-live-dazn-cdn.dazn.com/z18ud114a6sn1ei7oxcd0rtsw/web/stream.mpd?channel=3914&outlet=dazn-dach&plang=en&dazn-token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3MjQ2MzU0MTUsImtpZCI6IjIwMjIxMTIzIiwicGF0aF9kIjoxLCJwYXRoIjoiYzVkNzkyMjcwNzUzYWRlNzk2YmU5MGY4ZjIwYzBlNDVjNDhlYWU0MSIsInNzaWQiOiJhZmMzMWRkMy0xZTkzLTQ0NWEtOTVjNy03N2EwZDlhNGI0YjciLCJnZW8iOiJjaCIsInVhIjoiZmY4MWQ2MTUwMzk3YzYyOWE0NzAwZTIyMzA4M2E4MWQwNzhjMmVmMyIsImlhdCI6MTcyNDU5MjIxNX0.gISaQE_wiYnN4vuVrDIt9jOwWuktJdi2_QBjvuV-YGw
HTML Code:https://csm-e-cedaznaeuw1live816-02ebc2c92d18dfbb7.tls1.yospace.com/csm/live/710517494/1.mpd;jsessionid=A92B551D8C16794F8ED9DCA78B194FC2.csm-e-cedaznaeuw1live816-02ebc2c92d18dfbb7.bln1.yospace.com?yo.lpa=true&yo.av=3&yo.up=https://dcb-ac-live.cdn.indazn.com&yo.lb=120&yo.hb=9000&dazn.articleId=12twqqrxec5cp1gh14z6b4m2f&dazn.broadcastCountry=ch&dazn.commentaryLanguage&dazn.competition=6by3h89i2eykc341oz7lv1ddd&dazn.manufacturer=microsoft&dazn.model=unknown&dazn.platform=web&dazn.deviceId=49c29afe-da3f-4102-b670-d3f29667e14f&dazn.fixture=a33mg2ybkqd12vto9wucor95x&dazn.entitlementSetId=other&dazn.nflSubscriptionStatus=Partial&dazn.fibaSubscriptionStatus=Partial&dazn.ligaSegundaSubscriptionStatus=Partial&dazn.daznSubscriptionStatus=ActivePaid&dazn.sessionId=1724591997768-Ext-04790270-12twqqrxec5cp1gh14z6b4m2f-A31909&dazn.sport=289u5typ3vp4ifwh5thalohmq&dazn.deviceCategory=Web&dazn.deviceType=web&dazn.linear=false&dazn.customerTerritory=Dach&dazn.adStitcher=YoSpace&dazn.environment=production&dazn.excludedCategories=Alcoholic%20Beverages%2CGambling%2CTobacco%2CMedicine&dazn.sid=1724591997768-Ext-04790270-12twqqrxec5cp1gh14z6b4m2f-A31909&dazn.userCountry=CH&dazn.userLanguage=de&dazn.verifyAge=false&dazn.insertion=SSAI&dazn.internalUser=false&dazn.vipUser=false&dazn.vodType&dazn.broadcastTier=5&dazn.frameRate=50&dazn.contentType&dazn.competitors=apoawtpvac4zqlancmvw4nk4o%2Ca8l3w3n0j99qjlsxj3jnmgkz1&dazn.season=73zebisnu1109jix9yoc09yc4&dazn.stage&dazn.customerType&dazn.assetDuration=10800&dazn.broadcastType=Host_Feed&dazn.homeCompetitors=a8l3w3n0j99qjlsxj3jnmgkz1&dazn.rightsHolder=151116084512&dazn.ppid=eed46ba08fbcd0840128f8e65f233748a1ca0afaf123906af3ac9201aca060fb&dazn.vid&dazn.cmsid&dazn.msid=com.dazn.web&dazn.url=com.dazn.web.adsenseformobileapps.com&dazn.an=DAZN&dazn.idtype=none&dazn.rdid=null&dazn.is_lat=0&dazn.gdpr_consent=CQD527AQD527AAcABBITBDFsAP_gAEPgAChQJzFF5C5dbWFAcHB1KPsgWYEG1tARIkQABBaBAyAFABOA4IQAwSEgMAQAgCACAQAAgVIBAAAEAABEAUCAAAAEIQBEIASQgAAIIABAAAEQAgRAAAoAAAAAEACIgAAREwQAmAiAIcLkBUAghIAACEAAgAAAAACEAAMACEAYAAIAAQIAAoBAAQIEMAIAAAEAARAAAAAAAAAAAIAAAAAAABCQTmAJAFCogAKIgICCQMIAEAIgrCAiAAAAAAkCRAAAACABwAgAokJEAAAAAAAAAgABAgACAAAQAACIAIAAAAAAQCBAAAgAAAAQAACAAAAAgAAAABAAAAAAAAEAAAAAAAgBAhCAQAAAAoAAAABAEAAAAQACAAEAAAAAIAAQAAAAAAAABACAAAQIYAQAAAAAAAAAAAAAAAAAAAAAAAAAACAgAAAA.f_wACHwAAAAA&dazn.gdpr=1&AdvTV_ConsentType=GDPR&dazn.daiIu=%2F67970281%2FAdvTV_Live_Dai%2F1gha8m3ayksxq1ijwp5sa2saza%2F289u5typ3vp4ifwh5thalohmq%2F6by3h89i2eykc341oz7lv1ddd%2FWeb&dazn.daiDpt=true&dazn.hl=de&dazn.correlator=12twqqrxec5cp1gh14z6b4m2f&dazn.vpmute=0&yo.d.ts=PT30S&yo.po=-15000ms&dazn.pd=30&externalId=z18ud114a6sn1ei7oxcd0rtsw-dazn-dach-dash-dcb
HTML Code:https://csm-e-cedaznaeuw1live816-02ebc2c92d18dfbb7.tls1.yospace.com/csm/extlive/daznprd01,z18ud114a6sn1ei7oxcd0rtsw-dazn-dach-dash-dcb.mpd?yo.lpa=true&yo.av=3&yo.up=https://dcb-ac-live.cdn.indazn.com&yo.lb=120&yo.hb=9000&dazn.articleId=12twqqrxec5cp1gh14z6b4m2f&dazn.broadcastCountry=ch&dazn.commentaryLanguage=&dazn.competition=6by3h89i2eykc341oz7lv1ddd&dazn.manufacturer=microsoft&dazn.model=unknown&dazn.platform=web&dazn.deviceId=49c29afe-da3f-4102-b670-d3f29667e14f&dazn.fixture=a33mg2ybkqd12vto9wucor95x&dazn.entitlementSetId=other&dazn.nflSubscriptionStatus=Partial&dazn.fibaSubscriptionStatus=Partial&dazn.ligaSegundaSubscriptionStatus=Partial&dazn.daznSubscriptionStatus=ActivePaid&dazn.sessionId=1724591997768-Ext-04790270-12twqqrxec5cp1gh14z6b4m2f-A31909&dazn.sport=289u5typ3vp4ifwh5thalohmq&dazn.deviceCategory=Web&dazn.deviceType=web&dazn.linear=false&dazn.customerTerritory=Dach&dazn.adStitcher=YoSpace&dazn.environment=production&dazn.excludedCategories=Alcoholic%20Beverages%2CGambling%2CTobacco%2CMedicine&dazn.sid=1724591997768-Ext-04790270-12twqqrxec5cp1gh14z6b4m2f-A31909&dazn.userCountry=CH&dazn.userLanguage=de&dazn.verifyAge=false&dazn.insertion=SSAI&dazn.internalUser=false&dazn.vipUser=false&dazn.vodType=&dazn.broadcastTier=5&dazn.frameRate=50&dazn.contentType=&dazn.competitors=apoawtpvac4zqlancmvw4nk4o%2Ca8l3w3n0j99qjlsxj3jnmgkz1&dazn.season=73zebisnu1109jix9yoc09yc4&dazn.stage=&dazn.customerType=&dazn.assetDuration=10800&dazn.broadcastType=Host_Feed&dazn.homeCompetitors=a8l3w3n0j99qjlsxj3jnmgkz1&dazn.rightsHolder=151116084512&dazn.ppid=eed46ba08fbcd0840128f8e65f233748a1ca0afaf123906af3ac9201aca060fb&dazn.vid=&dazn.cmsid=&dazn.msid=com.dazn.web&dazn.url=com.dazn.web.adsenseformobileapps.com&dazn.an=DAZN&dazn.idtype=none&dazn.rdid=null&dazn.is_lat=0&dazn.gdpr_consent=CQD527AQD527AAcABBITBDFsAP_gAEPgAChQJzFF5C5dbWFAcHB1KPsgWYEG1tARIkQABBaBAyAFABOA4IQAwSEgMAQAgCACAQAAgVIBAAAEAABEAUCAAAAEIQBEIASQgAAIIABAAAEQAgRAAAoAAAAAEACIgAAREwQAmAiAIcLkBUAghIAACEAAgAAAAACEAAMACEAYAAIAAQIAAoBAAQIEMAIAAAEAARAAAAAAAAAAAIAAAAAAABCQTmAJAFCogAKIgICCQMIAEAIgrCAiAAAAAAkCRAAAACABwAgAokJEAAAAAAAAAgABAgACAAAQAACIAIAAAAAAQCBAAAgAAAAQAACAAAAAgAAAABAAAAAAAAEAAAAAAAgBAhCAQAAAAoAAAABAEAAAAQACAAEAAAAAIAAQAAAAAAAABACAAAQIYAQAAAAAAAAAAAAAAAAAAAAAAAAAACAgAAAA.f_wACHwAAAAA&dazn.gdpr=1&AdvTV_ConsentType=GDPR&dazn.daiIu=%2F67970281%2FAdvTV_Live_Dai%2F1gha8m3ayksxq1ijwp5sa2saza%2F289u5typ3vp4ifwh5thalohmq%2F6by3h89i2eykc341oz7lv1ddd%2FWeb&dazn.daiDpt=true&dazn.hl=de&dazn.correlator=12twqqrxec5cp1gh14z6b4m2f&dazn.vpmute=0&yo.d.ts=PT30S&yo.po=-15000ms&yo.pd=30&yo.oh=Y3NtLWUtZGF6bi1ldXcxLWViLnRsczEueW9zcGFjZS5jb20=
HTML Code:https://drm.playback.indazn.com/widevine/v1/license?legacyContentId=prod-live1&contentId=z18ud114a6sn1ei7oxcd0rtsw&platform=web&manufacturer=microsoft&model=unknown&appVersion=0.44.3&uid=0012400001K6kcyAAB&accountStatus=ActivePaid&assetId=oqvkykdrlytt2l6v7rnnoxdx&aexp=1724610600000&tid=afc31dd3-1e93-445a-95c7-77a0d9a4b4b7&uexp=1724678615037&mediaType=live&mediaId=z18ud114a6sn1ei7oxcd0rtsw&metadata=country%3Dch&hash=1c4818f3098906bb4287c1017334a2bed537eab4c25f6b8444e753d94565b00d
Tanks a lot who want to answer to my question. I am getting crazy -
Why not use Eme logger?
--[----->+<]>.++++++++++++.---.--------.
[*drm mass downloader: widefrog*]~~~~~~~~~~~[*how to make your own mass downloader: guide*]
Similar Threads
-
cdrm-project.com - Cached PSSH
By stevepen1974 in forum Video Streaming DownloadingReplies: 7Last Post: 3rd Jan 2024, 14:16 -
Cdrm-Project Similar
By rekox in forum Video Streaming DownloadingReplies: 13Last Post: 10th Aug 2023, 14:14 -
cdrm-project.com errors
By euphonic in forum Video Streaming DownloadingReplies: 13Last Post: 27th Jul 2023, 05:30 -
Alternatives for CDRM-PROJECT :)
By _stream_ in forum Video Streaming DownloadingReplies: 7Last Post: 24th Jul 2023, 05:38 -
Help to use cdrm-project.com
By vidsrme in forum Video Streaming DownloadingReplies: 6Last Post: 26th Mar 2023, 05:11