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 – “unable to download video data: HTTP Error 404: Not Found” #24951

Closed
faxotherapy opened this issue Apr 22, 2020 · 1 comment
Closed

Comments

@faxotherapy
Copy link

@faxotherapy faxotherapy commented Apr 22, 2020

Checklist

  • I'm reporting a broken site support
  • I've verified that I'm running youtube-dl version 2020.03.24
  • 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 -vf 137+140 https://www.youtube.com/watch\?v\=02Q9IO7kcH4
[debug] System config: []
[debug] User config: [u'--proxy', u'127.0.0.1:8118', u'--no-check-certificate', u'--youtube-skip-dash-manifest', u'--add-metadata', u'--xattrs']
[debug] Custom config: []
[debug] Command-line args: [u'-vf', u'137+140', u'https://www.youtube.com/watch?v=02Q9IO7kcH4']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2020.03.24
[debug] Python version 2.7.17 (CPython) - Darwin-18.7.0-x86_64-i386-64bit
[debug] exe versions: avconv 12.3, avprobe 12.3, ffmpeg 4.2.2, ffprobe 4.2.2, rtmpdump 2.4
[debug] Proxy map: {u'http': u'127.0.0.1:8118', u'https': u'127.0.0.1:8118'}
[youtube] 02Q9IO7kcH4: Downloading webpage
[debug] Invoking downloader on u'https://r6---sn-5goeen76.googlevideo.com/videoplayback?expire=1587613317&ei=JbqgXpXULtTw7ASA1aCAAQ&ip=185.65.135.160&id=o-ACpdP5mmf6RwG9VjhLtajS9bF7NWizg_mGHHsCDWVBJL&itag=137&aitags=133%2C134%2C135%2C136%2C137%2C160%2C242%2C243%2C244%2C247%2C248%2C278%2C298%2C299%2C302%2C303&source=yt_otf&requiressl=yes&mh=Ew&mm=31%2C29&mn=sn-5goeen76%2Csn-5go7ynez&ms=au%2Crdu&mv=m&mvi=5&pl=24&initcwndbps=2322500&vprv=1&mime=video%2Fmp4&otf=1&otfp=1&dur=0.000&lmt=1547479791629371&mt=1587591633&fvip=6&keepalive=yes&fexp=23882513&beids=9466585&c=WEB&sparams=expire%2Cei%2Cip%2Cid%2Caitags%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cotf%2Cotfp%2Cdur%2Clmt&sig=AJpPlLswRgIhAJq09nVGAPI7tH4Yy6uoSOKFoJwj36-X2FbstrKYEcUnAiEAoGwH2LtyRijGaCX4X0GxXP6F6Ww6fgkQsDA-2lYClL8%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=ALrAebAwRAIgSaasRbEopEhWUdXk5YtOCgbx8YeMmKTVkJGz1EkOQ70CIHA8GdHymMVDz6TLvI7rmyBX7nM4k4XW8AigiNCK9w2C&ratebypass=yes'
ERROR: unable to download video data: HTTP Error 404: Not Found
Traceback (most recent call last):
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1920, in process_info
    partial_success = dl(fname, new_info)
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1865, in dl
    return fd.download(name, info)
  File "/usr/local/bin/youtube-dl/youtube_dl/downloader/common.py", line 366, in download
    return self.real_download(filename, info_dict)
  File "/usr/local/bin/youtube-dl/youtube_dl/downloader/http.py", line 341, in real_download
    establish_connection()
  File "/usr/local/bin/youtube-dl/youtube_dl/downloader/http.py", line 109, in establish_connection
    ctx.data = self.ydl.urlopen(request)
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 2238, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/usr/local/Cellar/python@2/2.7.17_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 435, in open
    response = meth(req, response)
  File "/usr/local/Cellar/python@2/2.7.17_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 548, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/local/Cellar/python@2/2.7.17_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 473, in error
    return self._call_chain(*args)
  File "/usr/local/Cellar/python@2/2.7.17_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 407, in _call_chain
    result = func(*args)
  File "/usr/local/Cellar/python@2/2.7.17_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 556, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 404: Not Found

Description

I try to download a YouTube video as follows:

$ youtube-dl --version
2020.03.24

