youtube-dl fails to download video; no explanation #301

Closed
opened 2026-02-20 23:00:23 -05:00 by deekerman · 41 comments
Owner

Originally created by @waucka on GitHub (Sep 26, 2012).

$ youtube-dl --version
2012.02.27
$ youtube-dl -v 'http://www.youtube.com/watch?v=7YeonrZUMHo'
[debug] Proxy map: {}
[youtube] Setting language
[youtube] 7YeonrZUMHo: Downloading video webpage
[youtube] 7YeonrZUMHo: Downloading video info webpage
[youtube] 7YeonrZUMHo: Extracting video information

ERROR: unable to download video

I can watch the video just fine in my browser, even if I'm not logged in to Youtube. youtube-dl downloads descriptions and .info.json files just fine.

Originally created by @waucka on GitHub (Sep 26, 2012). ``` $ youtube-dl --version 2012.02.27 $ youtube-dl -v 'http://www.youtube.com/watch?v=7YeonrZUMHo' [debug] Proxy map: {} [youtube] Setting language [youtube] 7YeonrZUMHo: Downloading video webpage [youtube] 7YeonrZUMHo: Downloading video info webpage [youtube] 7YeonrZUMHo: Extracting video information ERROR: unable to download video ``` I can watch the video just fine in my browser, even if I'm not logged in to Youtube. youtube-dl downloads descriptions and .info.json files just fine.
Author
Owner

@aksarkar commented on GitHub (Sep 26, 2012):

It's a 403 error. Most, but not all Youtube URLs I've tried today give this error now.

$ youtube-dl -g 'http://www.youtube.com/watch?v=7YeonrZUMHo' | xargs curl -I
HTTP/1.1 403 Forbidden
Last-Modified: Wed, 02 May 2007 10:26:10 GMT
Content-Type: text/plain
Connection: close
X-Content-Type-Options: nosniff
Date: Thu, 27 Sep 2012 03:46:34 GMT
Server: gvs 1.0
@aksarkar commented on GitHub (Sep 26, 2012): It's a 403 error. Most, but not all Youtube URLs I've tried today give this error now. ``` $ youtube-dl -g 'http://www.youtube.com/watch?v=7YeonrZUMHo' | xargs curl -I HTTP/1.1 403 Forbidden Last-Modified: Wed, 02 May 2007 10:26:10 GMT Content-Type: text/plain Connection: close X-Content-Type-Options: nosniff Date: Thu, 27 Sep 2012 03:46:34 GMT Server: gvs 1.0 ```
Author
Owner

@wiserweb commented on GitHub (Sep 27, 2012):

Confirmed here as well.. Python 2.6.6, generic public videos won't download. Oh, and these things always occur when you've been searching for a solution all day, you finally find one, setup the server, update python, update the paths, and you bash your head for hours.. then finally since it's so recent Google hasn't picked this thread up, and you stumble here, somewhat relieved, somewhat disoriented by a full day gone by and no way to get that gratification that you 'got something working'. :)

@wiserweb commented on GitHub (Sep 27, 2012): Confirmed here as well.. Python 2.6.6, generic public videos won't download. Oh, and these things always occur when you've been searching for a solution all day, you finally find one, setup the server, update python, update the paths, and you bash your head for hours.. then finally since it's so recent Google hasn't picked this thread up, and you stumble here, somewhat relieved, somewhat disoriented by a full day gone by and no way to get that gratification that you 'got something working'. :)
Author
Owner

@virtulis commented on GitHub (Sep 27, 2012):

It seems that youtube now has a 'signature' request param. Modifying or removing that results in a 403. No idea where it comes from yet.

@virtulis commented on GitHub (Sep 27, 2012): It seems that youtube now has a 'signature' request param. Modifying or removing that results in a 403. No idea where it comes from yet.
Author
Owner

@kenrestivo commented on GitHub (Sep 27, 2012):

I just experienced this too. Something Bad has changed at Google, I think. Not good.

I was having the problem with a release from 2/12/2012 on Python 2.5, then tried with the latest youtbe-dl git commit on Python 2.7.3, same error.

@kenrestivo commented on GitHub (Sep 27, 2012): I just experienced this too. Something Bad has changed at Google, I think. Not good. I was having the problem with a release from 2/12/2012 on Python 2.5, then tried with the latest youtbe-dl git commit on Python 2.7.3, same error.
Author
Owner

