VideoHelp Forum




+ Reply to Thread
Results 1 to 4 of 4
  1. Code:
    https://cn2-cdn116.stm.trueid.net/svod/th_gn/wv/ASS202406300851/index.mpd?appid=trueid&type=svod&visitor=web&drm=wv3&uid=99642299&did=WWVZNi1nLXlhM2wwVEdzeG9neW1vR1NyM0dyZ1ZDRWI&sid=a22f13a247&rt=1769309408&maxrate=20000000&mxr=20000000&ds=86400&duration=86400&tk=pwNzT4LazcEH9BOavdSSH60somWmUO6awrESJWtq2H0
    EME Logger is not work
    Quote Quote  
  2. I think you may generate one from the "cenc:default_KID" attributes in the mpd; use e.g. https://emarsden.github.io/pssh-box-wasm/generate/
    Quote Quote  
  3. You can convert Kid to Python yourself:
    Code:
    import base64
    
    def get_pssh(kid_hex: str) -> str:
        # PSSH box header + 'pssh' + version/flags
        pssh = bytearray(b'\x00\x00\x00\x32pssh\x00\x00\x00\x00')
    
        # Widevine system ID
        pssh.extend(bytes.fromhex("edef8ba979d64acea3c827dcd51d21ed"))
    
        # KID count (1) + KID length (16)
        pssh.extend(b'\x00\x00\x00\x12\x12\x10')
    
        # KID (16 bytes)
        pssh.extend(bytes.fromhex(kid_hex))
    
        return base64.b64encode(pssh).decode("utf-8")
    
    
    kid = input("Please input KID: ").strip().replace("-", "").replace(" ", "")
    assert len(kid) == 32, "wrong KID length"
    
    print("PSSH:", get_pssh(kid))
    Quote Quote  
  4. Originally Posted by Obo View Post
    I think you may generate one from the "cenc:default_KID" attributes in the mpd; use e.g. https://emarsden.github.io/pssh-box-wasm/generate/
    Originally Posted by sesamap159 View Post
    You can convert Kid to Python yourself:
    Code:
    import base64
    
    def get_pssh(kid_hex: str) -> str:
        # PSSH box header + 'pssh' + version/flags
        pssh = bytearray(b'\x00\x00\x00\x32pssh\x00\x00\x00\x00')
    
        # Widevine system ID
        pssh.extend(bytes.fromhex("edef8ba979d64acea3c827dcd51d21ed"))
    
        # KID count (1) + KID length (16)
        pssh.extend(b'\x00\x00\x00\x12\x12\x10')
    
        # KID (16 bytes)
        pssh.extend(bytes.fromhex(kid_hex))
    
        return base64.b64encode(pssh).decode("utf-8")
    
    
    kid = input("Please input KID: ").strip().replace("-", "").replace(" ", "")
    assert len(kid) == 32, "wrong KID length"
    
    print("PSSH:", get_pssh(kid))
    Thank You
    Quote Quote  



Similar Threads

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