$ youtube-dl -F https://www.youtube.com/watch\?v\=02Q9IO7kcH4                                           [youtube] 02Q9IO7kcH4: Downloading webpage
[info] Available formats for 02Q9IO7kcH4:
format code  extension  resolution note
140          m4a        audio only tiny  130k , m4a_dash container, mp4a.40.2@128k (44100Hz), 9.76MiB
251          webm       audio only tiny  141k , opus @160k (48000Hz), 10.02MiB
278          webm       256x144    144p   95k , webm container, vp9, 30fps, video only
160          mp4        256x144    144p  108k , avc1.4d400b, 30fps, video only
242          webm       426x240    240p  220k , vp9, 30fps, video only
133          mp4        426x240    240p  242k , avc1.4d400c, 30fps, video only
134          mp4        640x360    360p  250k , avc1.4d401e, 30fps, video only, 5.83MiB
243          webm       640x360    360p  405k , vp9, 30fps, video only
244          webm       854x480    480p  752k , vp9, 30fps, video only
135          mp4        854x480    480p 1155k , avc1.4d4014, 30fps, video only
247          webm       1280x720   720p 1505k , vp9, 30fps, video only
136          mp4        1280x720   720p 2310k , avc1.4d4016, 30fps, video only
302          webm       1280x720   720p60 2646k , vp9, 60fps, video only
248          webm       1920x1080  1080p 2646k , vp9, 30fps, video only
298          mp4        1280x720   720p60 3465k , avc1.4d4016, 60fps, video only
137          mp4        1920x1080  1080p 4331k , avc1.64001e, 30fps, video only
303          webm       1920x1080  1080p60 4410k , vp9, 60fps, video only
299          mp4        1920x1080  1080p60 4478k , avc1.64002a, 60fps, video only, 49.22MiB
18           mp4        640x360    360p  254k , avc1.42001E, mp4a.40.2@ 96k (44100Hz), 19.14MiB
22           mp4        1280x720   720p  687k , avc1.64001F, mp4a.40.2@192k (44100Hz) (best)

$ youtube-dl -f 137+140 https://www.youtube.com/watch\?v\=02Q9IO7kcH4                                   [youtube] 02Q9IO7kcH4: Downloading webpage
ERROR: unable to download video data: HTTP Error 404: Not Found

Yet, this video is playable on YouTube itself.

BUT, the issue is gone if I input:

$ youtube-dl -f best https://www.youtube.com/watch\?v\=02Q9IO7kcH4                                      [youtube] 02Q9IO7kcH4: Downloading webpage
[download] Destination: Wasabi wallet - 5 What are Coinjoins-02Q9IO7kcH4.mp4
[download] 100% of 51.77MiB in 00:22
[ffmpeg] Adding metadata to 'Wasabi wallet - 5 What are Coinjoins-02Q9IO7kcH4.mp4'
[metadata] Writing metadata to file's xattrs

The question is why 137+140 is not accepted while shown as available.

It now happens very often.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Apr 22, 2020

> py -3.7 -m youtube_dl -f 137+140 02Q9IO7kcH4
[youtube] 02Q9IO7kcH4: Downloading webpage
[youtube] 02Q9IO7kcH4: Downloading MPD manifest
[dashsegments] Total fragments: 126
[download] Destination: Wasabi wallet - 5 What are Coinjoins-02Q9IO7kcH4.f137.mp4
[download] 100% of 37.99MiB in 01:48
[dashsegments] Total fragments: 65
[download] Destination: Wasabi wallet - 5 What are Coinjoins-02Q9IO7kcH4.f140.m4a
[download] 100% of 9.76MiB in 00:05
[ffmpeg] Merging formats into "Wasabi wallet - 5 What are Coinjoins-02Q9IO7kcH4.mp4"
Deleting original file Wasabi wallet - 5 What are Coinjoins-02Q9IO7kcH4.f137.mp4 (pass -k to keep)
Deleting original file Wasabi wallet - 5 What are Coinjoins-02Q9IO7kcH4.f140.m4a (pass -k to keep)
@dstftw dstftw closed this Apr 22, 2020
@ytdl-org ytdl-org deleted a comment from faxotherapy Apr 28, 2020
@ytdl-org ytdl-org locked and limited conversation to collaborators Apr 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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.