Been working this project for a bit, and now just down to the last issue. The audio worked fine, but when i go to the video, the encrypted size is 57MB, but only getting a 1K output.
What would cause this?
Should have added this part which may be the issue, or part of it. The site is using 3 WV Keys, one for the init file, one for the audio (same key for both the audio init and audio segments) and then the last key is for the video segments. This is all confirmed in the MPD file, that all three keys are being used for those items.
+ Reply to Thread
Results 1 to 14 of 14
Last edited by SoConfused; 10th May 2021 at 12:32. Reason: More Info
Make sure you're using the correct track ID for the audio key.E.g. if audio is track id #4,then with mp4decrypt it should be --key 4:key_here
You can check track ID with mediainfo (and then under view->text)
the audio is fine, it is the darn video that is grumpy. I am working on i think maybe the new MPD format, so had to customize many of the tools, because the info for the download is very different, so i am a bit stuck. It is still Widevine, but very funky when looking at other MPD files.
Do i maybe need to decrypt each segment on its own before, merging? currently (which i thought is how it works) is i download all the fragments, then merge them into one, then run it through the decryptor. For example the video, has 620 fragments, plus the init file (audio has a matching fragment as well). When i merge the encrypted files, i get 57MB which is what i am expecting, but when i run mp4decrypt --key kid:key enc.mp4 dec.mp4, dec.mp4 is 1K on the output.
so i guess, at this point is, do i decrypt as a whole, or decrypt as the fragment then merge?
provide link to the video with access.discord notaghost#9997
The 620 fragments weigh only 57 MB?
For this size, the video quality is 144p or the fragments are audio.
Only if the video is too short.
Before concatenating the 620 fragments with init.mp4, did you verify that the total file size is 57 MB?
Thanks, i hate getting booted off of sites LOL. I am still working things out, as you can guess from my post, but i am soooo close. Once I figure out why this is happening on the video, then i can finally move from a sloppy prototype, to a real tool.
Gong to try a couple more things today/tonight, got thinking that i may need to decrypt before the merge of fragments, i am using "copy /b" for merging, and it may be changing the inside and not able to decrypt. the other thought was maybe i need to merge and decrypt by "sections". In the MPD, each period tag is given a fragment range, for example the first one handles segments 0-158, then the next could be 159-300, but they are all using the same key.
But i know from working with stuff like this, if it is not assembled right, you will never get in the clear.
I have to be doing something really wrong, or i am using an old version of MP4Decryt (1.4 Bento V1.6). No matter how i do it, the file gets smaller, and get the following
[Attachment 58816 - Click to enlarge]
here is the CMD i am using, the m4f is the format from the DL, but does not matter if i give it a mp4, does the same thing:
mp4decrypt --key c00ee58fed524d41849c0a0c01488f6b:cf8f5a4225a75ca05b0441eee4e303f9 M.m4f DV.m4f
OK, i kind of figured out my problem, but made a new one LOL. if i merge the init and all the segments, mp4decrypt gives me the right output size, but is scrambled, which is what i was expecting, because the init file has its own key.
How do i get the init file in the clear, with one key, and all the segments in the clear with a different one? is there a different tool, since it appears the one i am using needs the init file to get the right size output, rather than just decrypt. the Audio is easy it uses one key for all the files including the init for audio. Video uses 2, 1 for init file, and 1 for all the other parts.
you can try using multiple keys for mp4decrypt:
mp4decrypt --key <kid1>:<key1> --key <kid2>:<key2> --key <kid3>:<key3> <input> <output>
Yes i tried that way a few different ways, i used the hex value for the KID, and also tried using 1: 2: 3: with the proper key to each ID, based on what i was seeing inside the media files, and inside the MPD, still did not work.
Have you tried a User-agent switcher to see if the server will throw up an unencrypted m3u8 ? To (potentially) save all this malarkey.