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

Timeout for broken Internet is 540 seconds and cannot be adjusted on Windows #13907

Open
uruiamme opened this issue Aug 13, 2017 · 0 comments
Open

Comments

@uruiamme
Copy link

@uruiamme uruiamme commented Aug 13, 2017

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 this: [x])
  • Use the Preview tab to see what your issue will actually look like

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2017.08.13. 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 2017.08.13

Before submitting an issue make sure you have:

  • At least skimmed through the README, most notably the 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 the -v flag to your command line you run youtube-dl with (youtube-dl -v <your command line>), copy the whole output and insert it here. It should look similar to one below (replace it with your log inserted between triple ```):

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--prefer-ffmpeg', '--ffmpeg-location', 'D:\\MEDIA\\Videos\\YouTube\\Download\\ffmpeg\\bin', '--restrict-filenames', '--embed-thumbnail', '--add-metadata', '--xattrs', '-f', '137+140', '-v', '-i', 'Lf42yiZP3og']
[debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252
[debug] youtube-dl version 2017.08.13
[debug] Python version 3.4.4 - Windows-10-10.0.10586
[debug] exe versions: ffmpeg N-81831-g97e7f03, ffprobe N-81831-g97e7f03, rtmpdump 2.4
[debug] Proxy map: {}
[youtube] Lf42yiZP3og: Downloading webpage
[youtube] Lf42yiZP3og: Downloading video info webpage
[youtube] Lf42yiZP3og: Extracting video information
[youtube] Lf42yiZP3og: Downloading MPD manifest
[youtube] Lf42yiZP3og: Downloading thumbnail ...
[youtube] Lf42yiZP3og: Writing thumbnail to: Chinese_Spouting_Bowl_in_Slow_Motion_-_The_Slow_Mo_Guys-Lf42yiZP3og.jpg
[debug] Invoking downloader on 'https://r5---sn-q4fl6nlz.googlevideo.com/videoplayback?id=2dfe36ca264fde88&itag=137&source=youtube&requiressl=yes&ms=au&mv=m&mn=sn-q4fl6nlz&pl=19&mm=31&ei=IcmPWeHtC8S0Dcy8qJAI&initcwndbps=5591250&ratebypass=yes&mime=video/mp4&gir=yes&clen=123940748&lmt=1502444727096763&dur=310.680&mt=1502595279&signature=5B993CACE4C8FAF823EDF579E628D9A5B71CF643.86D430A0FC677BD19847C73927D96ADBCA52F33F&key=dg_yt0&ip=75.245.60.104&ipbits=0&expire=1502616961&sparams=ip,ipbits,expire,id,itag,source,requiressl,ms,mv,mn,pl,mm,ei,initcwndbps,ratebypass,mime,gir,clen,lmt,dur'
[download] Destination: Chinese_Spouting_Bowl_in_Slow_Motion_-_The_Slow_Mo_Guys-Lf42yiZP3og.f137.mp4
[download]  15.6% of 118.20MiB at 54.15KiB/s ETA 31:25   ERROR: unable to download video data: The read operation timed out
Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpc3a66tbr\build\youtube_dl\YoutubeDL.py", line 1857, in process_info
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpc3a66tbr\build\youtube_dl\YoutubeDL.py", line 1805, in dl
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpc3a66tbr\build\youtube_dl\downloader\common.py", line 361, in download
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpc3a66tbr\build\youtube_dl\downloader\http.py", line 165, in real_download
  File "C:\Python\Python34\lib\http\client.py", line 537, in read
  File "C:\Python\Python34\lib\http\client.py", line 576, in readinto
  File "C:\Python\Python34\lib\socket.py", line 378, in readinto
  File "C:\Python\Python34\lib\ssl.py", line 748, in recv_into
  File "C:\Python\Python34\lib\ssl.py", line 620, in read
socket.timeout: The read operation timed out

Description of your issue, suggested solution and other information

There are numerous times in which my Internet connection drops and youtube-dl is left with a long timeout. There does seem to be a setting for --socket-timeout SECONDS which defaults to 20 seconds. However, there seems to be a (much longer) 540 second timeout that usually occurs in my case. Windows 10. I believe the issue may have to do with Python detecting the socket error and timing out ... at ... long ... length, rather than in a more timely fashion (say, 30 to 60 seconds.)

The symptoms are a locked % complete, a stuck KiB/s and ETA time for what seems to be roughly 9 minutes. I have been known to kill the task in Task Manager, but this should be done on the "Details" tab of Windows 10. Restarting the same commandline will usually pick up where the last instance of youtube-dl left off.

To reiterate... there is a long delay between the "15.6% of 118.20MiB at 54.15KiB/s ETA 31:25" and the "ERROR" appearing, with nothing to indicate activity during this time. In the interim, my Internet connection has normally been re-established and so the old (SSL?) socket will never be restored.

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
1 participant
You can’t perform that action at this time.