Skip to content
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] Thumbnail download fails completely if maxresdefault.jpg is not available #21588

Closed
SebiderSushi opened this issue Jul 1, 2019 · 0 comments

Comments

@SebiderSushi
Copy link

@SebiderSushi SebiderSushi commented Jul 1, 2019

Checklist

  • I'm reporting a broken site support
  • I've verified that I'm running youtube-dl version 2019.06.27
  • 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 issues including closed ones

Verbose log

$ youtube-dl --skip-download --write-thumbnail -v MTJHdKsmuxU 0uEpX2elNMQ lAW
Cxqk7ZzY 5UIYSgtj59w sgx8OL5jrEM 8kDAt7h5lO8
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'--skip-download', u'--write-thumbnail', u'-v', u'MTJHdKsmuxU', u'0uEpX2elNMQ', u'lAWCxqk7ZzY', u'5UIYSgtj59w', u'sgx8OL5jrEM', u'8kDAt7h5lO8']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2019.06.27
[debug] Python version 2.7.12 (CPython) - Linux-4.15.0-52-generic-x86_64-with-Ubuntu-16.04-xenial
[debug] exe versions: ffmpeg 2.8.15, ffprobe 2.8.15, rtmpdump 2.4
[debug] Proxy map: {}
[youtube] MTJHdKsmuxU: Downloading webpage
[youtube] MTJHdKsmuxU: Downloading video info webpage
[debug] Default format spec: bestvideo+bestaudio/best
[youtube] MTJHdKsmuxU: Downloading thumbnail ...
WARNING: Unable to download thumbnail "https://i.ytimg.com/vi/MTJHdKsmuxU/maxresdefault.jpg": HTTP Error 404: Not Found
[youtube] 0uEpX2elNMQ: Downloading webpage
[youtube] 0uEpX2elNMQ: Downloading video info webpage
[debug] Default format spec: bestvideo+bestaudio/best
[youtube] 0uEpX2elNMQ: Downloading thumbnail ...
WARNING: Unable to download thumbnail "https://i.ytimg.com/vi/0uEpX2elNMQ/maxresdefault.jpg": HTTP Error 404: Not Found
[youtube] lAWCxqk7ZzY: Downloading webpage
[youtube] lAWCxqk7ZzY: Downloading video info webpage
[debug] Default format spec: bestvideo+bestaudio/best
[youtube] lAWCxqk7ZzY: Downloading thumbnail ...
WARNING: Unable to download thumbnail "https://i.ytimg.com/vi/lAWCxqk7ZzY/maxresdefault.jpg": HTTP Error 404: Not Found
[youtube] 5UIYSgtj59w: Downloading webpage
[youtube] 5UIYSgtj59w: Downloading video info webpage
[debug] Default format spec: bestvideo+bestaudio/best
[youtube] 5UIYSgtj59w: Downloading thumbnail ...
WARNING: Unable to download thumbnail "https://i.ytimg.com/vi/5UIYSgtj59w/maxresdefault.jpg": HTTP Error 404: Not Found
[youtube] sgx8OL5jrEM: Downloading webpage
[youtube] sgx8OL5jrEM: Downloading video info webpage
[debug] Default format spec: bestvideo+bestaudio/best
[youtube] sgx8OL5jrEM: Downloading thumbnail ...
WARNING: Unable to download thumbnail "https://i.ytimg.com/vi/sgx8OL5jrEM/maxresdefault.jpg": HTTP Error 404: Not Found
[youtube] 8kDAt7h5lO8: Downloading webpage
[youtube] 8kDAt7h5lO8: Downloading video info webpage
[debug] Default format spec: bestvideo+bestaudio/best
[youtube] 8kDAt7h5lO8: Downloading thumbnail ...
WARNING: Unable to download thumbnail "https://i.ytimg.com/vi/8kDAt7h5lO8/maxresdefault.jpg": HTTP Error 404: Not Found

Description

The Problem:

In the playlist https://www.youtube.com/playlist?list=PL94C7EDE446C02090 i encountered 6 playable videos where youtube-dl failed to download a thumbnail.
Their IDs are:

MTJHdKsmuxU
0uEpX2elNMQ
lAWCxqk7ZzY
5UIYSgtj59w
sgx8OL5jrEM
8kDAt7h5lO8

As seen in the error log, youtube-dl tries to download the maxresdefault.jpg for these IDs but fails since the correct file in these cases would actually be hqdefault.jpg. (Also found in the HTML page source code, contrary to maxresdefault.jpg)
https://i.ytimg.com/vi/MTJHdKsmuxU/hqdefault.jpg
https://i.ytimg.com/vi/0uEpX2elNMQ/hqdefault.jpg
https://i.ytimg.com/vi/lAWCxqk7ZzY/hqdefault.jpg
https://i.ytimg.com/vi/5UIYSgtj59w/hqdefault.jpg
https://i.ytimg.com/vi/sgx8OL5jrEM/hqdefault.jpg
https://i.ytimg.com/vi/8kDAt7h5lO8/hqdefault.jpg

Possible solution

Either fix a bug that leads to youtube-dl getting an incorrect thumbnail link or when maxresdefault.jpg can't be found, try other names like hqdefault.jpg automatically instead of failing completely.

@dstftw dstftw closed this Feb 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.