Hi all,
I'm trying to download a show for archival purposes from a mpd URL and I am getting a 403 Forbidden in yt-dlp from it. I'm not quite sure why and I believe from prior research other people are able to download freom the service and its other related-services, so I assume I'm making a mistake somewhere.
For context, I am trying to download a show from the free IMDB TV service, which is through amzn. I know typically amzn isn't allowed because it's usually people asking about ripping prime video, a subscription service. But I wanted to clarify this is the free IMDB TV service inside amzn. I care about archiving this show because it is fairly obsure and was previously believed to be doomed to VHS recording-only quality with glitches. Somehow IMDB TV randomly got the show in digital format. Let's call them "other people" have archived the first 3 seasons, but for some reasons did not do the final 4th season, which is the most damaged season of them all from the VHS recordings out there.
To go more in depth about the error, I am running ` yt-dlp --allow-unplayable-formats --external-downloader aria2c -f bv,ba '<mpd_url>' ` and what it is doing specifically is getting a 404 from sending HEAD request. It continues on and tries a video stream URL twice followed by an audio stream URL twice. It is these where the 403 is occurring. For good measure, I attempted all of the mpd URLs the page loads and not just the one I believe is the stream, but not had any luck.
My assumption is this kind of makes sense because even though IMDB TV is free, you just need an account to watch it. Am I supposed to be submitting some kind of auth cookie with the yt-dlp command?
I can provide actual URLs to the show, mpd, and my output if needed. I'm just excluding it from this post to start with in case there's some kind of token I shouldn't post publicly. Please let me know what I can provide to get this working and thank you.
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays!
Try StreamFab Downloader and download streaming video from Youtube, Netflix, Amazon! Download free trial.
+ Reply to Thread
Results 1 to 13 of 13
Thread
-
Last edited by influx; 30th Sep 2021 at 19:23.
-
You're probably missing something in the http header. user-agent, referrer, cookie, etc.
-
That was kind of my assumption too, but I'm not sure how I find this kind of thing out. I'm somewhat technical/familiar with network stuff but really not "that technical". I tried saving my amzn cookies using cookies.txt and using --cookies with the yt-dlp command but it didn't change anything.
I think another noteworthy mention is the 2 video/audio streams it attempts to pull that actually cause the 403 error, if I copy them into my browser which the IMDB TV show works from, I get an XML response that says Forbidden in it.
I'm really stumped. -
How did you get the mpd link? That's where you usually get all the other http header info. You'll add http fields like:
--user-agent "Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko)..."
--referer "https://api.vtvideo.be/embed/mqaezJZlujzqPXI/"
--add-header "Cookie: ak_bmsc=5B2BCC7284516D6A18EB70B1C33C5456..." -
@influx
Code:yt-dlp --allow-unplayable-formats aria2c -f bv,ba '<mpd_url>'
Code:yt-dlp --allow-unplayable-formats --external-downloader aria2c -f bv,ba '<mpd_url>'
Code:yt-dlp --allow-unplayable-formats --external-downloader aria2c --referer "https://api.vtvideo.be/embed/mqaezJZlujzqPXI/" -f bv,ba '<mpd_url>'
If you use chrome just add the one that you use:
--cookies-from-browser chrome
--cookies-from-browser firefox
--cookies-from-browser edge
*the most popular browser names can be substituted for firefox if you use something else - as long as its all in lowercase
Code:yt-dlp --allow-unplayable-formats --external-downloader aria2c --referer "https://api.vtvideo.be/embed/mqaezJZlujzqPXI/" --cookies-from-browser chrome -f bv,ba '<mpd_url>'
Last edited by codehound; 30th Sep 2021 at 19:26.
-
I open Chrome developer tools, go to the Network tab, and type "mpd" in the filter.
If I right-click the mpd URL result in the network tab, I can copy the data for example in Powershell format and then see parts of the headers. I see referer and user-agent in that. I'm not sure if I am supposed to be looking somewhere else. As for cookies, I was trying the --cookies flag and providing a txt file that I exported out of chrome but honestly not sure if I'm doing it correctly. -
Thank you for pointing out the missing --external-downloader flag. I actually am using it, but I somehow backspaced it from my OP so I just edited it into the post to avoid confusion.
---
In regards to the referer, I'm not sure what it is supposed to be. There's a referer field when I copy the mpd URL's Powershell format but it is just plain amzn.com. Thanks for the note about --cookies-from-browser as well.
In all, I am using the cookies-from-browser, user-agent, and referer with the info from above and it is still 403.
I am trying to start with season 4 episode 1 here: https://www.amazon.com/gp/video/detail/B08FF6FWXN/ -
referer = https://www.amazon.com/
So
Code:yt-dlp --allow-unplayable-formats --external-downloader aria2c --referer "https://www.amazon.com/" --cookies-from-browser cxhrome -f bv,ba '<mpd_url>'
You need to issue the -F command to see available formats. Download separate video+audio unmerged, decrypt both with the keys and then merge the decrypted video with the decrypted audio with ffmpeg (or mkvtoolnix). -
-
hang on...
The fist mpd gives the video+ audio both in 12 parts
The 2nd -11 parts.
Apart from that, identical. 5 different resolutions. best being 720p x 480p.
So best case scenario:
Download the best 11 video parts
Download the best 11 audio parts
Decrypt the 11 video parts
Decrypt the 11 audio parts
Merge all 22 with ffmpeg
and there are 3 sets of WV keysLast edited by codehound; 30th Sep 2021 at 19:55.
-
So I can't really imagine why... but for some reason a computer restart has made it start working. It even works without any headers in the yt-dlp command. I feel bad leading you down the wrong path but I learned a lot from this, so I'm very thankful for the help I've received here.
There is one last thing that I'm hoping to get though. I noticed the subtitles are absent from this. Do you know if subtitles work differently from this whole process? I'm not sure if subtitles are something yt-dlp even supports. I'm trying to independently research it myself in the meantime. -
Usually it has to be done like this. Let me ask a question to this:
I am just about to spend some time in LIVE-WV-stream-downloading. Because LIVE it is a bit problematic to download audio and video seperately (although I didn't think about it deep up to now). Somewhere I read that MP4DECRYPT accepts more than one key and would decrypt also more than one stream inside the mp4 container, for each key one stream. Does this work? Has anyone experience with it? -
Figured I'd document it for others in the future. I found for the subtitles if you filter the network data for subtitle, open the first result URL, and then read through the JSON data, you would find another URL to a ttml2 subtitle file starting with https://cf-timedtext.aux.pv-cdn.net/ which can be converted into a format like srt.
Similar Threads
-
Could you help me how to download this forbidden 403 m3u8?:(
By bu-woo in forum Video Streaming DownloadingReplies: 10Last Post: 30th Jul 2024, 19:34 -
yt-dlp error "HTTP Error 403: Forbidden". MPD downloading [ABC.com site]
By nikshell29 in forum Video Streaming DownloadingReplies: 5Last Post: 26th Aug 2021, 15:18 -
yt-dlp + mdp: "Could not send HEAD request" - HTTP error 403: forbidden
By oopargentina in forum Video Streaming DownloadingReplies: 6Last Post: 27th Mar 2021, 10:01 -
Tryng to download from animal planet... HTTP error 403 Forbidden
By syrist in forum Video Streaming DownloadingReplies: 3Last Post: 15th May 2020, 19:38 -
download afreecatv steaming with ffmpeg get HTTP error 403 Forbidden
By j2ee in forum Video Streaming DownloadingReplies: 1Last Post: 30th Apr 2020, 09:13