VideoHelp Forum


Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!


Try StreamFab Downloader and download streaming video from Youtube, Netflix, Amazon! Download free trial.


+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 30 of 31
Thread
  1. Member
    Join Date
    Feb 2023
    Location
    Germany
    Search Comp PM
    I have tried to download this video with yt-dlp, but I'm always getting an error, even if I add options I found in other threads here.
    Link: https://www.tvnow.de/x
    Errors: [TVNow] 5375577: Downloading MPD manifest
    WARNING: [TVNow] Failed to download MPD manifest: HTTP Error 403: Forbidden
    [TVNow] 5375577: Downloading MPD manifest
    WARNING: [TVNow] Failed to download MPD manifest: HTTP Error 403: Forbidden
    [TVNow] 5375577: Downloading ISM manifest
    WARNING: [TVNow] Failed to download ISM manifest: HTTP Error 403: Forbidden
    [TVNow] 5375577: Downloading ISM manifest
    WARNING: [TVNow] Failed to download ISM manifest: HTTP Error 403: Forbidden
    [TVNow] 5375577: Downloading m3u8 information
    WARNING: [TVNow] Failed to download m3u8 information: HTTP Error 403: Forbidden
    [TVNow] 5375577: Downloading m3u8 information
    WARNING: [TVNow] Failed to download m3u8 information: HTTP Error 403: Forbidden
    ERROR: [TVNow] x: Video 5375577 is DRM protected

    ERROR: [TVNow] 5375577: No video formats found!

    It can only be watched with a premium account, but it's possible to get it for 1 month for free.
    I just want to download this one video, so I would be really grateful, if someone can tell me how to download the video or can download it for me.
    Last edited by elika; 4th Feb 2023 at 15:33.
    Quote Quote  
  2. Member
    Join Date
    Feb 2023
    Location
    Germany
    Search Comp PM
    Now I was able to download the encrypted files with yt-dlp, but it's not working for me to get the keys. I have tried this approach https://cdm-project.com/cdm-tools/how-to with an emulated Android, but I don't get the client_id.bin and private_key.pem files. Can maybe someone help me with that?
    Quote Quote  
  3. Member
    Join Date
    Feb 2022
    Location
    Search the forum first!
    Search PM
    Originally Posted by elika View Post
    Now I was able to download the encrypted files with yt-dlp, but it's not working for me to get the keys. I have tried this approach https://cdm-project.com/cdm-tools/how-to with an emulated Android, but I don't get the client_id.bin and private_key.pem files. Can maybe someone help me with that?
    Maybe ask there first?
    Quote Quote  
  4. your key

    Code:
    5f192f698883215f02a25f78e2a26214:01f5f0ea0c250eaaad3b2ea2328f3fe3
    your file

    https://www.transfernow.net/dl/20230204yYz2AR72

    Cdrm don't work to get the key...problem geo-loc

    you have to dump your own L3 cdm from an android Device (virtual or physical) to get the key for your site.

    Some readings

    https://forum.videohelp.com/threads/404994-Decryption-and-the-Temple-of-Doom
    https://forum.videohelp.com/threads/408031-Dumping-Your-own-L3-CDM-with-Android-Studio
    Quote Quote  
  5. Member
    Join Date
    Nov 2022
    Location
    Europe
    Search PM
    Originally Posted by cedric8528 View Post
    your key

    Code:
    5f192f698883215f02a25f78e2a26214:01f5f0ea0c250eaaad3b2ea2328f3fe3
    Would you mind explaining how you dealt with the [Key] field in the license request? I keep getting this error:

    Code:
    license response status: <Response [200]>
    server reports: {"status":"denied","message":"Field [key] is not set or null."}
    I tried adding it to headers as key = 'xxxxxxx' but that did not work. Would really appreciate any help.
    Quote Quote  
  6. in the headers file, you just need "x-auth-token"
    Quote Quote  
  7. Member
    Join Date
    Feb 2023
    Location
    Germany
    Search Comp PM
    Originally Posted by cedric8528 View Post
    your key

    Code:
    5f192f698883215f02a25f78e2a26214:01f5f0ea0c250eaaad3b2ea2328f3fe3
    your file

    https://www.transfernow.net/dl/20230204yYz2AR72
    Many thanks for the file. But it's just the first 14:30 minutes. Is it maybe possible to download the full 43:31 minutes?
    Quote Quote  
  8. Member
    Join Date
    Nov 2022
    Location
    Europe
    Search PM
    Originally Posted by cedric8528 View Post
    in the headers file, you just need "x-auth-token"
    Damn, I curled the wrong license.

    Thanks! Appreciate the response.
    Quote Quote  
  9. Member
    Join Date
    Feb 2023
    Location
    Germany
    Search Comp PM
    Originally Posted by cedric8528 View Post
    your key

    Code:
    5f192f698883215f02a25f78e2a26214:01f5f0ea0c250eaaad3b2ea2328f3fe3
    I have also tried to decrypt the video with the key and mp4decrypt, but it's still black. I have downloaded the video and audio like this: "yt-dlp --allow-unplayabl https://vodnowusoawsdash-a.akamaihd.net/x.ism/.mpd"
    Is the key maybe different when I'm on a macOS using the Brave browser?
    Last edited by elika; 4th Feb 2023 at 15:34.
    Quote Quote  
  10. Originally Posted by elika View Post
    Originally Posted by cedric8528 View Post
    your key

    Code:
    5f192f698883215f02a25f78e2a26214:01f5f0ea0c250eaaad3b2ea2328f3fe3
    I have also tried to decrypt the video with the key and mp4decrypt, but it's still black. I have downloaded the video and audio like this: "yt-dlp --allow-unplayabl https://vodnowusoawsdash-a.akamaihd..mpd"
    Is the key maybe different when I'm on a macOS using the Brave browser?
    Try this one:
    Code:
    951fd6bc3a447705f4a49bfa39e7350c:67e641381a466744af512909ff05e57d
    Last edited by larits; 5th Feb 2023 at 05:55.
    Quote Quote  
  11. Member
    Join Date
    Feb 2023
    Location
    Germany
    Search Comp PM
    Originally Posted by larits View Post

    Try this one:
    Code:
    951fd6bc3a447705f4a49bfa39e7350c:67e641381a466744af512909ff05e57d
    Yes, it works with this key Thank you!
    Finally I was able to decrypt it, after sitting the whole day on this.
    Quote Quote  
  12. if you want you can do that in one step with N_m3u8DL-RE (with the good key from Larits )

    https://github.com/nilaoda/N_m3u8DL-RE


    Code:
    N_m3u8DL-RE -M format=mp4 --key 951fd6bc3a447705f4a49bfa39e7350c:67e641381a466744af512909ff05e57d "https://vodnowusoawsdash-a.akamaihd.net/p11114/manifest/rtlplushd/5375577-2/10000.ism/.mpd"
    Quote Quote  
  13. Member
    Join Date
    Feb 2023
    Location
    Germany
    Search Comp PM
    Originally Posted by cedric8528 View Post
    if you want you can do that in one step with N_m3u8DL-RE (with the good key from Larits )

    https://github.com/nilaoda/N_m3u8DL-RE


    Code:
    N_m3u8DL-RE -M format=mp4 --key 951fd6bc3a447705f4a49bfa39e7350c:67e641381a466744af512909ff05e57d "https://vodnowusoawsdash-a.akamaihd.net/p11114/manifest/rtlplushd/5375577-2/10000.ism/.mpd"
    Thanks, maybe another time.
    I just put everything together with ffmpeg.
    Last edited by elika; 5th Feb 2023 at 04:57.
    Quote Quote  
  14. Somehow it's not working.... i get a small file....

    20:12:47.283 WARN : Muxing to _2023-05-08_13-37-12.MUX.mp4
    20:12:47.854 WARN : [mov,mp4,m4a,3gp,3g2,mj2 @ 000001c283f65380] Incorrect number of samples in encryption info
    20:12:47.855 WARN : [mov,mp4,m4a,3gp,3g2,mj2 @ 000001c283f65380] Could not find codec parameters for stream 0 (Video:
    h264 (avc1 / 0x31637661), none(tv, bt470bg/unknown/unknown), 960x540, 2799 kb/s): unspecified pixel format
    20:12:47.856 WARN : Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
    20:12:48.198 WARN : [mov,mp4,m4a,3gp,3g2,mj2 @ 000001c2976bf640] Incorrect number of samples in encryption info
    20:12:48.202 WARN : [mp4 @ 000001c283f37180] track 1: codec frame size is not set
    20:12:48.203 WARN : [mov,mp4,m4a,3gp,3g2,mj2 @ 000001c2976bf640] Incorrect number of samples in encryption info
    20:12:48.203 WARN : [mov,mp4,m4a,3gp,3g2,mj2 @ 000001c283f65380] Incorrect number of samples in encryption info
    20:12:48.203 WARN : _2023-05-08_13-37-12.de.mp4: Invalid data found when processing input
    20:12:48.203 WARN : _2023-05-08_13-37-12.de.m4a: Invalid data found when processing input
    Quote Quote  
  15. Originally Posted by machitza View Post
    Somehow it's not working.... i get a small file....

    20:12:48.203 WARN : [mov,mp4,m4a,3gp,3g2,mj2 @ 000001c2976bf640] Incorrect number of samples in encryption info
    20:12:48.203 WARN : [mov,mp4,m4a,3gp,3g2,mj2 @ 000001c283f65380] Incorrect number of samples in encryption info
    You're using incorrect decryption keys.
    Quote Quote  
  16. I guess that... so where can i get the key... ?
    Thanks!
    Quote Quote  
  17. You'll need access to a CDM, either your own or with a service like https://cdrm-project.com/. Read the sticky threads in the forum for more information,

    Or you could post your video here and someone might get them for you. Just be aware that if premium/subscription is required, you need to share credentials.
    Quote Quote  
  18. Try this one:

    Code:
    5f7edc4453d334b91a34ad135e1b973a:4fd421735a637682e212ef7b0f8c5256
    Quote Quote  
  19. (for non premium content's)
    video link > key

    Image
    [Attachment 70992 - Click to enlarge]


    Code:
    from pywidevine.L3.cdm import cdm, deviceconfig
    from base64 import b64encode
    from pywidevine.L3.decrypt.wvdecryptcustom import WvDecrypt
    
    import requests
    import re
    
    print('\ntest link: https://www.tvnow.de/shows/sing-meinen-song-das-tauschkonzert-7007/staffel-10/episode-1-stefanie-kloss-silbermond-5434807\ntest link: https://www.tvnow.de/shows/grill-den-henssler-2471/staffel-2023/episode-3-mit-christine-urspruch-the-bosshoss-pierre-m-krause-5440786\n')
    
    link = input('link: ')
    link_id = re.findall(r'-(\d+)$', link)[0].strip()
    
    headers1 = {
        'authority': 'bff.apigw.tvnow.de',
        'accept': 'application/json, text/plain, */*',
        'origin': 'https://www.tvnow.de',
        'referer': 'https://www.tvnow.de/',
        'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36 Edg/113.0.1774.42',
    }
    
    params1 = {
        'playertracking': 'true',
    }
    
    response1 = requests.get('https://bff.apigw.tvnow.de/player/'+link_id+'', params=params1, headers=headers1).json()
    
    format = response1['videoConfig']['meta']['format']
    title = response1['videoConfig']['meta']['title']
    a_title = f'{format} - {title}'
    print(f'\n{a_title}\n')
    
    dashUrl = response1['videoConfig']['sources']['dashUrl']
    print(f'{dashUrl}\n')
    
    jwt = response1['pageConfig']['user']['jwt']
    
    import requests
    
    headers2 = {
        'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9',
        'Connection': 'keep-alive',
        'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36',
    }
    
    response2 = requests.get(dashUrl, headers=headers2).text
    
    pssh = re.findall(r'<cenc:pssh>(.{20,170})</cenc:pssh>', response2)[0].strip()
    print(f'{pssh}\n')
    
    lic_url = 'https://widevine.tvnow.de/index/license'
    
    headers = {
        'origin': 'https://www.tvnow.de',
        'referer': 'https://www.tvnow.de/',
        'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36 Edg/113.0.1774.42',
        'x-auth-token': jwt,
        'content-type': 'application/x-www-form-urlencoded',
    }
    
    def WV_Function(pssh, lic_url, cert_b64=None):
        wvdecrypt = WvDecrypt(init_data_b64=pssh, cert_data_b64=cert_b64, device=deviceconfig.device_android_generic)                   
        widevine_license = requests.post(url=lic_url, data=wvdecrypt.get_challenge(), headers=headers)
        license_b64 = b64encode(widevine_license.content)
        wvdecrypt.update_license(license_b64)
        Correct, keyswvdecrypt = wvdecrypt.start_process()
        if Correct:
            return Correct, keyswvdecrypt
    Correct, keys = WV_Function(pssh, lic_url)
    
    st=''
    for key in keys:
      st+=' --key '+key
    with open("key.txt","a+") as f:
      f.write(st[1:]+'\n')
    
    with open("key.txt", "r") as f2:
        key_s = f2.read()
        print(key_s)
    Quote Quote  
  20. wow nice script mate
    Quote Quote  
  21. Originally Posted by lomero View Post
    wow nice script mate
    thanks, I don't have a premium account, but from the way the site is set up
    i think only need to change the top to add token and not request from "nothing"
    then it will work with premium content too
    Quote Quote  
  22. thanks everybody ! it worked.... now can someone help for modules? i got No module named 'pywidevine.L3'. i did >pip install pywidevine...
    Quote Quote  
  23. Originally Posted by machitza View Post
    thanks everybody ! it worked.... now can someone help for modules? i got No module named 'pywidevine.L3'. i did >pip install pywidevine...
    this script is based on the old wks pywidevine, if you installed pywidevine via pip it will not work
    you will have to modify the script or
    Code:
    pip uninstall pywidevine -y
    and you have to get the old wks pywidevine.zip
    and unzip it and put it where the script is
    and you will also need a working L3 cdm
    and put the two files
    device_client_id_blob, device_private_key
    here:
    pywidevine\L3\cdm\devices\android_generic\
    Quote Quote  
  24. is there a easier way to get the mpd file from the webpage ? it seems i tried many pieces of software and i forgot how to get that
    Quote Quote  
  25. Search, Learn, Download! Karoolus's Avatar
    Join Date
    Oct 2022
    Location
    Belgium
    Search Comp PM
    You can just start the video on the website and look in the developer console for the MPD URL.
    Quote Quote  
  26. Member
    Join Date
    Jun 2023
    Location
    Germany
    Search PM
    @sk8ordi3, thanks for your script, i downloaded crypted video/audio files of other show, used your script but after running mp4decrypt with that key it returns still crypted content, so there's no audio and video looks exactly the same as before mp4decrypt.
    I even tried it with the same links to source files from this topic (got exactly the same key) and same result.

    Am i missing some step somewhere?
    Quote Quote  
  27. no problem for me, are you using german vpn anyway?

    Image
    [Attachment 71473 - Click to enlarge]
    Quote Quote  
  28. Member
    Join Date
    Jun 2023
    Location
    Germany
    Search PM
    Yes, it's working fine when I'm viewing it in the browser
    Image Attached Thumbnails Click image for larger version

Name:	cr.png
Views:	58
Size:	523.4 KB
ID:	71475  

    Quote Quote  
  29. can't see that you would add the --key to the N_m3u8DL-RE command..

    try with these
    added the download section

    Code:
    from pywidevine.L3.cdm import cdm, deviceconfig
    from base64 import b64encode
    from pywidevine.L3.decrypt.wvdecryptcustom import WvDecrypt
    
    m3u8DL_RE = 'N_m3u8DL-RE.exe'
    
    from pathlib import Path
    import requests
    import subprocess
    import re
    import os
    
    files_to_delete = ["key.txt"]
    for file_name in files_to_delete:
        if os.path.exists(file_name):
            os.remove(file_name)
            print(f"{file_name} file successfully deleted.")
    
    print('\ntest link: https://www.tvnow.de/shows/sing-meinen-song-das-tauschkonzert-7007/staffel-10/episode-1-stefanie-kloss-silbermond-5434807\ntest link: https://www.tvnow.de/shows/grill-den-henssler-2471/staffel-2023/episode-3-mit-christine-urspruch-the-bosshoss-pierre-m-krause-5440786\n')
    
    link = input('link: ')
    link_id = re.findall(r'-(\d+)$', link)[0].strip()
    
    headers1 = {
        'authority': 'bff.apigw.tvnow.de',
        'accept': 'application/json, text/plain, */*',
        'origin': 'https://www.tvnow.de',
        'referer': 'https://www.tvnow.de/',
        'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36 Edg/113.0.1774.42',
    }
    
    params1 = {
        'playertracking': 'true',
    }
    
    response1 = requests.get('https://bff.apigw.tvnow.de/player/'+link_id+'', params=params1, headers=headers1).json()
    
    format = response1['videoConfig']['meta']['format']
    title = response1['videoConfig']['meta']['title']
    a_title = f'{format} - {title}'
    print(f'\n{a_title}\n')
    
    dashUrl = response1['videoConfig']['sources']['dashUrl']
    print(f'{dashUrl}\n')
    
    jwt = response1['pageConfig']['user']['jwt']
    
    import requests
    
    headers2 = {
        'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9',
        'Connection': 'keep-alive',
        'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36',
    }
    
    response2 = requests.get(dashUrl, headers=headers2).text
    
    pssh = re.findall(r'<cenc:pssh>(.{20,170})</cenc:pssh>', response2)[0].strip()
    print(f'{pssh}\n')
    
    lic_url = 'https://widevine.tvnow.de/index/license'
    
    headers = {
        'origin': 'https://www.tvnow.de',
        'referer': 'https://www.tvnow.de/',
        'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36 Edg/113.0.1774.42',
        'x-auth-token': jwt,
        'content-type': 'application/x-www-form-urlencoded',
    }
    
    def WV_Function(pssh, lic_url, cert_b64=None):
        wvdecrypt = WvDecrypt(init_data_b64=pssh, cert_data_b64=cert_b64, device=deviceconfig.device_android_generic)                   
        widevine_license = requests.post(url=lic_url, data=wvdecrypt.get_challenge(), headers=headers)
        license_b64 = b64encode(widevine_license.content)
        wvdecrypt.update_license(license_b64)
        Correct, keyswvdecrypt = wvdecrypt.start_process()
        if Correct:
            return Correct, keyswvdecrypt
    Correct, keys = WV_Function(pssh, lic_url)
    
    st=''
    for key in keys:
      st+=' --key '+key
    with open("key.txt","a+") as f:
      f.write(st[1:]+'\n')
    
    with open("key.txt", "r") as f2:
        datas = f2.read()
        print(datas)
    
    with open("key.txt", "r") as fs:
     ke_ys = fs.readlines()
     ke_ys = ke_ys[0].strip().split()   
    
    print()
    
    subprocess.run([m3u8DL_RE,
                    '-M', 'format=mkv:muxer=ffmpeg',
                    '--concurrent-download',
                    '--auto-select', 
                    '--del-after-done',
                    '--log-level', 'INFO',
                    '--save-name', 'video',
                    dashUrl, *ke_ys])
    
    try:
        Path('video.mkv').rename(''+a_title+'.mkv')
        print(f'{a_title}.mkv \nall done!\n')
    except FileNotFoundError:
        print("[ERROR] no mkv file")                
    
    for file_name in files_to_delete:
        if os.path.exists(file_name):
            os.remove(file_name)
            print(f"{file_name} file successfully deleted.")
    Quote Quote  



Similar Threads

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