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"
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays!
+ Reply to Thread
Results 1 to 30 of 91
Thread
-
-
Not that but this: https://tools.axinom.com/generators/PsshBox
[Attachment 63118 - Click to enlarge] -
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. -
Last edited by codehound; 29th Jan 2022 at 19:07.
-
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 -
first link doesnt work.
for the second link you can convert the kid to wv pssh
https://forum.videohelp.com/threads/401717-How-are-you-going-to-respond-to-widevine-l3...44#post2645744 -
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. -
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
-
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
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:
[Attachment 63189 - Click to enlarge] -
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). -
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.
-
Thank you @ridibunda, I think I get it now, extracted some psshs succesfully, thanks for good explanations.
-
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. -
-
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. -
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.
-
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. -
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:
[Attachment 63584 - Click to enlarge]
Another minor little website called NBA League Pass uses init files too.
Also recognize this one below ? Inits.
[Attachment 63585 - Click to enlarge]Last edited by codehound; 28th Feb 2022 at 18:45.
-
Single mp4-files incoming (no init mp4. A mp4 file for each resolution and for each audio track):
[Attachment 63593 - Click to enlarge]
Dash files incoming (There are much more dash fragments, that is only a tiny screenshot):
[Attachment 63594 - Click to enlarge]
[Attachment 63595 - Click to enlarge]
[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. -
After using the keys, the video remains encrypted. Can someone help me?
-
What command should I use to manually select the audio (PT)?
[Attachment 63824 - Click to enlarge] -
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...
[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.
-
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.
-
Code:
AAAAiXBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAAGkIARIQF5vLbWgNSziZ1DZFdsdbsxoIY2FzdGxhYnMiQGV5SmhjM05sZEVsa0lqb2lNVGM1WW1OaU5tUTJPREJrTkdJek9EazVaRFF6TmpRMU56WmpOelZpWWpNaWZRPT0yB2RlZmF1bHQ=
you can check it with https://tools.axinom.com/decoders/PsshBox -
Similar Threads
-
Get PSSH from ism manifest with ProtectionHeader
By jack_666 in forum Video Streaming DownloadingReplies: 81Last Post: 15th Nov 2024, 13:40 -
Get Pssh Key of MPD Files
By thegeek in forum Video Streaming DownloadingReplies: 46Last Post: 26th Mar 2022, 22:54 -
PSSH Assistance
By Civilian in forum Video Streaming DownloadingReplies: 21Last Post: 9th Jan 2022, 14:21 -
HBO GO EU license and PSSH
By PanMarSag in forum Video Streaming DownloadingReplies: 22Last Post: 14th Dec 2021, 09:54 -
Help with MPD video download - HDS doesn't work anymore
By Khalel in forum Video Streaming DownloadingReplies: 71Last Post: 9th Feb 2019, 06:11