VideoHelp Forum




+ Reply to Thread
Results 1 to 4 of 4
  1. I have about 1000 mpd urls with very less different.
    For example:
    1: https://cdn.tutopia.in/transcoded_video/dash/17792/1707460039/tutorial_17792.mpd
    2: https://cdn.tutopia.in/transcoded_video/dash/17793/1707459795/tutorial_17793.mpd
    3: https://cdn.tutopia.in/transcoded_video/dash/17794/1707459796/tutorial_17794.mpd

    I have the keys. Can anyone make a batch file to download them together with Nm3u8dl -RE ?

    Thanks in advance.
    Quote Quote  
  2. Yes, but access is needed.
    Quote Quote  
  3. Member
    Join Date
    Feb 2022
    Location
    Search the forum first!
    Search PM
    If you have the keys how are you expecting to decrypt the files? In the script or by hand afterwards. How will you match key with mpd?
    And isn't chatGPT wonderful?

    #!/bin/bash

    # Define the external command
    EXTERNAL_COMMAND="N_m3u8DL-RE"

    # Define the directory containing the .mpd files
    MPD_DIR="/path/to/mpd/files"

    # Loop through each .mpd file in the directory
    for MPD_FILE in "$MPD_DIR"/*.mpd; do
    # Check if there are no .mpd files
    if [ "$MPD_FILE" = "$MPD_DIR/*.mpd" ]; then
    echo "No .mpd files found in the directory."
    exit 1
    fi

    # Process the .mpd file with the external command
    $EXTERNAL_COMMAND "$MPD_FILE" .
    done

    Explanation:

    EXTERNAL_COMMAND: This variable holds the command N_m3u8DL-RE.
    MPD_DIR: This variable holds the path to the directory containing the .mpd files.
    The for loop iterates over each .mpd file in the specified directory.
    Within the loop, the script checks if there are any .mpd files in the directory.
    If .mpd files are found, the script runs N_m3u8DL-RE on each file.

    Replace /path/to/mpd/files with the actual path to your directory containing .mpd files.

    Make sure the script is executable by running:

    bash

    chmod +x script_name.sh

    Then run the script:

    bash

    ./script_name.sh

    This script will use N_m3u8DL-RE to process each .mpd file in the specified directory.
    Code:
    #!/bin/bash
    
    # Define the external command
    EXTERNAL_COMMAND="N_m3u8DL-RE"
    
    # Define the directory containing the .mpd files
    MPD_DIR="/path/to/mpd/files"
    
    # Loop through each .mpd file in the directory
    for MPD_FILE in "$MPD_DIR"/*.mpd; do
      # Check if there are no .mpd files
      if [ "$MPD_FILE" = "$MPD_DIR/*.mpd" ]; then
        echo "No .mpd files found in the directory."
        exit 1
      fi
    
      # Process the .mpd file with the external command
      $EXTERNAL_COMMAND "$MPD_FILE" .
    done
    Last edited by A_n_g_e_l_a; 5th Jun 2024 at 06:59. Reason: script formatting mangled in quote
    Noob Starter Pack. Just download every Widevine mpd! Not kidding!.
    https://files.videohelp.com/u/301890/hellyes6.zip
    Quote Quote  
  4. Originally Posted by A_n_g_e_l_a View Post
    If you have the keys how are you expecting to decrypt the files? In the script or by hand afterwards. How will you match key with mpd?
    And isn't chatGPT wonderful?
    Thank you very much for your help. And always remember your advice to use chatgpt. Thanks again.
    Quote Quote  



Similar Threads

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