VideoHelp Forum
+ Reply to Thread
Page 1 of 4
1 2 3 ... LastLast
Results 1 to 30 of 91
Thread
  1. Hi there,

    I've been reading through a post on here of how to figure out the pssh if one isn't shown in the mpd, it says you can determine this by the cenc:default_KID= and the schemeIdUri=

    I'm trying to figure out the pssh from this info using https://tools.axinom.com/decoders/PsshBox when I input that info I get an error, could someone please explain what I'm doing wrong? Thanks again for all the help on this great board it is much appreciated.

    urn:uuid:EDEF8BA9-79D6-4ACE-A3C8-27DCD51D21ED
    cenc:default_KID="00000000-0000-0000-0000-000004140946"
    Quote Quote  
  2. Originally Posted by kev043 View Post
    Hi there,

    I've been reading through a post on here of how to figure out the pssh if one isn't shown in the mpd, it says you can determine this by the cenc:default_KID= and the schemeIdUri=

    I'm trying to figure out the pssh from this info using https://tools.axinom.com/decoders/PsshBox when I input that info I get an error, could someone please explain what I'm doing wrong? Thanks again for all the help on this great board it is much appreciated.

    urn:uuid:EDEF8BA9-79D6-4ACE-A3C8-27DCD51D21ED
    cenc:default_KID="00000000-0000-0000-0000-000004140946"
    Not that but this: https://tools.axinom.com/generators/PsshBox

    Image
    [Attachment 63118 - Click to enlarge]
    Quote Quote  
  3. Ah thanks zackmark29, I wondered why it was different. Cheers
    Quote Quote  
  4. Hello, how is the pssh generated? I mean the encryption, what type is it, etc...
    It is to make a script that generates them automatically since many mpd that I have do not have them.
    Greetings, thank you.
    Quote Quote  
  5. Originally Posted by ga2p View Post
    Hello, how is the pssh generated? I mean the encryption, what type is it, etc...
    It is to make a script that generates them automatically since many mpd that I have do not have them.
    Greetings, thank you.
    Every mpd has to contain the pssh (in some format or another)
    Last edited by codehound; 29th Jan 2022 at 19:07.
    Quote Quote  
  6. Hello,

    For example, these two MPDs don't have the pssh embedded, nor does the KID, I think it gets it from the first call to mp4.
    https://file.io/5HKbWWB3QWBG

    This one has the KID but not the PSSH
    https://file.io/SDtH5LaORk4Q

    That's why I asked how the PSSH was generated and if it could be generated in python or php or another language without having to use tampermonkey.

    Thank you
    Quote Quote  
  7. Hello, I'm sorry, it seems that it is deleted after a short time.

    The first MPD (has no KID) is: https://fromsmash.com/ZTLKEBj4yN-ct
    The second MPD is: https://fromsmash.com/dtyQAU.BQ7-ct

    I will try with the information you gave me, thanks.
    Quote Quote  
  8. If there's no pssh data at all then your best bet is to use mp4dump on the first fragment/init file to grab the kid and convert to pssh like above
    Quote Quote  
  9. 3 methods to find PSSH:

    1- The simplest one: PSSH is clearly indicated in MPD file. Download MPD file (browser add-on "MPD Detector" will give you MPD link), open it with Notepad, search for pssh value.

    2- If there is KID, but no PSSH in MPD, calculate PSSH by using KID:

    https://tools.axinom.com/generators/PsshBox

    3- EME Logger script (installed on "Tampermonkey" add-on) will give you init data. That's your PSSH... Developer Tools>Console, under "MediaKeySession::generateRequest" you will find Init Data.

    If that Init Data is very very long, convert it to HEX:

    https://base64.guru/converter/decode/hex

    Find the Widevine-characteristic segment: 7073736800000000edef8ba979d64acea3c827dcd51d21ed

    PSSH box = PSSH header + PSSH system ID (for Widevine, EDEF8BA9-79D6-4ACE-A3C8-27DCD51D21ED) + 32-bit data size (0000001c) + PSSH payload
    PSSH header is (000000xx70737368), you will take the 8 digits before 7073... xx is changeable.

    Copy from "8 digits before 7073" to the end. These are in HEX. Convert it to Base64 again. That's your PSSH. The image will make it clear:

    Image
    [Attachment 63189 - Click to enlarge]
    Quote Quote  
  10. Originally Posted by ridibunda View Post
    3 methods to find PSSH:

    Copy from "8 digits before 7073" to the end
    Should it always be "to the end", if not, how to decide where to stop copying?
    Asking because in this post, it's not copied "to the end": https://forum.videohelp.com/threads/404775-Need-help-to-download-videos#post2648258
    Quote Quote  
  11. Originally Posted by fisfisa View Post
    Should it always be "to the end", if not, how to decide where to stop copying?
    Asking because in this post, it's not copied "to the end": https://forum.videohelp.com/threads/404775-Need-help-to-download-videos#post2648258
    First, find that WV-system ID part. Once you find it, you will notice where PSSH box ends:

    PSSH box = PSSH header + PSSH system ID (EDEF8BA9-79D6-4ACE-A3C8-27DCD51D21ED) + 32-bit data size (0000001c) + PSSH payload

    The values you copy are building up a WV-PSSH box actually.

    In my case (the all sites I use), "the end" was really "at the end". So, I wrote "copy to the end".

    In your case, ending point of WV-PSSH box could be different, I can't know. I have no idea which sites you use.

    And remember: That's the last resort. Because you will only have to use that method when there is no PSSH or KID in MPD and when EME Logger doesn't give you the exact PSSH (a shorter init data).
    Quote Quote  
  12. If you still can't understand...

    After Base64>HEX conversion, you will find a Widevine-PSSH box like this:

    000000347073736800000000edef8ba979d64acea3c827dcd51d21ed0000001408011210d46997150ece4f3ca1b249bdb8be1102

    PSSH header is always 000000xx70737368 - xx is changeable, here it is 34 and you will take 6 zeros before it.

    Then comes 8 zeros.

    Then, system ID. For Widevine, it is edef8ba979d64acea3c827dcd51d21ed. You will easily find that value after HEX conversion.

    Then, 32 bit data (0000001x format), here x is 4.

    Then PSSH payload. 40 digits in my case, could be more or less.

    They are shown in different colors.
    Last edited by ridibunda; 25th Feb 2022 at 05:51.
    Quote Quote  
  13. Thank you @ridibunda, I think I get it now, extracted some psshs succesfully, thanks for good explanations.
    Quote Quote  
  14. If you have KID in your MPD, never use HEX conversion method. Just use KID to calculate PSSH: https://tools.axinom.com/generators/PsshBox

    Some say "init mp4 file can be used to find PSSH" but I've never used that method.

    I have never seen an "init mp4" file in Dev Tools. An "init dash" file yes, but an "init mp4" file no. And there was no KID or PSSH in the "init dash" files. So, EME Logger helped me out.

    "Init" means "the first one". In the streaming method called "DASH", lots of dash files (fragments) for videos, audios and subtitles (all seperately), are incoming. Thanks to yt-dlp, we are able to download and merge hundreds, thousands of fragments.
    Quote Quote  
  15. Originally Posted by ridibunda View Post
    I have never seen an "init mp4" file in Dev Tools. An "init dash" file yes, but an "init mp4" file no. And there was no KID or PSSH in the "init dash" files. So, EME Logger helped me out.
    My experience is almost completely the opposite.
    Quote Quote  
  16. Originally Posted by ridibunda View Post
    If you have KID in your MPD, never use HEX conversion method. Just use KID to calculate PSSH: https://tools.axinom.com/generators/PsshBox

    Some say "init mp4 file can be used to find PSSH" but I've never used that method.

    I have never seen an "init mp4" file in Dev Tools. An "init dash" file yes, but an "init mp4" file no. And there was no KID or PSSH in the "init dash" files. So, EME Logger helped me out.

    "Init" means "the first one". In the streaming method called "DASH", lots of dash files (fragments) for videos, audios and subtitles (all seperately), are incoming. Thanks to yt-dlp, we are able to download and merge hundreds, thousands of fragments.

    Can post a init.dash... i pretty sure PSSH is in it.
    Quote Quote  
  17. Originally Posted by [ss]vegeta View Post
    My experience is almost completely the opposite.
    I use 4 sites:

    On 3 of them, Dev.Tools-Network shows me lots of dash files (fragments) incoming.

    On the other site, I see single-mp4-files incoming (One mp4 file for each video resolution and one mp4 file for each audio language).

    Never seen an "init mp4" file.

    Never worked with an "init dash" either. Three methods are going well so far.
    Quote Quote  
  18. If you are filtering the url for mpd (or lic, wv etc) you may not see the init.mp4. If you dont filter the url for anything and F5, you may then see it. Vegeta is correct, the vast majority of sites use an init segment for both video and audio, typically named init.mp4 and init.m4a. (Audio extension can vary inc mp4 too).

    If you only use 3-4 websites you are getting a distorted narrow view of the reality out there. The vast majority of dash websites use intitialization segments.

    And the pssh and lots of other info can be gathered by running:

    Code:
    mp4dump.exe init.mp4
    Last edited by codehound; 28th Feb 2022 at 09:00.
    Quote Quote  
  19. Originally Posted by codehound View Post
    If you are filtering the url for mpd (or lic, wv etc) you may not see the init.mp4. If you dont filter the url for anything and F5, you may then see it. Vegeta is correct, the vast majority of sites use an init segment for both video and audio, typically named init.mp4 and init.m4a. (Audio extension can vary).

    If you only use 3-4 websites you are getting a distorted narrow view of the reality out there. The vast majority of dash websites use intitialization segments.

    And the pssh and lots of other info can be gathered by running:

    Code:
    mp4dump.exe init.mp4

    I'd like to know which sites they are.

    I didn't filter anything, I just looked at everything under "DevTools-Network".

    It is unnecessary to say "Your 3-4 websites do not change the reality out there".

    I never saw an "init mp4" and never used an "init mp4" to find pssh, so I wrote the three methods in a single post to help people.

    Instead of trying to make me wrong, just write your method to find pssh. People will get use of it.

    I don't think I am wrong or Vegeta is wrong, just different experiences.
    Quote Quote  
  20. No one is trying to 'make you wrong'. The 3 websites you use out of the whole internet is giving you a distorted view, because you won't accept what people with more experience like vegeta are trying to explain to you, that is; your experience of not dealing with inits is the exception to the rule, not the norm.

    Plus, you are not the OP, you hijacked the thread. The OP's original question was: "how to work out the pssh when its not in the mpd" and the surefire way is mp4dumping the init.

    The most convenient/quickest method is the EME logger tampermonkey script. There are lots of other methods too.

    Tampermonkey script in action below using the init data from Fubo USA to attain the pssh:

    Image
    [Attachment 63584 - Click to enlarge]


    Another minor little website called NBA League Pass uses init files too.

    Also recognize this one below ? Inits.

    Image
    [Attachment 63585 - Click to enlarge]
    Last edited by codehound; 28th Feb 2022 at 18:45.
    Quote Quote  
  21. Single mp4-files incoming (no init mp4. A mp4 file for each resolution and for each audio track):

    Image
    [Attachment 63593 - Click to enlarge]



    Dash files incoming (There are much more dash fragments, that is only a tiny screenshot):

    Image
    [Attachment 63594 - Click to enlarge]

    Image
    [Attachment 63595 - Click to enlarge]

    Image
    [Attachment 63596 - Click to enlarge]



    @codehound Did I really hijack this thread? "How to work out the pssh when its not in the mpd"...

    Are you blind or are you a troll? Look at the second and the third methods I wrote. One is "when there is only KID in MPD", the other one is "when there is no KID and no PSSH". What do these mean? "Pssh is not in the mpd". Use your brain.

    I wrote all the methods I used in a single post. Should I write them to other threads, so they will be harder to find? 4-5 guys thanked me for that message.

    If you don't like my posts, add me to your ignore list.
    Quote Quote  
  22. After using the keys, the video remains encrypted. Can someone help me?
    Quote Quote  
  23. What command should I use to manually select the audio (PT)?

    Image
    [Attachment 63824 - Click to enlarge]
    Quote Quote  
  24. Originally Posted by celsoricardoweb View Post
    What command should I use to manually select the audio (PT)?
    -f ID
    obviously, change ID with the long green text starting with d0
    Quote Quote  
  25. Originally Posted by ridibunda View Post
    Single mp4-files incoming (no init mp4. A mp4 file for each resolution and for each audio track):

    If you don't like my posts, add me to your ignore list.
    Udemy.com (World's largest online learning platform) does not have PSSH or KID in the ".mpd" file, it was really tricky to find it. since 99% of the internet widevine drm places it on the ".mpd" file, udemy.com puts it on the init.mp4

    I was able to get the kid from init.mp4 but was kinda confused on how to properly get pssh from those weird online converter tools with so many boxes and options that needs to be filled out...

    Thanks to "[ss]vegeta" I was able to get the system ID and Key ID...

    Image
    [Attachment 64024 - Click to enlarge]


    Anyways I was able to get the PSSH: AAAAMnBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAABISEHUXX0 puHECllyc8O0EzkkY=

    From this Key ID: 75175f4a6e1c40a597273c3b41339246

    and I got these three decryption keys from the CDM:

    1) aefc537bda2a545a80d72d93824ffcc9:32fccf818a6e210d8 ef1acec269deb6d
    2) d4d019341ba95d60be4b560e6e877ebd:87651d63fa5267667 2a714815c64f5d9
    3) 32ef1e4098665cfbb042d712b6ec527f:33750ba44971a46f9 318a5984eb74769

    oddly enough, none of those decryption keys have a matching default key id: "75175f4a6e1c40a597273c3b41339246"

    regardless of the fact, I tried decrypting some videos and it did not work...
    Last edited by rajhlinux; 26th Mar 2022 at 23:38.
    Quote Quote  
  26. Member
    Join Date
    Feb 2022
    Location
    Search the forum first!
    Search PM
    There is a function in one of @Notaghost's scripts - - that works admirably on its own, suitably dressed in a short python program, to locally produce the pssh.
    Quote Quote  
  27. Thank you !
    Last edited by gx3541; 16th Apr 2022 at 09:37. Reason: update
    Quote Quote  
  28. Code:
    AAAAiXBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAAGkIARIQF5vLbWgNSziZ1DZFdsdbsxoIY2FzdGxhYnMiQGV5SmhjM05sZEVsa0lqb2lNVGM1WW1OaU5tUTJPREJrTkdJek9EazVaRFF6TmpRMU56WmpOelZpWWpNaWZRPT0yB2RlZmF1bHQ=
    This is a valid widevine pssh

    you can check it with https://tools.axinom.com/decoders/PsshBox
    Quote Quote  
  29. Originally Posted by ElCap View Post
    Code:
    AAAAiXBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAAGkIARIQF5vLbWgNSziZ1DZFdsdbsxoIY2FzdGxhYnMiQGV5SmhjM05sZEVsa0lqb2lNVGM1WW1OaU5tUTJPREJrTkdJek9EazVaRFF6TmpRMU56WmpOelZpWWpNaWZRPT0yB2RlZmF1bHQ=
    This is a valid widevine pssh

    you can check it with https://tools.axinom.com/decoders/PsshBox

    but
    it shown
    Error! The "content ID" and the "key IDs" fields must not be used at the same time. Remove one of these fields.

    does it still valid ?
    thank you
    Quote Quote  



Similar Threads

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