VideoHelp Forum


Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!


Try StreamFab Downloader and download streaming video from Youtube, Netflix, Amazon! Download free trial.


+ Reply to Thread
Results 1 to 13 of 13
Thread
  1. 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.
    Last edited by influx; 30th Sep 2021 at 19:23.
    Quote Quote  
  2. You're probably missing something in the http header. user-agent, referrer, cookie, etc.
    Quote Quote  
  3. Originally Posted by jagabo View Post
    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.
    Quote Quote  
  4. 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..."
    Quote Quote  
  5. @influx

    Code:
    yt-dlp --allow-unplayable-formats aria2c -f bv,ba '<mpd_url>'
    ^ ^ This wont work anyway because you are missing --external-downloader from the syntax, that's your primary mistake:

    Code:
    yt-dlp --allow-unplayable-formats --external-downloader aria2c -f bv,ba '<mpd_url>'
    The 403 is probably referer, so add that as per Jagabo:

    Code:
    yt-dlp --allow-unplayable-formats --external-downloader aria2c --referer "https://api.vtvideo.be/embed/mqaezJZlujzqPXI/" -f bv,ba '<mpd_url>'
    and for cookies there's no need to arse about with dumping txt files or even locating a cookie with yt-dlp (unlike youtube-dl)

    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>'
    If this doesn't work we need the mother url from the page you are requesting these videos from so we can check the mpd.
    Last edited by codehound; 30th Sep 2021 at 19:26.
    Quote Quote  
  6. Originally Posted by jagabo View Post
    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..."
    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.
    Quote Quote  
  7. Originally Posted by codehound View Post
    @influx

    Code:
    yt-dlp --allow-unplayable-formats aria2c -f bv,ba '<mpd_url>'
    ^ ^ This wont work anyway because you are missing --external-downloader from the syntax, that's your primary mistake:

    Code:
    yt-dlp --allow-unplayable-formats --external-downloader aria2c -f bv,ba '<mpd_url>'
    The 403 is probably referer, so add that as per Jagabo:

    Code:
    yt-dlp --allow-unplayable-formats --external-downloader aria2c --referer "https://api.vtvideo.be/embed/mqaezJZlujzqPXI/" -f bv,ba '<mpd_url>'
    and for cookies there's no need to arse about with dumping txt files or even locating a cookie with yt-dlp (unlike youtube-dl)

    If you use firefox just add for your browser:

    --cookies-from-browser firefox
    --cookies-from-browser edge
    --cookies-from-browser chrome

    *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 firefox -f bv,ba '<mpd_url>'
    If this doesn't work we need the mother url from the page you are requesting these videos from so we can check the m3u8.
    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/
    Quote Quote  
  8. 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>'
    Edit: Just checked your page link - this is WV anyway so forget trying to download it as a single entity.

    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).
    Quote Quote  
  9. Originally Posted by codehound View Post
    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>'
    Yup, that is more or less exactly what I tried and I still get 403. Am I perhaps obtaining the wrong mpd URL somehow? Is it safe or allowed for me to share the mpd URL I am using? There's usually 2 when the video plays and I try both, and both give the 403.
    Quote Quote  
  10. 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 keys
    Last edited by codehound; 30th Sep 2021 at 19:55.
    Quote Quote  
  11. Originally Posted by codehound View Post
    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 keys
    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.
    Quote Quote  
  12. Originally Posted by codehound View Post
    ...
    this is WV anyway so forget trying to download it as a single entity.
    ...
    Download separate video+audio unmerged, decrypt both with the keys and then merge the decrypted video with the decrypted audio with ffmpeg (or mkvtoolnix).
    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?
    Quote Quote  
  13. 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.
    Quote Quote  



Similar Threads

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