VideoHelp Forum
+ Reply to Thread
Results 1 to 8 of 8
Thread
  1. I made a post yesterday but it might be better suited here. I'm trying to download video from here(You will need chrome browser and also phone number but you can use an online verification phone number) and after being told my license URL was wrong I went back to beginning to check my work and I think everything I'm doing could be wrong. It's hard for me to understand the high level that people talk on this forum and to grasp everything at once because I'm starting with little knowledge but here is what I have:

    1. PSSH
    - There is a "manifest.mpd" file that contains the PSSH and KID.
    Code:
    cenc:default_KID="e3afc61e-759c-4c63-8687-d16433fed804"/>
          <!-- Widevine -->
          <ContentProtection schemeIdUri="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed">
            <cenc:pssh>AAAAb3Bzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAAE8SEOOvxh51nExjhofRZDP+2AQaC2J1eWRybWtleW9zIiRlM2FmYzYxZS03NTljLTRjNjMtODY4Ny1kMTY0MzNmZWQ4MDQqAkhESPPGiZsG</cenc:pssh>
    - I first thought the number after pssh> was the PSSH ID as was described in most posts but after searching the forum for a second time I tried another method where I take urn:uuid (System ID) with the KID to generate the PSSH and I got a different PSSH
    Code:
    AAAAO3Bzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAABt7dp9zrV77vn1z7hzrf7zrzv53Xrjfd953zTg=
    so now I'm more confused.
    - Also the PSSH and KID changes depending on video (uuid doesn't)

    2. Licence URL
    - I read a lot on how to get the URL and I first thought it was https://wv-keyos.licensekeyserver.com/ because this was the one that had the payload in it (This was what a post on here said to look for) but I tried it on the DRM Stream Test and it said "License request failed (DRM_FAILED_LICENSE_REQUEST)". And on my post yesterday I was assured these were not the license URLs. There was only two other urls that could be the license URL but they're very long and go to a sendbird URL which I thought was only for messaging but maybe those are it?

    3. Headers
    - The headers I got by going to the license URL and doing copy > copy as cURL(bash) and then converting the bash to python. But if my license URL is wrong then this won't be right.

    4. Key
    - This is where I thought I was up to (Until yesterday) and where I was struggling most as people here seem to use l3.py and I couldn't figure out how to get that, or they use 172.106.17.134:8080 and that wasn't working for me. But this may be irrelevant if I can't get the first parts right.

    I'm not asking to be handed all the answers (Even though it would be nice) but I need some help being pointed away from wrong direction and in right direction, or given material that is at a low level that I can use to understand what is happening so any help or pointer or link to the right information for me would be good because there's so much info on so many different systems and ways to do things that it's becoming overwhelming.
    Last edited by newbi33; 1st Sep 2023 at 19:02.
    Quote Quote  
  2. 1. PSSH
    the text after "pssh>" is the correct widevine pssh.
    decode that pssh with this website and you can see that its made up of more than just the kid.

    some license servers allow you to generate the pssh from the kid, but alot dont - best to use the pssh from the mpd.
    this license server is one of the ones that allow you to generate the pssh from just the kid though.

    2. License url
    you are correct, https://wv-keyos.licensekeyserver.com/ is the license url as it has the payload in it and the request and response payloads are in bytes (unreadable)

    the request to this url https://license.sunroom.so/widevine is to get the customdata token that needs to be used the in the request to the license server above. you wont need to use this unless you want to automate it.

    3. Headers
    The only header you need is:
    Code:
    customdata: PEtleU9TQXV0aG........
    which is retrieved from the second url above, but you can just copy the header from the license request to the first url (wv-keyos)

    4. Key
    this works on 172.106.17.134:8080

    example:
    first video
    Code:
    mpd: https://d2acjb97inqimx.cloudfront.net/5c38f8dd-8f0d-4822-a8c5-7543b49262bd/dash-web/media/manifest.mpd
    pssh: AAAAb3Bzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAAE8SEGZ6iZ5TpE6vi9HyB3ihXmwaC2J1eWRybWtleW9zIiQ2NjdhODk5ZS01M2E0LTRlYWYtOGJkMS1mMjA3NzhhMTVlNmMqAkhESPPGiZsG
    license url: https://wv-keyos.licensekeyserver.com/
    headers:
        customdata: PEtleU9TQXV0aG........
    (make sure you copy in the full customdata header from your browser)
    key: 667a899e53a44eaf8bd1f20778a15e6c:a37d74e6f4458099b64962af5eed3498
    Quote Quote  
  3. Thank you so very much!

    1.
    Ok so original PSSH is correct, but that contains more than just the pssh (like the kid and others) and this is something that is different depending on license server. I will look more into how pssh works to get myself a better understanding but knowing which one is right is very helpful thank you.

    2.
    I'm glad because person in my other post told me "The license is absolutely not that" so it threw me off track and made me think everything I was doing was wrong. I guess they were wrong.

    3.
    The header part has been confusing for me, I kept going back to that customdata thinking it must be important but never understood it. I tried to find in the second url but couldn't so I will just use from the first with the payload.

    4.
    I tried it and it worked finally!! Thank you so much!

    So the build info part doesn't matter we can always leave as default?

    Now I need to learn to install mp4decrypter and try key to see if it works, on to the next challenge. You have been so helpful thank you.
    Quote Quote  
  4. No worries, not sure what that other guy was on about. He either got his sites mixed up or for some reason thinks that all sites use the same license server.....
    Quote Quote  
  5. Ignore my comment below (tried to delete but couldn't so I put it in code) it's very late for me but I did learn that different custom data can give same key.

    I do have one question, widevine delivers different content quality based on internet speed. How do I know if I'm getting the best quality available?

    Code:
    Is there a way to easily identify which manifest/custom data are aligned with each other to get the right key? 
    I was able to do one but it turned out to be a picture not the video. I tried to do the video but there's so many different manifest and custom data that when I eventually get to decrypt the video I end up with a video that is unrecognisable (presumably because the key is the wrong key?). I tried to not load anything and then only load network as soon as the video plays and yt-dl seemed to download the right video but just gathering the right data to decrypt it a little confusing. No worries if not and I know this is a different question but I thought I would ask.
    Last edited by newbi33; 13th Aug 2023 at 02:13.
    Quote Quote  
  6. The customdata is just a token that is read by the license server to determine whether that request is authorised to get the keys.
    The information on what keys to return is determined by the pssh data.

    From what I remember in the network requests, it looks like the request to get the customdata token is just before the license request and has no information about the content so I'm guessing it's only a time limited token that can be used for any license request.

    From the sample page, it has 3 videos on that one page and the browser grabs all 3 manifests at the same time. If you wanted to line up which license requests match the mpd, I'd do it by sequence. Ie. First mpd requested should be related to the first license request and so on.
    Quote Quote  
  7. Originally Posted by newbi33 View Post
    I do have one question, widevine delivers different content quality based on internet speed. How do I know if I'm getting the best quality available?
    It's not widevine but it's the browser player that determines what quality to request based on your available network bandwidth.

    As for downloading the highest quality, that is up to yt-dlp, N_m3u8dl-re or whatever download program you are using.
    For yt-dlp, use the argument "-F" for it to print out all the available qualities, so you can see whats available. Yt-dlp will choose the highest quality based on its sorting priorities which will give you the highest quality in most cases.
    If you use N_m3u8dl-re, it will give you the option to choose what quality you want plus it has the benefit of being able to download, decrypt and combine all in one command.
    Quote Quote  
  8. I've just been using the code "yt-dlp --allow-unplayable-formats url.mpd" and have been hoping it would choose the highest quality. Never heard of N_m3u8dl-re but I will look into it now, thank you again, that customdata was a massive breakthrough for me and put me properly on the right track.
    Quote Quote  



Similar Threads

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