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-dl encrypted signatures stuck #1124

Closed
vanilla38 opened this issue Jul 25, 2013 · 7 comments
Closed

Youtube-dl encrypted signatures stuck #1124

vanilla38 opened this issue Jul 25, 2013 · 7 comments

Comments

@vanilla38
Copy link

@vanilla38 vanilla38 commented Jul 25, 2013

Hi, I just noticed that sometimes when Vevo encrypted signatures are decrypted by Youtube-dl, program is stuck on "signatures detected, length: X" then after like 30 seconds, an UnavailableError appear and video is not downloaded.
After some retries, it will be downloaded correctly, what I ask for is a way to prevent this 30 second wait by a decrypt timeout or something like that.

Does someone got any clue on how to implement this ? thanks.

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Jul 25, 2013

I think that the problem is not in the signatures decryption, between the signature message and the error there are more steps. Probably the most time consuming, depending on your network, is when it stablishes the connection for downloading the video.

@vanilla38
Copy link
Author

@vanilla38 vanilla38 commented Jul 25, 2013

I got a 1GBPS optical fiber connection from OVH, I usually download videos @ 15MB/S, I though it was signatures related since there is no else message from this to error, so as i said i need to find out a way to put a timeout on this stucking step.

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Jul 25, 2013

Well, the problem may be in other part but the signatures decryption is not that slow (each test decrypts 1 signature):

$python test/test_youtube_sig.py -v
test_81 (__main__.TestYoutubeSig) ... ok
test_82 (__main__.TestYoutubeSig) ... ok
test_83 (__main__.TestYoutubeSig) ... ok
test_84 (__main__.TestYoutubeSig) ... ok
test_85 (__main__.TestYoutubeSig) ... ok
test_86 (__main__.TestYoutubeSig) ... ok
test_87 (__main__.TestYoutubeSig) ... ok
test_88 (__main__.TestYoutubeSig) ... ok
test_90 (__main__.TestYoutubeSig) ... ok
test_92 (__main__.TestYoutubeSig) ... ok

----------------------------------------------------------------------
Ran 10 tests in 0.001s

OK

I don't have a connection as fast as yours but I haven't experience that problem (and I have been downloading lots of times videos with signatures), it's nearly instantaneous.

@vanilla38
Copy link
Author

@vanilla38 vanilla38 commented Jul 25, 2013

hum maybe i forgot something, i'm using IPV6

@vanilla38
Copy link
Author

@vanilla38 vanilla38 commented Jul 25, 2013

I will try with only IPV4 then come back to you, however, if you have an idea or a clue on how to insert a timeout in a youtube-dl python function it will be great. Thanks for your answers.

@phihag
Copy link
Contributor

@phihag phihag commented Jul 25, 2013

Look for setdefaulttimeout in youtube_dl/__init__.py. We should probably add a new message to clarify that we're not actually decrypting the signature, but attempting to reach the server. Note that it doesn't matter whether you connect via IPv4 or IPv6 (although you could certainly get unlucky either way and get an unreachable host).

@vanilla38
Copy link
Author

@vanilla38 vanilla38 commented Jul 25, 2013

I'm using on custom feature to bind an ip address to youtube-dl and i think it has more chance to appear when i bind an IPV6 address to the program, if you want to see this custom code => check Issue #1020

@dstftw dstftw closed this Jun 12, 2016
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
4 participants
You can’t perform that action at this time.