VideoHelp Forum





Try StreamFab Downloader and download streaming video from Netflix, Amazon!



+ Reply to Thread
Page 9 of 9
FirstFirst ... 7 8 9
Results 241 to 259 of 259
  1. Member
    Join Date
    Feb 2022
    Location
    Search the forum first!
    Search PM
    Originally Posted by Blacksprite View Post
    I also ventured into the world of Python. Cool GUI you've built there, A_n_g_e_l_a! I played around with it a bit and now I'm getting the following message. It seems like there are 208 fragments, but it's asking me for 209. How can that be? I've used both Firefox and Opera to rule out any errors there.
    That's an n_m3u8DL-RE error and there's a switch command you can set.... --help has it. Or use the Dash-mpd-cli downloader
    Noob Starter Pack. Just download any Widevine media! Over 25,000 downloads for V6!.
    https://files.videohelp.com/u/301890/hellyes6.zip
    Quote Quote  
  2. Originally Posted by Blacksprite View Post
    I also ventured into the world of Python. Cool GUI you've built there, A_n_g_e_l_a! I played around with it a bit and now I'm getting the following message. It seems like there are 208 fragments, but it's asking me for 209. How can that be? I've used both Firefox and Opera to rule out any errors there.
    Its better you create a separate thread regarding this problem because it has nothing to do with angela’s script
    And please provide the command you used and links to the video
    Good luc
    Quote Quote  
  3. The switch command was the hint I needed. That still works in that case. Thx a lot.
    Quote Quote  
  4. Originally Posted by A_n_g_e_l_a View Post
    Good on MalMen for trying to take his extension project forward.

    For those that prefer a vanilla approach, and there is something to be said for remembering how to extract mpd and license from a site, I have, today, updated and simplified the HellYes offering on github https://github.com/vinefeeder/HellYes.

    The change is to the methods of installation and use, plus some script duplicate removal.
    There are additional binary installation scripts for Linux and Windows which find sources for support programs, install and add to your system's PATH. (Or you can still do hand installation, should you wish.)

    The big change is that UV is now the package manager; so the software is started by:-
    uv run gui.py -- for the Graphical Interface
    uv run allhell3.py -- for the command line interface.
    (Other start scripts have been removed - they became confusing)

    Dash-mpd-cli (https://github.com/emarsden/dash-mpd-cli) was updated last week. The script installs the latest version

    The README has been adjusted to reflect changes.

    If anyone should want the original version it is the one still linked in my signature

    Hi Angela,

    thank you for your script, i have a question, i tested it right now and i dont understand everything perfect so maybe its a mistake on my side but i will get this error message when i press "Downlaod DASH"

    18:07:25.334 ERROR: Failed
    Traceback (most recent call last):
    File "D:\Programme\HellYes\gui.py", line 35, in run
    subprocess.run(self.command, check=True)
    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python. 3.13_3.13.2544.0_x64__qbz5n2kfra8p0\Lib\subprocess .py", line 554, in run
    with Popen(*popenargs, **kwargs) as process:
    ~~~~~^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python. 3.13_3.13.2544.0_x64__qbz5n2kfra8p0\Lib\subprocess .py", line 1039, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
    ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^
    pass_fds, cwd, env,
    ^^^^^^^^^^^^^^^^^^^
    ...<5 lines>...
    gid, gids, uid, umask,
    ^^^^^^^^^^^^^^^^^^^^^^
    start_new_session, process_group)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python. 3.13_3.13.2544.0_x64__qbz5n2kfra8p0\Lib\subprocess .py", line 1554, in _execute_child
    hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
    ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
    # no special security
    ^^^^^^^^^^^^^^^^^^^^^
    ...<4 lines>...
    cwd,
    ^^^^
    startupinfo)
    ^^^^^^^^^^^^
    FileNotFoundError: [WinError 2] Das System kann die angegebene Datei nicht finden

    Can you maybe help me? Would be awesome.

    Kind regards
    Kimble
    Quote Quote  
  5. You are missing an element for the command so this is why you are showing an error in subprocess.

    here is a part to check if a part is missing in the command and also in subprocess.
    Code:
    # Build the command list
        m3u8dl = 'N_m3u8DL-RE'
        command = [
            m3u8dl,  # The command to run
            mpd_url,          # First argument
            *key_components, # Unpack key_components list into individual arguments
            '--save-name',  # Additional fixed argument
            video,   # Value for the save-name argument
            #'--save-dir',  # uncomment and add save path in quotes
            #'C:/Users/User/Downloads/',  # Value for the save-dir argument
            '-M',  # Additional fixed argument  to mux 
            'format=mkv:muxer=mkvmerge',  # Value for the format argument may also be mp4
        ]
        # Validate all parameters
        if not os.path.exists(m3u8dl):
            raise FileNotFoundError(f"{m3u8dl} not found!")
        if not mpd_url:
            raise ValueError("MPD URL is missing!")
        if not key_components:
            raise ValueError("Keys not retrieved!")
        if not video:
            raise ValueError("Video name is missing!")
        print("✅ Command is complete and ready to run:")
        print(" ".join(command))
        input("Press Enter to run the download-command or ctrl+C to exit.")
        try:
            subprocess.run(command, check=True)
        except FileNotFoundError as e:
            print(f"Error: {e}")
        except subprocess.CalledProcessError as e:
            print(f"Command failed with return code {e.returncode}")
    Quote Quote  
  6. a version with emoji:
    Code:
    if __name__ == "__main__":
        title = PF.figlet_format(' allhell3 ', font='smslant')
        print(colored(title, 'green'))
        strapline = "A Generic L3 Downloader:\n"
        print(colored(strapline, 'red'))
        strapline = "For DRM content only.\n"
        print(colored(strapline, 'red'))
        strapline = "!!This version is for ALL browsers!!.\n\n"
        print(colored(strapline, 'cyan'))
        print('Prepare three inputs.\n 1. MPD URL\n 2. cURL of license server request\n 3. Video name\n\n')
        mpd_url = input("MPD URL? ")
        mpd_content = fetch_mpd_content(mpd_url)
        if (mpd_content):
            pssh = extract_or_generate_pssh(mpd_content)
            print("Extracted or generated PSSH:", pssh)
        else:
            print("Failed to fetch or parse MPD content.")
    
        # get cURL from user
        print("Next.\n1. Paste your cURL of license request.\n2. Press Ctrl-D (Linux) or Ctrl-Z (Windows) to save it.")
    
        # multi OS support for getting hidden multi-line input from different browsers
        cURL = get_hidden_input("cURL? ")
    
        # extract license URL, method, headers, and data
        lic_url, method, headers, data =  parse_curl(cURL)
        # get key from pssh and license URL
        key_results = get_key(pssh, lic_url)
        print('\n' + key_results + '\n')
        # ask user for video name
        video = input("Save Video as? ")
        # Split key_results into lines and then split each line into components
        key_components = []
        for line in key_results.strip().split('\n'):
            # Split each line by spaces and add the components to the key_components list
            key_components.extend(line.split())
    
        # Build the command list
        m3u8dl = 'N_m3u8DL-RE'
        command = [
            m3u8dl,  # The command to run
            mpd_url,          # First argument
            *key_components, # Unpack key_components list into individual arguments
            '--save-name',  # Additional fixed argument
            video,   # Value for the save-name argument
            #'--save-dir',  # uncomment and add save path in quotes
            #'C:/Users/User/Downloads/',  # Value for the save-dir argument
            '-M',  # Additional fixed argument  to mux 
            'format=mkv:muxer=mkvmerge',  # Value for the format argument may also be mp4
        ]
        # Validate all parameters
        if not os.path.exists(m3u8dl):
            raise FileNotFoundError(f"{m3u8dl} not found!")
        if not mpd_url:
            raise ValueError("MPD URL is missing!")
        if not key_components:
            raise ValueError("Keys not retrieved!")
        if not video:
            raise ValueError("Video name is missing!")
        print("✅ Command is complete and ready to run:")
        print(" ".join(command))
        input("Press Enter to run the download-command or ctrl+C to exit.")
        try:
            subprocess.run(command, check=True)
            print("\n✅ Download finished successfully!")
        except FileNotFoundError as e:
            print(f"❌ File not found error: {e}")
        except subprocess.CalledProcessError as e:
            print(f"❌ Command failed with return code {e.returncode}")
    Quote Quote  
  7. But i did not change any codes lines in the script from Angela. I use the gui version and just press the "Downlaod DASH" button. So this means there is an error in the script from Angela or?
    I really dont know much about scripting so i also dont know what to do with your script? I entered in in Powershell but only get errors like in Python too
    Quote Quote  
  8. Either N_m3u8DL-RE or dash-mpd-cli are not executable by HellYesGui because they are not in PATH (or the dir where HellYesGui resides). It's not a bug in Angela's app, it's presumably an error in your setup.
    Quote Quote  
  9. Yes, it's highly likely that it's my fault
    I just can't figure out why.
    N_m3u8DL-RE works without any problems and dash-mpd-cli-windows.exe is in the same binaries folder as N_m3u8DL-RE.exe.
    Image
    [Attachment 90934 - Click to enlarge]

    Image
    [Attachment 90935 - Click to enlarge]

    I just restarted my PC, but I'm still getting the same error
    Quote Quote  
  10. Looks at least correct from what I can tell.

    As a MacOS user, I'm afraid I'm out of ideas here.
    Quote Quote  
  11. Since N_m3u8DL-RE works, that's basically fine. The only thing that bothers me is that I always have to manually add “--check-segments-count false” to the command, otherwise it “aborts” the download.
    And if I simply add “--check-segments-count false” at the end in the GUI, this part is ignored. So I have to copy the entire command from the GUI every time and paste it into PowerShell, then change the name, etc. That's a bit annoying It would be great if the GUI had a switch for “--check-segments-count false”

    Maybe that would be something for the next version @A_n_g_e_l_a
    Quote Quote  
  12. Can't you simply change the line where the command is built in gui.py? In my version it's line 411:
    Code:
    self.n_m3u8dl_re_command = f"N_m3u8DL-RE '{mpd_url}' {key_str} --save-name {self.video_name_entry.text()} -mt -M:format=mkv:muxer=mkvmerge"
    Quote Quote  
  13. You are a Legend Thank you that worked
    Quote Quote  
  14. Member
    Join Date
    Feb 2022
    Location
    Search the forum first!
    Search PM
    Originally Posted by Kimble89 View Post
    ...that worked
    And the reason that YOU need it is because some packagers omit the final segment if it is only partially full. N_m3u8DL-RE calculates, say, seventeen segments (in the example below), but the CDN's packager has only delivered 16.

    It works something like this using information in the MPD
    mediaPresentationDuration = PT1M36.720S → 96.720 s total
    Video SegmentTemplate: timescale (frames/sec) =25, duration=150 frames → 150/25 = 6.000 s per segment
    96.720 / 6.000 = 16.12 → ceil = 17 segments Or 16.12 → floor = 16 segments.
    As a coder I cannot know how the packager voted (ceil or floor) and must leave you with the tool to adapt to your specific use.

    If I hard code 'check-segment-count false' there will be occasion, on slow or poor networks, when the downloader stops before all segments are captured. And you wouldn't like that either.
    Noob Starter Pack. Just download any Widevine media! Over 25,000 downloads for V6!.
    https://files.videohelp.com/u/301890/hellyes6.zip
    Quote Quote  
  15. Thank you for the explanation.
    I understand.
    I didn't say you should hard code. I said a switch or a checkbox would be great.
    But for me its working now. Thank you again for this script
    Quote Quote  
  16. Member
    Join Date
    Feb 2022
    Location
    Search the forum first!
    Search PM
    Originally Posted by Kimble89 View Post
    a switch or a checkbox would be great.
    In the event N_m3u8DL-RE fails just use DASH-MPD-CLI; that is what it is there for!
    Noob Starter Pack. Just download any Widevine media! Over 25,000 downloads for V6!.
    https://files.videohelp.com/u/301890/hellyes6.zip
    Quote Quote  
  17. Yes, I tried that. However, I then received the error message shown above. That's why I asked for help here regarding the error message.
    Quote Quote  
  18. Member
    Join Date
    Feb 2022
    Location
    Search the forum first!
    Search PM
    Originally Posted by Kimble89 View Post
    Yes, I tried that. However, I then received the error message shown above. That's why I asked for help here regarding the error message.
    I was going to leave you for a couple of days to read and think about the error message you posted. It tells you what is wrong pretty much. It cannot find the binary dash-mpd-cli. Others jumped in with a 'fix' - not a solution.

    It is obvious to me, you chose not to use the install script available to you. The script is pretty much idiot-proof.
    But, nevertheless, I still get called and told I need to fix things in my script so as to sort out your mess!

    Your dash-mpd.cli was not installed correctly - you've got it named as dash-mpd-cli-windows.exe.
    Noob Starter Pack. Just download any Widevine media! Over 25,000 downloads for V6!.
    https://files.videohelp.com/u/301890/hellyes6.zip
    Quote Quote  
  19. @A_n_g_e_l_a thanks for this! I tried looking at a solution for downloading videos for (UK) Channel 4 and Channel 5 a few years ago and gave up.

    I thought I'd give it another go as I've been playing around with an AI client, Cline AI, on Visual Studio code. After downloading from GitHub all I had to do was "Open Folder..." in visual studio and ask Cline to download the video I wanted. It provided prompts / instructions on how to the the MPD and cURL licence and installed all the necessary software such as Python uv etc. Worked successfully for both programs on C4 and My5.

    Given time I probably could have worked through the instructions and figured it out myself but this saved a lot of time and didn't require any thinking.
    Quote Quote  



Similar Threads

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