question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

yt-dlp can't download the last fragment of mpd

See original GitHub issue

Checklist

  • I’m reporting a broken site support issue
  • I’ve verified that I’m running yt-dlp version 2021.06.09
  • I’ve checked that all provided URLs are alive and playable in a browser
  • I’ve checked that all URLs and arguments with special characters are properly quoted or escaped
  • I’ve searched the bugtracker for similar bug reports including closed ones
  • I’ve read bugs section in FAQ

Verbose log

C:\Users\Wiesław\Desktop\down_vod\youtube-dlp>yt-dlp -v --allow-unplayable-formats -f wv -N 16 https://ads-cdn-dash-1.blim.com/v1/dash/942b5dcb4f33f2d7bcfe75473f6d9bed3d3d2ff0/avod_prod_ts/201712054084/dash/671210_46e6ebdf0aabd6dcfcaf6bcf7dc4fa14/mpds/671210.mpd?cb=151372080  & ads.customerId=13173383  & ads.assetId=38864  & aws.sessionId=3b37ca0b-f4fb-432d-8fb2-d6ead99a834b
[debug] Command-line config: ['-v', '--allow-unplayable-formats', '-f', 'wv', '-N', '16', 'https://ads-cdn-dash-1.blim.com/v1/dash/942b5dcb4f33f2d7bcfe75473f6d9bed3d3d2ff0/avod_prod_ts/201712054084/dash/671210_46e6ebdf0aabd6dcfcaf6bcf7dc4fa14/mpds/671210.mpd?cb=151372080']
[debug] Encodings: locale cp1250, fs utf-8, out utf-8, pref cp1250
[debug] yt-dlp version 2021.06.08 (exe)
[debug] Python version 3.8.10 (CPython 64bit) - Windows-10-10.0.19041-SP0
[debug] exe versions: ffmpeg git-2019-11-22-27c6c92, ffprobe N-101739-gcad3a5d715
[debug] Proxy map: {}
[debug] [generic] Extracting URL: https://ads-cdn-dash-1.blim.com/v1/dash/942b5dcb4f33f2d7bcfe75473f6d9bed3d3d2ff0/avod_prod_ts/201712054084/dash/671210_46e6ebdf0aabd6dcfcaf6bcf7dc4fa14/mpds/671210.mpd?cb=151372080
[generic] 671210: Requesting header
WARNING: [generic] Could not send HEAD request to https://ads-cdn-dash-1.blim.com/v1/dash/942b5dcb4f33f2d7bcfe75473f6d9bed3d3d2ff0/avod_prod_ts/201712054084/dash/671210_46e6ebdf0aabd6dcfcaf6bcf7dc4fa14/mpds/671210.mpd?cb=151372080: HTTP Error 404: Not Found
[generic] 671210: Downloading webpage
WARNING: [generic] Falling back on generic information extractor.
[generic] 671210: Extracting information
[debug] Formats sorted by: hasvid, ie_pref, lang, quality, res, fps, vcodec:vp9.2(10), acodec, filesize, fs_approx, tbr, vbr, abr, asr, proto, vext, aext, hasaud, source, id
[info] 671210: Downloading 1 format(s): 180_240640
[debug] Invoking downloader on "https://ads-cdn-dash-1.blim.com/v1/dash/942b5dcb4f33f2d7bcfe75473f6d9bed3d3d2ff0/avod_prod_ts/201712054084/dash/671210_46e6ebdf0aabd6dcfcaf6bcf7dc4fa14/mpds/671210.mpd?cb=151372080"
[dashsegments] Total fragments: 660
[download] Destination: 671210 [671210].mp4
WARNING: The download speed shown is only of one thread. This is a known issue
[download]  99.8% of ~78.92MiB at  4.89MiB/s ETA 00:00     [download] Got server HTTP error: HTTP Error 403: Forbidden. Retrying fragment 660 (attempt 1 of 10) ...
[download] 100.0% of ~78.89MiB at  4.89MiB/s ETA 00:00     ERROR: unable to download video data: [Errno 2] No such file or directory: '671210 [671210].mp4.part-Frag660'
Traceback (most recent call last):
  File "yt_dlp\YoutubeDL.py", line 2640, in process_info
  File "yt_dlp\YoutubeDL.py", line 2303, in dl
  File "yt_dlp\downloader\common.py", line 384, in download
  File "yt_dlp\downloader\dash.py", line 176, in real_download
  File "yt_dlp\utils.py", line 2062, in sanitize_open
FileNotFoundError: [Errno 2] No such file or directory: '671210 [671210].mp4.part-Frag660'

Description

Hi. I’m downloading mpd where (I think) the last fragment is invalid or sth. So I end up at 99.8% with such files. I use -N16 because it’s much faster. yt-dlp cannot skip the unavailable fragment.

When I download without -N 16, yt-dlp SOMETIMES skips the last fragment but not always.

[download] Got server HTTP error: HTTP Error 403: Forbidden. Retrying fragment 660 (attempt 2 of 10) ...
[download] Got server HTTP error: HTTP Error 403: Forbidden. Retrying fragment 660 (attempt 3 of 10) ...
[download] Got server HTTP error: HTTP Error 403: Forbidden. Retrying fragment 660 (attempt 4 of 10) ...
[download] Got server HTTP error: HTTP Error 403: Forbidden. Retrying fragment 660 (attempt 5 of 10) ...
[download] Got server HTTP error: HTTP Error 403: Forbidden. Retrying fragment 660 (attempt 6 of 10) ...
[download] Got server HTTP error: HTTP Error 403: Forbidden. Retrying fragment 660 (attempt 7 of 10) ...
[download] Got server HTTP error: HTTP Error 403: Forbidden. Retrying fragment 660 (attempt 8 of 10) ...
[download] Got server HTTP error: HTTP Error 403: Forbidden. Retrying fragment 660 (attempt 9 of 10) ...
[download] Got server HTTP error: HTTP Error 403: Forbidden. Retrying fragment 660 (attempt 10 of 10) ...
[download] Skipping fragment 660 ...
[download] 100% of 78.80MiB in 01:19

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
pukkandancommented, Jun 13, 2021

#364 when complete will fix this

0reactions
m0ck69commented, Jun 13, 2021

thx

Read more comments on GitHub >

github_iconTop Results From Across the Web

yt-dlp/yt-dlp: A youtube-dl fork with additional features ... - GitHub
Multi-threaded fragment downloads: Download multiple fragments of m3u8/mpd videos in parallel. Use --concurrent-fragments ( -N ) option to set the number of ...
Read more >
How do I stop the fragment stuff from happening? : r/youtubedl
Trying to download a video from patreon, but just get "Cannot download embed-only video without embedding URL" error. Help?
Read more >
Ytdlp download bilibili in fragments and not combining them
My ffmpeg is in the same dir so that's not the cause. I don't suppose there's a command I could pass through with...
Read more >
[yt-dlp] How to download only part / section of a video? - Reddit
I've read the guide ( https://github.com/yt-dlp/yt-dlp ) but can't find anything relevant.
Read more >
youtube-dl, how do I resume a download after error?
To download only the audio from the video do this youtube-dl -ciw -x --audio-format mp3 --playlist-start 127 <then past the playlist link ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found