When I run
it can get the hex code for the data that required to produce a full info PSSH. However, it will have a pretty big txt file.Code:mp4dump --verbosity 3 --format json XXX.mp4 > pssh.txt
[Attachment 78866 - Click to enlarge]
Any quick way to dump this info ?
Support our site by donate $5 directly to us Thanks!!!
Try StreamFab Downloader and download streaming video from Netflix, Amazon!
Try StreamFab Downloader and download streaming video from Netflix, Amazon!
+ Reply to Thread
Results 1 to 3 of 3
-
-
Jep, at least if you just search for the PSSH. Posted several times already - here's my way:
The "2048" in line 24 might be too small and might only work for "faststart MP4" where the moov atom is located at the very beginnig of the file. You can raise that number to e.g. 1 MB.Code:import base64 import sys from pywidevine import PSSH def find_wv_pssh_offsets(raw: bytes) -> list: offsets = [] offset = 0 while True: offset = raw.find(b'pssh', offset) if offset == -1: break size = int.from_bytes(raw[offset-4:offset], byteorder='big') pssh_offset = offset - 4 offsets.append(raw[pssh_offset:pssh_offset+size]) offset += size return offsets def to_pssh(content: bytes) -> list: wv_offsets = find_wv_pssh_offsets(content) return [base64.b64encode(wv_offset).decode() for wv_offset in wv_offsets] def from_file(file_path: str) -> list: with open(file_path, 'rb') as f: buffer = f.read(2048) # 1_048_576) return to_pssh(buffer) pssh_list = from_file(sys.argv[1]) target_pssh = None for item in pssh_list: pssh = PSSH(item) if pssh.system_id == PSSH.SystemId.Widevine: print(pssh) -
Similar Threads
-
How to get the widevine pssh from init mp4 JUST using python script?
By ancientbanana in forum Video Streaming DownloadingReplies: 14Last Post: 20th Nov 2024, 11:57 -
Getting keys for encrypted MP4
By ShayKeLevi in forum Video Streaming DownloadingReplies: 7Last Post: 7th Oct 2023, 06:19 -
Different PSSH in mpd, EME logger and PSSH Box Generator
By Kevste in forum Video Streaming DownloadingReplies: 4Last Post: 31st May 2023, 22:24 -
how to get the (encrypted) mp4 from a drm protected video
By stopusernames1 in forum Video Streaming DownloadingReplies: 2Last Post: 16th Jan 2022, 02:41 -
m3u8 to mp4 (AES-128 Encrypted)
By vel3ro in forum Video Streaming DownloadingReplies: 4Last Post: 19th Jul 2021, 18:11



Quote