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.
+ Reply to Thread
Results 1 to 4 of 4
-
-
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 -
Similar Threads
-
MPD files and multiple EXO files
By labamba in forum Video Streaming DownloadingReplies: 20Last Post: 29th Dec 2023, 03:16 -
Help downloading MPD
By DenialOfJustice in forum Video Streaming DownloadingReplies: 4Last Post: 12th Dec 2023, 03:46 -
nm3u8dl not downloading these video links, how to fix the issue?
By solarjunk in forum Video Streaming DownloadingReplies: 2Last Post: 6th May 2023, 08:45 -
Downloading encrypted mpd video files
By umar_0x01 in forum Video Streaming DownloadingReplies: 40Last Post: 6th Sep 2021, 11:02 -
Help downloading MPD from Kanopy
By dzigelbaum in forum Video Streaming DownloadingReplies: 11Last Post: 9th Apr 2021, 22:07