VideoHelp Forum




+ Reply to Thread
Results 1 to 14 of 14
  1. 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.

    AAAAQHBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAACAiGFlPVV RVQkU6NTM5ZjEyZjRhM2IzMTczYkjj3JWbBgAAAvRwc3NoAAAA AJoE8HmYQEKGq5LmW+CIX5UAAALU1AIAAAEAAQDKAjwAVwBSAE 0ASABFAEEARABFAFIAIAB4AG0AbABuAHMAPQAiAGgAdAB0AHAA OgAvAC8AcwBjAGgAZQBtAGEAcwAuAG0AaQBjAHIAbwBzAG8AZg B0AC4AYwBvAG0ALwBEAFIATQAvADIAMAAwADcALwAwADMALwBQ AGwAYQB5AFIAZQBhAGQAeQBIAGUAYQBkAGUAcgAiACAAdgBlAH IAcwBpAG8AbgA9ACIANAAuADAALgAwAC4AMAAiAD4APABEAEEA VABBAD4APABQAFIATwBUAEUAQwBUAEkATgBGAE8APgA8AEsARQ BZAEwARQBOAD4AMQA2ADwALwBLAEUAWQBMAEUATgA+ADwAQQBM AEcASQBEAD4AQQBFAFMAQwBUAFIAPAAvAEEATABHAEkARAA+AD wALwBQAFIATwBUAEUAQwBUAEkATgBGAE8APgA8AEsASQBEAD4A dwB3AFQASwA0AFMAbwBkAEYAVgArAFgAMQAwAHYAYQBjAFMAQg BFAEcAUQA9AD0APAAvAEsASQBEAD4APABDAEgARQBDAEsAUwBV AE0APgA1AGsASgArADcANgBDAHEAYQB0AHMAPQA8AC8AQwBIAE UAQwBLAFMAVQBNAD4APABMAEEAXwBVAFIATAA+AGgAdAB0AHAA cwA6AC8ALwB3AHcAdwAuAHkAbwB1AHQAdQBiAGUALgBjAG8AbQ AvAGEAcABpAC8AZAByAG0ALwBwAGwAYQB5AHIAZQBhAGQAeQA/AHMAbwB1AHIAYwBlAD0AWQBPAFUAVABVAEIARQAmAGEAbQBwAD sAdgBpAGQAZQBvAF8AaQBkAD0ANQAzADkAZgAxADIAZgA0AGEA MwBiADMAMQA3ADMAYgA8AC8ATABBAF8AVQBSAEwAPgA8AC8ARA BBAFQAQQA+ADwALwBXAFIATQBIAEUAQQBEAEUAUgA+AA==

    and the license may 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.
    Quote Quote  
  2. edit: wrong post
    Last edited by lomero; 8th Jan 2024 at 07:28.
    Quote Quote  
  3. System ID: PlayReady 9a04f079-9840-4286-ab92-e65be0885f95
    Quote Quote  
  4. Member
    Join Date
    Feb 2022
    Location
    Search the forum first!
    Search PM
    Originally Posted by beeman View Post
    greetings.

    [snip] 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.
    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
    Image
    [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&amp;video_id=539f12f4a3b3173b</LA_URL></DATA></WRMHEADER>
    Which is, as you thought, too long to be widevine and is in fact PlayReady.

    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
    Quote Quote  
  5. 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 license you have is correct and is the same for all videos.

    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.
    Quote Quote  
  6. 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 } } }] }
    Quote Quote  
  7. how did you get these information? with which tool or commands?

    Originally Posted by pteque View Post
    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 } } }] }
    Quote Quote  
  8. Member
    Join Date
    Apr 2024
    Location
    Lettonia
    Search Comp PM
    Originally Posted by Obo View Post
    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?
    Quote Quote  
  9. Decoded correctly. What do you need?
    Quote Quote  
  10. Member
    Join Date
    Apr 2024
    Location
    Lettonia
    Search Comp PM
    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
    Quote Quote  
  11. Give me the file 'mpd.txt'.
    Quote Quote  
  12. Member
    Join Date
    Apr 2024
    Location
    Lettonia
    Search Comp PM
    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=
    license url
    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
    I know is tokenized but i want to understand which one is the correct pssh. I saw 3/4 different one.
    Tanks a lot who want to answer to my question. I am getting crazy
    Quote Quote  
  13. Feels Good Man 2nHxWW6GkN1l916N3ayz8HQoi's Avatar
    Join Date
    Jan 2024
    Location
    Pepe Island
    Search Comp PM
    Why not use Eme logger?
    --[----->+<]>.++++++++++++.---.--------.
    [*drm mass downloader: widefrog*]~~~~~~~~~~~[*how to make your own mass downloader: guide*]
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!