HTTP Error 500 Internal Server Error trying to download YouTube video which plays fine in browser #7856

Closed
opened 2026-02-21 02:56:04 -05:00 by deekerman · 1 comment
Owner

Originally created by @automorphism88 on GitHub (May 21, 2016).

Please follow the guide below

  • You will be asked some questions and requested to provide some information, please read them carefully and answer honestly
  • Put an x into all the boxes [ ] relevant to your issue (like that [x])
  • Use Preview tab to see how your issue will actually look like

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2016.05.16. If it's not read this FAQ entry and update. Issues with outdated version will be rejected.

  • I've verified and I assure that I'm running youtube-dl 2016.05.16

Before submitting an issue make sure you have:

  • At least skimmed through README and most notably FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones

What is the purpose of your issue?

  • Bug report (encountered problems with youtube-dl)
  • Site support request (request for adding support for a new site)
  • Feature request (request for a new functionality)
  • Question
  • Other

The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to 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 -v flag to your command line you run youtube-dl with, copy the whole output and insert it here. It should look similar to one below (replace it with your log inserted between triple ```):

$ youtube-dl -v hTKMfYkhr9M
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'-v', u'hTKMfYkhr9M']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2016.05.16
[debug] Python version 2.7.10 - Linux-4.2.0-36-generic-x86_64-with-Ubuntu-15.10-wily
[debug] exe versions: avconv 2.7.6-0ubuntu0.15.10.1, avprobe 2.7.6-0ubuntu0.15.10.1, ffmpeg 2.7.6-0ubuntu0.15.10.1, ffprobe 2.7.6-0ubuntu0.15.10.1, rtmpdump 2.4
[debug] Proxy map: {}
[youtube] hTKMfYkhr9M: Downloading webpage
[youtube] hTKMfYkhr9M: Downloading video info webpage
[youtube] hTKMfYkhr9M: Extracting video information
[youtube] hTKMfYkhr9M: Downloading MPD manifest
WARNING: Requested formats are incompatible for merge and will be merged into mkv.
[debug] Invoking downloader on u'https://r1---sn-n4v7sn76.googlevideo.com/videoplayback?id=85328c7d8921afd3&itag=136&source=youtube&requiressl=yes&mn=sn-n4v7sn76&ms=au&pl=20&mv=m&initcwndbps=2067500&nh=IgpwcjAxLnNqYzA3KgkxMjcuMC4wLjE&mm=31&ratebypass=yes&mime=video/mp4&gir=yes&clen=38065597&lmt=1424595506823008&dur=1532.466&fexp=9405966,9416126,9416891,9419451,9422596,9423554,9425350,9427767,9428193,9428398,9431012,9431418,9433046,9433096,9433946,9433998,9434708,9435731,9435876,9436801,9436835,9437403&upn=vq4lUxiNy4I&mt=1463847652&sver=3&key=dg_yt0&signature=6955F41920E5073EB96B9F5A4B6BC26979E6D98E.45B2F8E9F85068E423E88D08C802012D4FEEE638&ip=71.94.197.202&ipbits=0&expire=1463869390&sparams=ip,ipbits,expire,id,itag,source,requiressl,mn,ms,pl,mv,initcwndbps,nh,mm,ratebypass,mime,gir,clen,lmt,dur'
[download] Standard Chess #29 - robwilby vs. IM Bartholomew (Nimzo-Larsen Attack)-hTKMfYkhr9M.f136.mp4 has already been downloaded
[download] 100% of 36.30MiB
[debug] Invoking downloader on u'https://r1---sn-n4v7sn76.googlevideo.com/videoplayback?id=85328c7d8921afd3&itag=251&source=youtube&requiressl=yes&mn=sn-n4v7sn76&ms=au&pl=20&mv=m&initcwndbps=2067500&nh=IgpwcjAxLnNqYzA3KgkxMjcuMC4wLjE&mm=31&ratebypass=yes&mime=audio/webm&gir=yes&clen=26893011&lmt=1424464093083394&dur=1532.461&fexp=9405966,9416126,9416891,9419451,9422596,9423554,9425350,9427767,9428193,9428398,9431012,9431418,9433046,9433096,9433946,9433998,9434708,9435731,9435876,9436801,9436835,9437403&upn=vq4lUxiNy4I&mt=1463847652&sver=3&key=dg_yt0&signature=8719E51C7DEF4D3002A7E9A3BDE377A8EF044020.28BBE5E24F2AA2922211AD3013DA5E6EEBEA859B&ip=71.94.197.202&ipbits=0&expire=1463869390&sparams=ip,ipbits,expire,id,itag,source,requiressl,mn,ms,pl,mv,initcwndbps,nh,mm,ratebypass,mime,gir,clen,lmt,dur'
[download] Got server HTTP error. Retrying (attempt 1 of 10)...
[download] Got server HTTP error. Retrying (attempt 2 of 10)...
[download] Got server HTTP error. Retrying (attempt 3 of 10)...
[download] Got server HTTP error. Retrying (attempt 4 of 10)...
[download] Got server HTTP error. Retrying (attempt 5 of 10)...
[download] Got server HTTP error. Retrying (attempt 6 of 10)...
[download] Got server HTTP error. Retrying (attempt 7 of 10)...
[download] Got server HTTP error. Retrying (attempt 8 of 10)...
[download] Got server HTTP error. Retrying (attempt 9 of 10)...
[download] Got server HTTP error. Retrying (attempt 10 of 10)...
ERROR: giving up after 10 retries
Traceback (most recent call last):
  File "/usr/local/bin/youtube-dl/youtube_dl/downloader/http.py", line 58, in real_download
    data = self.ydl.urlopen(request)
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1946, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/usr/lib/python2.7/urllib2.py", line 437, in open
    response = meth(req, response)
  File "/usr/lib/python2.7/urllib2.py", line 550, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python2.7/urllib2.py", line 475, in error
    return self._call_chain(*args)
  File "/usr/lib/python2.7/urllib2.py", line 409, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.7/urllib2.py", line 558, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 500: Internal Server Error
...
<end of log>

Description of your issue, suggested solution and other information

When attempting to download this video from YouTube, youtube-dl is able to retrieve the video portion but gets an HTTP Error 500 when it tries to fetch the audio. The video plays fine in a web browser, including the audio portion, so it appears that the issue is with youtube-dl and not with YouTube. I am able to download other videos without any issues and I'm not sure what's different about this one in particular.

Originally created by @automorphism88 on GitHub (May 21, 2016). ## Please follow the guide below - You will be asked some questions and requested to provide some information, please read them **carefully** and answer honestly - Put an `x` into all the boxes [ ] relevant to your _issue_ (like that [x]) - Use _Preview_ tab to see how your issue will actually look like --- ### Make sure you are using the _latest_ version: run `youtube-dl --version` and ensure your version is _2016.05.16_. If it's not read [this FAQ entry](https://github.com/rg3/youtube-dl/blob/master/README.md#how-do-i-update-youtube-dl) and update. Issues with outdated version will be rejected. - [x] I've **verified** and **I assure** that I'm running youtube-dl **2016.05.16** ### Before submitting an _issue_ make sure you have: - [x] At least skimmed through [README](https://github.com/rg3/youtube-dl/blob/master/README.md) and **most notably** [FAQ](https://github.com/rg3/youtube-dl#faq) and [BUGS](https://github.com/rg3/youtube-dl#bugs) sections - [x] [Searched](https://github.com/rg3/youtube-dl/search?type=Issues) the bugtracker for similar issues including closed ones ### What is the purpose of your _issue_? - [x] Bug report (encountered problems with youtube-dl) - [ ] Site support request (request for adding support for a new site) - [ ] Feature request (request for a new functionality) - [ ] Question - [ ] Other --- ### The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to 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 `-v` flag to **your command line** you run youtube-dl with, copy the **whole** output and insert it here. It should look similar to one below (replace it with **your** log inserted between triple ```): ``` $ youtube-dl -v hTKMfYkhr9M [debug] System config: [] [debug] User config: [] [debug] Command-line args: [u'-v', u'hTKMfYkhr9M'] [debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8 [debug] youtube-dl version 2016.05.16 [debug] Python version 2.7.10 - Linux-4.2.0-36-generic-x86_64-with-Ubuntu-15.10-wily [debug] exe versions: avconv 2.7.6-0ubuntu0.15.10.1, avprobe 2.7.6-0ubuntu0.15.10.1, ffmpeg 2.7.6-0ubuntu0.15.10.1, ffprobe 2.7.6-0ubuntu0.15.10.1, rtmpdump 2.4 [debug] Proxy map: {} [youtube] hTKMfYkhr9M: Downloading webpage [youtube] hTKMfYkhr9M: Downloading video info webpage [youtube] hTKMfYkhr9M: Extracting video information [youtube] hTKMfYkhr9M: Downloading MPD manifest WARNING: Requested formats are incompatible for merge and will be merged into mkv. [debug] Invoking downloader on u'https://r1---sn-n4v7sn76.googlevideo.com/videoplayback?id=85328c7d8921afd3&itag=136&source=youtube&requiressl=yes&mn=sn-n4v7sn76&ms=au&pl=20&mv=m&initcwndbps=2067500&nh=IgpwcjAxLnNqYzA3KgkxMjcuMC4wLjE&mm=31&ratebypass=yes&mime=video/mp4&gir=yes&clen=38065597&lmt=1424595506823008&dur=1532.466&fexp=9405966,9416126,9416891,9419451,9422596,9423554,9425350,9427767,9428193,9428398,9431012,9431418,9433046,9433096,9433946,9433998,9434708,9435731,9435876,9436801,9436835,9437403&upn=vq4lUxiNy4I&mt=1463847652&sver=3&key=dg_yt0&signature=6955F41920E5073EB96B9F5A4B6BC26979E6D98E.45B2F8E9F85068E423E88D08C802012D4FEEE638&ip=71.94.197.202&ipbits=0&expire=1463869390&sparams=ip,ipbits,expire,id,itag,source,requiressl,mn,ms,pl,mv,initcwndbps,nh,mm,ratebypass,mime,gir,clen,lmt,dur' [download] Standard Chess #29 - robwilby vs. IM Bartholomew (Nimzo-Larsen Attack)-hTKMfYkhr9M.f136.mp4 has already been downloaded [download] 100% of 36.30MiB [debug] Invoking downloader on u'https://r1---sn-n4v7sn76.googlevideo.com/videoplayback?id=85328c7d8921afd3&itag=251&source=youtube&requiressl=yes&mn=sn-n4v7sn76&ms=au&pl=20&mv=m&initcwndbps=2067500&nh=IgpwcjAxLnNqYzA3KgkxMjcuMC4wLjE&mm=31&ratebypass=yes&mime=audio/webm&gir=yes&clen=26893011&lmt=1424464093083394&dur=1532.461&fexp=9405966,9416126,9416891,9419451,9422596,9423554,9425350,9427767,9428193,9428398,9431012,9431418,9433046,9433096,9433946,9433998,9434708,9435731,9435876,9436801,9436835,9437403&upn=vq4lUxiNy4I&mt=1463847652&sver=3&key=dg_yt0&signature=8719E51C7DEF4D3002A7E9A3BDE377A8EF044020.28BBE5E24F2AA2922211AD3013DA5E6EEBEA859B&ip=71.94.197.202&ipbits=0&expire=1463869390&sparams=ip,ipbits,expire,id,itag,source,requiressl,mn,ms,pl,mv,initcwndbps,nh,mm,ratebypass,mime,gir,clen,lmt,dur' [download] Got server HTTP error. Retrying (attempt 1 of 10)... [download] Got server HTTP error. Retrying (attempt 2 of 10)... [download] Got server HTTP error. Retrying (attempt 3 of 10)... [download] Got server HTTP error. Retrying (attempt 4 of 10)... [download] Got server HTTP error. Retrying (attempt 5 of 10)... [download] Got server HTTP error. Retrying (attempt 6 of 10)... [download] Got server HTTP error. Retrying (attempt 7 of 10)... [download] Got server HTTP error. Retrying (attempt 8 of 10)... [download] Got server HTTP error. Retrying (attempt 9 of 10)... [download] Got server HTTP error. Retrying (attempt 10 of 10)... ERROR: giving up after 10 retries Traceback (most recent call last): File "/usr/local/bin/youtube-dl/youtube_dl/downloader/http.py", line 58, in real_download data = self.ydl.urlopen(request) File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1946, in urlopen return self._opener.open(req, timeout=self._socket_timeout) File "/usr/lib/python2.7/urllib2.py", line 437, in open response = meth(req, response) File "/usr/lib/python2.7/urllib2.py", line 550, in http_response 'http', request, response, code, msg, hdrs) File "/usr/lib/python2.7/urllib2.py", line 475, in error return self._call_chain(*args) File "/usr/lib/python2.7/urllib2.py", line 409, in _call_chain result = func(*args) File "/usr/lib/python2.7/urllib2.py", line 558, in http_error_default raise HTTPError(req.get_full_url(), code, msg, hdrs, fp) HTTPError: HTTP Error 500: Internal Server Error ... <end of log> ``` --- ### Description of your _issue_, suggested solution and other information When attempting to download this video from YouTube, youtube-dl is able to retrieve the video portion but gets an HTTP Error 500 when it tries to fetch the audio. The video plays fine in a web browser, including the audio portion, so it appears that the issue is with youtube-dl and not with YouTube. I am able to download other videos without any issues and I'm not sure what's different about this one in particular.
Author
Owner

@dstftw commented on GitHub (May 21, 2016):

bestaudio format is reported as 251 but not available from YouTube side. Browser uses lower quality audio format.
Duplicate of #3721.

@dstftw commented on GitHub (May 21, 2016): `bestaudio` format is reported as 251 but not available from YouTube side. Browser uses lower quality audio format. Duplicate of #3721.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/youtube-dl#7856
No description provided.