@Zurd commented on GitHub (Sep 27, 2012):

Confirmed too. Debian Testing.

youtube-dl --version
2012.02.27

python --version
Python 2.7.3rc2

@Zurd commented on GitHub (Sep 27, 2012): Confirmed too. Debian Testing. > youtube-dl --version > 2012.02.27 > > python --version > Python 2.7.3rc2
Author
Owner

@wiserweb commented on GitHub (Sep 27, 2012):

The permanent fix for ALL content grabbers is a FireFox command line API, where after you navigate to a page you can pick from the cache what you'd like to keep, and download anything through the browser as a background service without the UI. - YouTube can always break a script, but the browser it has to respect.

@wiserweb commented on GitHub (Sep 27, 2012): The permanent fix for ALL content grabbers is a FireFox command line API, where after you navigate to a page you can pick from the cache what you'd like to keep, and download anything through the browser as a background service without the UI. - YouTube can always break a script, but the browser it has to respect.
Author
Owner

@Zurd commented on GitHub (Sep 27, 2012):

That is a solution for one video at a time but youtube-dl provide the means to download all the videos of a user on youtube in one single command which is what I need.

@Zurd commented on GitHub (Sep 27, 2012): That is a solution for one video at a time but youtube-dl provide the means to download all the videos of a user on youtube in one single command which is what I need.
Author
Owner

@virtulis commented on GitHub (Sep 27, 2012):

The 'signature' param is generated on server like everything else and is present in "url_encoded_fmt_stream_map" as "sig", among other things. Just get the url from "url_encoded_fmt_stream_map", change '&sig=' to '&signature=' and it's ready to use, unless I'm missing something.

@virtulis commented on GitHub (Sep 27, 2012): The 'signature' param is generated on server like everything else and is present in "url_encoded_fmt_stream_map" as "sig", among other things. Just get the url from "url_encoded_fmt_stream_map", change '&sig=' to '&signature=' and it's ready to use, unless I'm missing something.
Author
Owner

@intarstudents commented on GitHub (Sep 27, 2012):

That doesn't seem to fix it @virtulis

@intarstudents commented on GitHub (Sep 27, 2012): That doesn't seem to fix it @virtulis
Author
Owner

@0x73706f6f6b commented on GitHub (Sep 27, 2012):

I agree, still getting an error with that fix.

@0x73706f6f6b commented on GitHub (Sep 27, 2012): I agree, still getting an error with that fix.
Author
Owner

@virtulis commented on GitHub (Sep 27, 2012):

Well it sure does for me. Did you recompile (or use youtube-dl.dev)?

@virtulis commented on GitHub (Sep 27, 2012): Well it sure does for me. Did you recompile (or use youtube-dl.dev)?
Author
Owner

@notEthan commented on GitHub (Sep 27, 2012):

@virtulis that fixed it for me; thanks

@notEthan commented on GitHub (Sep 27, 2012): @virtulis that fixed it for me; thanks
Author
Owner

@vegagame commented on GitHub (Sep 27, 2012):

For me it's work, eg: ./youtube-dl.dev http://www.youtube.com/watch?v=djbR4DYHyV0

@vegagame commented on GitHub (Sep 27, 2012): For me it's work, eg: ./youtube-dl.dev http://www.youtube.com/watch?v=djbR4DYHyV0
Author
Owner

@Zurd commented on GitHub (Sep 27, 2012):

I don't understand, what is there to compile? youtube-dl is just a python file, can't I just modify this file?

@Zurd commented on GitHub (Sep 27, 2012): I don't understand, what is there to compile? youtube-dl is just a python file, can't I just modify this file?
Author
Owner

@0x73706f6f6b commented on GitHub (Sep 27, 2012):

@virtulis All is well now. Thanks !

@0x73706f6f6b commented on GitHub (Sep 27, 2012): @virtulis All is well now. Thanks !
Author
Owner

@Tailszefox commented on GitHub (Sep 27, 2012):

@virtulis Confirmed working for me as well, I couldn't download anything this morning and that fixed it. Thanks!

@Zurd The youtube-dl file is a ZIP file now, so changing it by hand is a bit less trivial than before. The easiest way to apply the fix yourself until the pull request is accepted is to clone the repository on your own file system, change the file according to the fix made by @virtulis, and recompile using "make". You'll get a new "youtube-dl" file that you can put somewhere where your $PATH will catch it, if you want it to replace the current version.

@Tailszefox commented on GitHub (Sep 27, 2012): @virtulis Confirmed working for me as well, I couldn't download anything this morning and that fixed it. Thanks! @Zurd The youtube-dl file is a ZIP file now, so changing it by hand is a bit less trivial than before. The easiest way to apply the fix yourself until the pull request is accepted is to clone the repository on your own file system, change the file according to the fix made by @virtulis, and recompile using "make". You'll get a new "youtube-dl" file that you can put somewhere where your $PATH will catch it, if you want it to replace the current version.
Author
Owner

@krayon commented on GitHub (Sep 27, 2012):

@Zurd: it's "make compile" but other than that, yeah what @Tailszefox said. Quick work @virtulis , thanks :D

@krayon commented on GitHub (Sep 27, 2012): @Zurd: it's "make compile" but other than that, yeah what @Tailszefox said. Quick work @virtulis , thanks :D
Author
Owner

@Zurd commented on GitHub (Sep 27, 2012):

sudo apt-get install git
git clone https://github.com/rg3/youtube-dl.git
sudo apt-get install zip
nano youtube_dl/InfoExtractors.py (modify line 405)
make compile
./youtube-dl ...link...

Easy as pie! Confirmed working, thanks!

@Zurd commented on GitHub (Sep 27, 2012): sudo apt-get install git git clone https://github.com/rg3/youtube-dl.git sudo apt-get install zip nano youtube_dl/InfoExtractors.py (modify line 405) make compile ./youtube-dl ...link... Easy as pie! Confirmed working, thanks!
Author
Owner

@virtulis commented on GitHub (Sep 27, 2012):

@Zurd um, or you could just git clone https://github.com/virtulis/youtube-dl.git
I'm just sayin'

@virtulis commented on GitHub (Sep 27, 2012): @Zurd um, or you could just git clone https://github.com/virtulis/youtube-dl.git I'm just sayin'
Author
Owner

@nublaii commented on GitHub (Sep 27, 2012):

@virtulis Works like a charm! ;)

@nublaii commented on GitHub (Sep 27, 2012): @virtulis Works like a charm! ;)
Author
Owner

@Zurd commented on GitHub (Sep 27, 2012):

@virtulis ah I see the line 'referenced this issue from a commit in virtulis/youtube-dl', in any case, thanks!

@Zurd commented on GitHub (Sep 27, 2012): @virtulis ah I see the line 'referenced this issue from a commit in virtulis/youtube-dl', in any case, thanks!
Author
Owner

@fridrik01 commented on GitHub (Sep 27, 2012):

I had the same problem, and after cloning the git repo everything works great again. Thanks all!

@fridrik01 commented on GitHub (Sep 27, 2012): I had the same problem, and after cloning the git repo everything works great again. Thanks all!
Author
Owner

@phihag commented on GitHub (Sep 27, 2012):

@frikkasoft You should now be able to just update youtube-dl since @virtulis 's change has been merged.

@phihag commented on GitHub (Sep 27, 2012): @frikkasoft You should now be able to just update youtube-dl since @virtulis 's change has been merged.
Author
Owner

@acuity12 commented on GitHub (Sep 27, 2012):

@virtulis you're awesome. I'm so stoked this community exists to jump on this problem just a couple hours after it happened. youtube-dl powers http://imgflip.com/gifgenerator and the URL function is back!

@acuity12 commented on GitHub (Sep 27, 2012): @virtulis you're awesome. I'm so stoked this community exists to jump on this problem just a couple hours after it happened. youtube-dl powers http://imgflip.com/gifgenerator and the URL function is back!
Author
Owner

@krayon commented on GitHub (Sep 27, 2012):

@acuity12 That's a cool tool, and nice that it's powered with youtube-dl too. You should give youtube-dl credit on the site ;)

@krayon commented on GitHub (Sep 27, 2012): @acuity12 That's a cool tool, and nice that it's powered with youtube-dl too. You should give youtube-dl credit on the site ;)
Author
Owner

@cabetof commented on GitHub (Sep 27, 2012):

