-
Notifications
You must be signed in to change notification settings - Fork 10.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Youtube download stops short then fails to get any data blocks #17148
Comments
@sambler Can you reproduce the error because this seems to work for me. |
Seems like I started to get the same problem with youtube today:
|
Youtube server side fault for format 22. Nothing to do with youtube-dl. |
@dstftw how is youtube-dl requesting a non-existent format not a youtube-dl issue? best should be the default format but specifying best causes the download to fail, while not specifying a format works. |
Same issue:
Expected: To get best available format. |
Just noting that this is likely Youtube's fault - their CDN doesn't have the entire video of the default choice (likely in mp4). Videos loaded on modern browsers are webm by default. I've tested this against the url in @VitaliyLazebny 's post above and the one URL from the first post. Just switch to -f webm
An alternative is to add some code to retry on missing content, but I think it's more trouble than it's worth, given that we can't easily anticipate whether Youtube's CDN lost their data or not. |
@Ngo-The-Trung Your missing the point. If I just say get this video, it works. But if I give the option of wanting 720-mp4 or best available if no 720-mp4 is found - it fails. When the user specifies best available format as an option is when it fails to find the available format, but as a default option it is able to find the best available. I have a list of formats in my rcfile, with best at the end. If I remove the rcfile I can get these videos. |
@sambler I'm saying that in some cases, it's the other way around - directly getting the video may not work, but enforcing a format does. In your case removed "best" served, but in my case adding "webm" served. This is because the CDN doesn't have the complete file even though the video page advertised otherwise. The challenge here is that the CDN could fail to send the last byte. The first likely solution is to retry broken downloads with a different format. I personally don't think it's an elegant solution - you could theoretically go on a retry loops for very large videos which wastes time and bandwidth. The other solution is to put webm over mp4 as the preferred format. If it serves in a modern browser, Youtube probably sent it as webm. |
@Ngo-The-Trung |
@VitaliyLazebny "best" means "best advertised". If the page advertises that it has a format, the CDN can still have a broken download. i.e. the page "lies" about the format. Which is why the download starts (you can see the download progress bar) but it fails halfway through. The only way to know is to start downloading the file, but as I said in theory the download could take you an hour only to fail at the last second. Retrying with another format isn't the most elegant solution. |
I would like to suggest instead of "ERROR: Did not get any data blocks" "ERROR: Did not get any data blocks (Server side youtube failure. Select another format.)" This is a known issue and youtube-dl should mention it (otherwise people like me will keep opening Issues for it) |
This does not necessarily mean that. As for opening new issues you must use search before posting duplicates. |
Make sure you are using the latest version: run
youtube-dl --version
and ensure your version is 2018.08.04. If it's not, read this FAQ entry and update. Issues with outdated version will be rejected.Before submitting an issue make sure you have:
What is the purpose of your issue?
If the purpose of this issue is a bug report, site support request or you are not completely sure provide the full verbose output as follows:
Add the
-v
flag to your command line you run youtube-dl with (youtube-dl -v <your command line>
), copy the whole output and insert it here. It should look similar to one below (replace it with your log inserted between triple ```):This error is related to settings in my config file which I have not changed for months, this one video fails, all other vids have had no issue. Moving the config allows this video to download with default settings.
My format list ends with
best
so I expect it to accept whatever format is available if my desired formats are not there.Error log is two attempts, one start and one to continue after fail
The text was updated successfully, but these errors were encountered: