Youtube-dl encrypted signatures stuck #840

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

Originally created by @vanilla38 on GitHub (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.

Originally created by @vanilla38 on GitHub (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.
Author
Owner

@jaimeMF commented on GitHub (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.

@jaimeMF commented on GitHub (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.
Author
Owner

@vanilla38 commented on GitHub (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.

@vanilla38 commented on GitHub (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.
Author
Owner

@jaimeMF commented on GitHub (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.

@jaimeMF commented on GitHub (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.
Author
Owner

@vanilla38 commented on GitHub (Jul 25, 2013):

hum maybe i forgot something, i'm using IPV6

@vanilla38 commented on GitHub (Jul 25, 2013): hum maybe i forgot something, i'm using IPV6
Author
Owner

@vanilla38 commented on GitHub (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.

@vanilla38 commented on GitHub (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.
Author
Owner

@phihag commented on GitHub (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).

@phihag commented on GitHub (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).
Author
Owner

@vanilla38 commented on GitHub (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

@vanilla38 commented on GitHub (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
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#840
No description provided.