VideoHelp Forum
+ Reply to Thread
Page 3 of 3
FirstFirst 1 2 3
Results 61 to 65 of 65
Thread
  1. Member
    Join Date
    Aug 2023
    Location
    Turkey
    Search Comp PM
    Originally Posted by Karoolus View Post
    That's what I thought as well. I think wvd is a concatenated version of the 2 separate files
    I don't want to leave any room for misinformation, and I trust you. However, none of the files I obtained here could be converted to WVD; when I checked a few of them, they were unusable. This might be the reason, as I was able to convert my own files directly and without issues.

    But still, we would never say no to a command from you.thad convert to WVD

    Best regards,
    Quote Quote  
  2. Originally Posted by Karoolus View Post
    That's what I thought as well. I think wvd is a concatenated version of the 2 separate files
    Yes, it's a "simple" Struct:
    Code:
        v2 = Struct(
            "signature" / magic,
            "version" / Const(Int8ub, 2),
            "type_" / CEnum(
                Int8ub,
                **{t.name: t.value for t in DeviceTypes}
            ),
            "security_level" / Int8ub,
            "flags" / Padded(1, COptional(BitStruct(
                # no per-device flags yet
                Padding(8)
            ))),
            "private_key_len" / Int16ub,
            "private_key" / Bytes(this.private_key_len),
            "client_id_len" / Int16ub,
            "client_id" / Bytes(this.client_id_len)
        )
    Quote Quote  
  3. Search, Learn, Download! Karoolus's Avatar
    Join Date
    Oct 2022
    Location
    Belgium
    Search Comp PM
    Originally Posted by senkron24 View Post
    Originally Posted by Karoolus View Post
    That's what I thought as well. I think wvd is a concatenated version of the 2 separate files
    I don't want to leave any room for misinformation, and I trust you. However, none of the files I obtained here could be converted to WVD; when I checked a few of them, they were unusable. This might be the reason, as I was able to convert my own files directly and without issues.

    But still, we would never say no to a command from you.thad convert to WVD

    Best regards,
    You're right, there seems to be an issue with the 2nd batch of CDMs I uploaded.
    I converted 115 other ones to .wvd and uploaded those instead.

    https://files.videohelp.com/u/303646/CDMs.zip

    This is the code I used to convert them btw:

    Code:
    import os
    import subprocess
    
    script_dir = os.path.dirname(os.path.realpath(__file__))
    subfolders = [f.path for f in os.scandir(script_dir) if f.is_dir()]
    
    for subfolder in subfolders:
        private_key_path = os.path.join(subfolder, 'private_key.pem')
        client_id_path = os.path.join(subfolder, 'client_id.bin')
        output_wvd_name = os.path.basename(subfolder) + '.wvd'
        output_wvd_path = os.path.join(script_dir, output_wvd_name)
        command = [
            'pywidevine',
            'create-device',
            '-k', private_key_path,
            '-c', client_id_path,
            '-t', 'ANDROID',
            '-l', '3',
            '-o', output_wvd_path
        ]
        subprocess.run(command, check=True)
    the .py file should be in the parent folder, it will go through all subfolders and convert .bin and .pem files into .wvd
    Quote Quote  
  4. You can also pass the two files as bytes into the Device object constructor and then call .dumps(). See here:
    https://github.com/devine-dl/pywidevine/blob/master/pywidevine/main.py#L197
    https://github.com/DevLARLEY
    Keys from just the License URL: WidevineFetch
    Quote Quote  
  5. Member
    Join Date
    Aug 2023
    Location
    Turkey
    Search Comp PM
    Thank you all very much for enlightening us and for your help. We send you great respect, love, and greetings.
    Quote Quote  



Similar Threads

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