Does anyone know how to download from Discovery Plus ? I tried their mpd file but keep getting the following when using the command --allow-u -f:
ytdlp.exe: error: You must provide at least one URL.
Type yt-dlp --help to see a list of all options.
Also when I try to download the mpd file, it downloads 2 files of 12Mb not ~2Gb
Edit: It is because the mpd I can find only relates to the adverts, not the main video. I cannot seem to find the mpd associated with the main video. The first video file is a DASH file like master-textstream_eng=1000.dash
+ Reply to Thread
Results 1 to 25 of 25
-
Last edited by Willow5; 10th Sep 2022 at 13:56.
-
Thank you, this is the link: https://www.discoveryplus.com/gb/video/wheeler-dealers/bmw-z1
-
I have a genuine dscp gb account and this does not appear to be a genuine url (?) ...
-
I also have a DSCP GB account and it is the deep link to S11 E12 which works fine for me
-
Hi, I wish to permanently download this episode. I can stream it fine but cannot download using the mpd file. I was asked to post a link to the page I would usually watch the video on earlier in this thread.
-
-
Hi, I am not sure why it is not genuine for you as it is genuine for me but if you can locate S11 E12 and help further I would appreciate it
-
Last edited by codehound; 10th Sep 2022 at 19:07.
-
Thank you very much. Is there also an mpd link as the one I located was for a discoveryplus ad
-
Use the Dev Tools in your browser to pull the mpd off the wire as it comes down.
-
Hi, ok I finally found the various formats of the mpd by doing the --allow-u -F command:
[Attachment 66736 - Click to enlarge]
However, when I then go to download any specific video, the video file only appears to be ~400Mb but this is a 40 minute HD video so I am expecting around 2Gb.
OK I think I have found that the audio and video parts are split into 4 segments themselves, hence the -0,-1,-2 and -3! How can I merge the video file into one complete file and the audio parts into one complete file before performing an FFMPEG on the whole lot ?Last edited by Willow5; 12th Sep 2022 at 16:52.
-
You don't.
First do your decryption of the parts in the normal way. Then make a file listing the audio parts from first to last, each on new line.Code:ffmpeg -f concat <a file listing the parts> -c copy allAudio.m4a
HOWEVER NOT WITHSTANDING....!! I think I read in the yt-dlp release notes that yt-dlp now copes with segmented videos. I leave you to look that up and perhaps come back and tell us all. -
Thank you, I did this last night but there are long gaps between both audio and video segments so a 44 minute programme becomes 1hr15 and the gaps in between are slient / blank video. I believe the reason for this is because each of the segments have different start timestamps. Is there any way of ffmpeg concatenating the videos without inserting these gaps between the segments ?
-
Forgive me; but No. Read exactly what I said. If you do as you described in your post you will get the timings wrong.
Decode all fragments before doing anything else.
THEN concatenate into an audio and video stream
finally merge both streams with ffmpeg.
If you do it the way I describe exactly you will get the timings right.
Been there and got the tee-shirt for removing server-side-included-adverts from stv.tv. The only way was to download part videos, throw away all the small video files (adverts) and re-assemble the rest. I do not have timing problems. -
Hi, this is exactly the same steps that I followed (which has gaps):
Created mylist.txt which has the pre-decoded segments in the file:
file 'avp1_dec.mp4'
file 'avp2_dec.mp4'
file 'avp3_dec.mp4'
file 'avp4_dec.mp4'
Ran the ffmpeg command:
ffmpeg -f concat -i mylist.txt -c copy video.mp4
video.mp4 (is created at 1hour 15 minutes; should be 44 minutes). When I play it back, first 2 segments are together but then there is a gap between 2 and 3 and 3 and 4 -
Memory playing tricks. So I have just looked up what my stv.tv downloader does
First decrypt everything.
ffmpeg merge each part video with its corresponding part audio.
then you concatenate all the part video mp4's in the correct order to produce your final video.
here is a fragment of my program that reassembles part files:
print("===========================\n\n Removing adverts\n\n===========================")
for filename in os.listdir(directory):
f = os.path.join(directory, filename)
# checking if it is a file
# remove files smaller tha 1M audio and 15M video
if os.path.isfile(f):
if f.endswith('.m4a') and (os.path.getsize(f) < 1000000):
os.remove(f)
if f.endswith('.mp4') and (os.path.getsize(f) < 15000000):
os.remove(f)
print("Done.")
time.sleep(2)
# decrypt and preface decrypted files with'un' to make 'unencrypted'
print("==============================\n\n Decrypting\n\n==============================")
for f in os.listdir(path=None):
if f.endswith('.m4a'):
#print("ends with m4a")
os.system(f"mp4decrypt {key} {f} un{f}")
if f.endswith('.mp4'):
os.system(f"mp4decrypt {key} {f} un{f}")
print("Done.")
time.sleep(2)
#remove all encrypted files
print("==============================\n\n Decrypting finished\nCopying encrypted files to cache\n\n==============================")
# these need to either be removed as here or moved out of the current folder so as not to interfere with merging.
if not os.path.exists(f"{directory}/output/cache"):
os.system("mkdir -p ./output/cache")
os.system("mv encryptVid.* encryptedAud* ./output/cache")
print("Done.")
time.sleep(2)
# merge files: join corresponding video and audio to make a sequence of part files.
print("==============================\n\n Merging A & V to part mp4 videos\n\n==============================")
time.sleep(2)
audiolist=[]
videolist=[]
for f in os.listdir(path=None):
if f.endswith('.m4a'):
audiolist.append(f)
if f.endswith('mp4'):
videolist.append(f)
for i in range(len(audiolist)):
os.system(f"ffmpeg -i {audiolist[i]} -i {videolist[i]} -acodec copy -vcodec copy part{i}.mp4")
print("Done.")
time.sleep(2)
#The way yt-dlp downloads high serial numbered parts first on my machine, means part files 0,1,2 etc need reversing to correct the viewing order.
#I now know there is a yt-dlp command to reverse file download order but this works well enough.
print("==============================\n\n Final assembly\n\n==============================")
time.sleep(2)
filelist = []
file = open("mylist.txt", "a")
for f in os.listdir(path=None):
if f.startswith("part"):
filelist.append(f)
# needs reverse order of part files
filelist.reverse()
for i in range(len(filelist)):
file.write(f"file '{filelist[i]}'\n")
file.close()
os.system(f"ffmpeg -f concat -i mylist.txt -c copy {videoname} ")
file = open(f"{partname}.key", 'w')
file.write(key)
file.close()
# add subs
os.system(f"ffmpeg -i {videoname} -i subs.en.srt -acodec copy -vcodec copy -cmov_text -metadata
:0 language=english {partname}_subs.mp4")
print("Done.")
time.sleep(2)Last edited by A_n_g_e_l_a; 13th Sep 2022 at 10:27. Reason: added code
-
That worked many thanks ! last question, how do you get the widevine keys for DiscoveryPlus please ?
-
Darkw4v3 says its fairly trivial why not try and see what you can do. You've had enough spoon-feeding for today.
-
Thanks, does it involve waiting for a discord account to be verified ? If so then I know what I need to do
-
-
Similar Threads
-
A download issue [discovery+]
By CrymanChen in forum Video Streaming DownloadingReplies: 34Last Post: 31st Dec 2022, 10:39 -
Downloading from Discovery.ca (Canada)
By Hishighness420 in forum Video Streaming DownloadingReplies: 1Last Post: 28th Jul 2020, 17:52 -
Downloading video from discovery.ca
By flinch987 in forum Video Streaming DownloadingReplies: 5Last Post: 26th Jan 2020, 13:27 -
trying to download from discovery.com with youtube-dl
By Scott Zechman in forum Video Streaming DownloadingReplies: 0Last Post: 11th Jul 2019, 11:33 -
Downloading Video From Discovery Sites
By Chronos2086 in forum Video Streaming DownloadingReplies: 3Last Post: 5th Jan 2018, 17:49