It's amazing the solution time. Thank you very much. In my case simply update:

xxx @ Multivac: ~ / Videos $ sudo youtube-dl -U
[sudo] password for xxx:
Updating to latest version ...
Updated youtube-dl. Restart youtube-dl to use the new version.
xxx @ Multivac: ~ / Videos $ youtube-dl --version
2012.09.27

And now everything works ... :)

@cabetof commented on GitHub (Sep 27, 2012): It's amazing the solution time. Thank you very much. In my case simply update: xxx @ Multivac: ~ / Videos $ sudo youtube-dl -U [sudo] password for xxx: Updating to latest version ... Updated youtube-dl. Restart youtube-dl to use the new version. xxx @ Multivac: ~ / Videos $ youtube-dl --version 2012.09.27 And now everything works ... :)
Author
Owner

@ghost commented on GitHub (Oct 2, 2012):

The first part of this bug, "youtube-dl fails to download video" has been fixed (for now...) but the second half, "no explanation", has not.

At the very least, youtube-dl knows that the reason for the error is 'HTTP 403', which it does not report:

ERROR: unable to download video

@ghost commented on GitHub (Oct 2, 2012): The first part of this bug, "youtube-dl fails to download video" has been fixed (for now...) but the second half, "no explanation", has not. _At the very least_, youtube-dl knows that the reason for the error is 'HTTP 403', which it does not report: ERROR: unable to download video
Author
Owner

@pmdzlineur commented on GitHub (Oct 10, 2012):

su:
password
youtube-dl -U
was the solution for me.
Then youtube-dl thevideo
Nice feature :)

@pmdzlineur commented on GitHub (Oct 10, 2012): su: password youtube-dl -U was the solution for me. Then youtube-dl thevideo Nice feature :)
Author
Owner

@akash0x53 commented on GitHub (Nov 13, 2012):

sudo youtube-dl -U
update with latest stable release and then download your video

This works :)

@akash0x53 commented on GitHub (Nov 13, 2012): sudo youtube-dl -U update with latest stable release and then download your video This works :)
Author
Owner

@carlosmedina-io commented on GitHub (Dec 5, 2012):

exacto, prueben a actualizar la versión.... youtube-dl -U y listo!!

@carlosmedina-io commented on GitHub (Dec 5, 2012): exacto, prueben a actualizar la versión.... youtube-dl -U y listo!!
Author
Owner

@puppypilgrim commented on GitHub (Dec 10, 2012):

As said above, I "sudo youtube-dl -U" which updates to the latest version, then used the command as usual and Youtube now works fine.

Thank you to all who made this happen.

Vancouver, Canada

@puppypilgrim commented on GitHub (Dec 10, 2012): As said above, I "sudo youtube-dl -U" which updates to the latest version, then used the command as usual and Youtube now works fine. Thank you to all who made this happen. Vancouver, Canada
Author
Owner

@davidmcdavid commented on GitHub (Dec 26, 2012):

I got it from github (before reading about the -U option)

sudo apt-get install git
git clone https://github.com/rg3/youtube-dl.git
cd youtube-dl/
python -m youtube_dl <a_youtube_URL>

@davidmcdavid commented on GitHub (Dec 26, 2012): I got it from github (before reading about the -U option) sudo apt-get install git git clone https://github.com/rg3/youtube-dl.git cd youtube-dl/ python -m youtube_dl <a_youtube_URL>
Author
Owner

@atmelino commented on GitHub (Feb 25, 2013):

same here: before the upgrade, it did not work. After the upgrade, it worked
sudo youtube-dl -U

@atmelino commented on GitHub (Feb 25, 2013): same here: before the upgrade, it did not work. After the upgrade, it worked sudo youtube-dl -U
Author
Owner

@awojnowski commented on GitHub (Apr 3, 2013):

Has anyone experienced the signature being placed with the key "s", rather than "sig" within the fmt_stream_map? This seems to randomly occur with some users on an application of mine, and constructing the url using what appears to be the signature with the key "s" fails, even though "s" takes on the appearance of a completely valid signature.

@awojnowski commented on GitHub (Apr 3, 2013): Has anyone experienced the signature being placed with the key "s", rather than "sig" within the fmt_stream_map? This seems to randomly occur with some users on an application of mine, and constructing the url using what appears to be the signature with the key "s" fails, even though "s" takes on the appearance of a completely valid signature.
Author
Owner

@FiloSottile commented on GitHub (Apr 4, 2013):

@speedyapocalypse Umh... never seen anything like that, could you maybe provide a pcap, or a saved html?

@FiloSottile commented on GitHub (Apr 4, 2013): @speedyapocalypse Umh... never seen anything like that, could you maybe provide a pcap, or a saved html?
Author
Owner

@awojnowski commented on GitHub (Apr 4, 2013):

I've put the HTML of the page in this Gist: https://gist.github.com/speedyapocalypse/5311690

Attached also is an example of one of the parsed "url dictionaries". It looks like you would simply use "s" instead of "sig", but this just flat out doesn't work and you receive a blank page.

Screen Shot 2013-04-04 at 11 03 58 AM

@awojnowski commented on GitHub (Apr 4, 2013): I've put the HTML of the page in this Gist: https://gist.github.com/speedyapocalypse/5311690 Attached also is an example of one of the parsed "url dictionaries". It looks like you would simply use "s" instead of "sig", but this just flat out doesn't work and you receive a blank page. ![Screen Shot 2013-04-04 at 11 03 58 AM](https://f.cloud.github.com/assets/815376/339906/7b1d568a-9d41-11e2-9308-aca8d5515a3b.png)
Author
Owner

@tushar666 commented on GitHub (Sep 17, 2013):

Failed extracting video URL using block due to error:Error Domain=LBYouTubeExtractorErrorDomain Code=2 "Couldn't find the stream URL." UserInfo=0xa1b4940 {NSLocalizedDescription=Couldn't find the stream URL.}
2013-09-17 16:26:03.262 Go For[6699:c07] Failed loading video due to error:Error Domain=LBYouTubeExtractorErrorDomain Code=2 "Couldn't find the stream URL." UserInfo=0xa56e420 {NSLocalizedDescription=Couldn't find the stream URL.}

@tushar666 commented on GitHub (Sep 17, 2013): Failed extracting video URL using block due to error:Error Domain=LBYouTubeExtractorErrorDomain Code=2 "Couldn't find the stream URL." UserInfo=0xa1b4940 {NSLocalizedDescription=Couldn't find the stream URL.} 2013-09-17 16:26:03.262 Go For[6699:c07] Failed loading video due to error:Error Domain=LBYouTubeExtractorErrorDomain Code=2 "Couldn't find the stream URL." UserInfo=0xa56e420 {NSLocalizedDescription=Couldn't find the stream URL.}
Author
Owner

@jaimeMF commented on GitHub (Sep 17, 2013):

@tushar666 if you are using LBYouTubeView, you must report its errors to them :https://github.com/larcus94/LBYouTubeView, we can't do anything

@jaimeMF commented on GitHub (Sep 17, 2013): @tushar666 if you are using LBYouTubeView, you must report its errors to them :https://github.com/larcus94/LBYouTubeView, we can't do anything
Author
Owner

@make-github-pseudonymous-again commented on GitHub (Aug 23, 2014):

Still facing the same kind of problem, again only with a specific video

capture du 2014-08-24 04 07 23

@make-github-pseudonymous-again commented on GitHub (Aug 23, 2014): Still facing the same kind of problem, again only with a specific video ![capture du 2014-08-24 04 07 23](https://cloud.githubusercontent.com/assets/5165674/4022407/c52f3898-2b33-11e4-9da3-5b5d4686ed5f.png)
Author
Owner

@phihag commented on GitHub (Aug 23, 2014):

@aureooms Can you pass in the -v option and report a new issue? This issue pertains to an ancient version of youtube-dl which you do not seem to have.

@phihag commented on GitHub (Aug 23, 2014): @aureooms Can you pass in the `-v` option and [report a new issue](https://github.com/rg3/youtube-dl/issues/new)? This issue pertains to an ancient version of youtube-dl which you do not seem to have.
Author
Owner

@make-github-pseudonymous-again commented on GitHub (Aug 23, 2014):

@phihag https://github.com/rg3/youtube-dl/issues/3577

@make-github-pseudonymous-again commented on GitHub (Aug 23, 2014): @phihag https://github.com/rg3/youtube-dl/issues/3577
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-ytdl-org#301
No description provided.