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 + aria2c, aria2c cannot use proxy. #23730

Closed
6 tasks
luoyanghero opened this issue Jan 14, 2020 · 3 comments
Closed
6 tasks

youtube-dl + aria2c, aria2c cannot use proxy. #23730

luoyanghero opened this issue Jan 14, 2020 · 3 comments

Comments

@luoyanghero
Copy link

Checklist

  • I'm reporting a broken site support issue
  • I've verified that I'm running youtube-dl version 2020.01.01
  • I've checked that all provided URLs are alive and playable in a browser
  • I've checked that all URLs and arguments with special characters are properly quoted or escaped
  • I've searched the bugtracker for similar bug reports including closed ones
  • I've read bugs section in FAQ

Verbose log

###########
F:\zluoy_files\media_download_notes>youtube-dl.exe https://www.youtube.com/watch?v=NFx3V3j8BCI -f 137 -v --proxy socks5://127.0.0.1:1080/  --external-downloader aria2c.exe --external-downloader-args "-j 8 -s 8 -x 8 -k 5M --all-proxy=127.0.0.1:8118 -D --console-log-level=debug"
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['https://www.youtube.com/watch?v=NFx3V3j8BCI', '-f', '137', '-v', '--proxy', 'socks5://127.0.0.1:1080/', '--external-downloader', 'aria2c.exe', '--external-downloader-args', '-j 8 -s 8 -x 8 -k 5M --all-proxy=127.0.0.1:8118 -D --console-log-level=debug']
[debug] Encodings: locale cp936, fs mbcs, out cp936, pref cp936
[debug] youtube-dl version 2020.01.01
[debug] Python version 3.4.4 (CPython) - Windows-7-6.1.7601-SP1
[debug] exe versions: ffmpeg N-64195-g723550d
[debug] Proxy map: {'https': 'socks5://127.0.0.1:1080/', 'http': 'socks5://127.0.0.1:1080/'}
[youtube] NFx3V3j8BCI: Downloading webpage
[youtube] NFx3V3j8BCI: Downloading video info webpage
[debug] Invoking downloader on 'https://r3---sn-ab5szn7z.googlevideo.com/videoplayback?expire=1578990123&ei=yyUdXvTwMJCEhwaBgb-oAw&ip=104.168.96.157&id=o-AEiYUxmmjUYKvCPk37JpXfZAdB7mzyzVgYooicZ5IK56&itag=137&aitags=133%2C134%2C135%2C136%2C137%2C160%2C242%2C243%2C244%2C247%2C248%2C278&source=youtube&requiressl=yes&mm=31%2C26&mn=sn-ab5szn7z%2Csn-vgqskne6&ms=au%2Conr&mv=m&mvi=2&pl=24&gcr=us&initcwndbps=1706250&vprv=1&mime=video%2Fmp4&gir=yes&clen=966704541&dur=2968.499&lmt=1541062637930998&mt=1578968442&fvip=3&keepalive=yes&fexp=23842630%2C23860862&beids=9466585&c=WEB&txp=5432432&sparams=expire%2Cei%2Cip%2Cid%2Caitags%2Csource%2Crequiressl%2Cgcr%2Cvprv%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=ALgxI2wwRQIhAPYzA6xi1pahfGPE8fPOEUFcjjtvVo5xqwA_L_UXur0PAiAURAcnVtdx_-SdKkc-t1bjd4Pre6p449x7hw6YliNgLw%3D%3D&lsparams=mm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AHylml4wRQIhAP3KoEHehkeU_rKy5gxihKnj2fZTNM2NMf5l5rwO1tprAiA49BOkFhUWS04eGni3KddHehcV_42c9dL5xVUCsIGQdg%3D%3D&ratebypass=yes'
[download] Destination: 《西游记》第11集 Journey to the West EP11 【超清】-NFx3V3j8BCI.mp4
[debug] aria2c.exe command line: aria2c.exe -c -j 8 -s 8 -x 8 -k 5M "--all-proxy=127.0.0.1:8118" -D "--console-log-level=debug" --out "《西游记》第11集 Journey to the West EP11 【超清】-NFx3V3j8BCI.mp4.part" --header "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3710.2 Safari/537.36" --header "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" --header "Accept-Encoding: gzip, deflate" --header "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7" --header "Accept-Language: en-us,en;q=0.5" --all-proxy "socks5://127.0.0.1:1080/" "--check-certificate=true" "--remote-time=true" -- "https://r3---sn-ab5szn7z.googlevideo.com/videoplayback?expire=1578990123&ei=yyUdXvTwMJCEhwaBgb-oAw&ip=104.168.96.157&id=o-AEiYUxmmjUYKvCPk37JpXfZAdB7mzyzVgYooicZ5IK56&itag=137&aitags=133%2C134%2C135%2C136%2C137%2C160%2C242%2C243%2C244%2C247%2C248%2C278&source=youtube&requiressl=yes&mm=31%2C26&mn=sn-ab5szn7z%2Csn-vgqskne6&ms=au%2Conr&mv
=m&mvi=2&pl=24&gcr=us&initcwndbps=1706250&vprv=1&mime=video%2Fmp4&gir=yes&clen=966704541&dur=2968.499&lmt=1541062637930998&mt=1578968442&fvip=3&keepalive=yes&fexp=23842630%2C23860862&beids=9466585&c=WEB&txp=5432432&sparams=expire%2Cei%2Cip%2Cid%2Caitags%2Csource%2Crequiressl%2Cgcr%2Cvprv%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=ALgxI2wwRQIhAPYzA6xi1pahfGPE8fPOEUFcjjtvVo5xqwA_L_UXur0PAiAURAcnVtdx_-SdKkc-t1bjd4Pre6p449x7hw6YliNgLw%3D%3D&lsparams=mm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AHylml4wRQIhAP3KoEHehkeU_rKy5gxihKnj2fZTNM2NMf5l5rwO1tprAiA49BOkFhUWS04eGni3KddHehcV_42c9dL5xVUCsIGQdg%3D%3D&ratebypass=yes"
Exception: [AbstractOptionHandler.cc:69] errorCode=28 We encountered a problem while processing the option '--all-proxy'.
  -> [OptionHandlerImpl.cc:520] errorCode=1 unrecognized proxy format
Usage:
 --all-proxy=PROXY            Use a proxy server for all protocols. To override
                              a previously defined proxy, use "".
                              You also can override this setting and specify a
                              proxy server for a particular protocol using the
                              --http-proxy, --https-proxy and --ftp-proxy
                              options.
                              This affects all downloads.

                              Possible Values: [http://][USER:PASSWORD@]HOST[:PORT]
                              Tags: #http, #https, #ftp



ERROR: aria2c exited with code 28
  File "__main__.py", line 19, in <module>
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpj4acy7ln\build\youtube_dl\__init__.py", line 474, in main
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpj4acy7ln\build\youtube_dl\__init__.py", line 464, in _real_main
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpj4acy7ln\build\youtube_dl\YoutubeDL.py", line 2018, in download
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpj4acy7ln\build\youtube_dl\YoutubeDL.py", line 807, in extract_info
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpj4acy7ln\build\youtube_dl\YoutubeDL.py", line 862, in process_ie_result
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpj4acy7ln\build\youtube_dl\YoutubeDL.py", line 1643, in process_video_result
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpj4acy7ln\build\youtube_dl\YoutubeDL.py", line 1925, in process_info
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpj4acy7ln\build\youtube_dl\YoutubeDL.py", line 1864, in dl
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpj4acy7ln\build\youtube_dl\downloader\common.py", line 366, in download
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpj4acy7ln\build\youtube_dl\downloader\external.py", line 64, in real_download
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpj4acy7ln\build\youtube_dl\downloader\common.py", line 165, in report_error
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpj4acy7ln\build\youtube_dl\YoutubeDL.py", line 624, in report_error
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpj4acy7ln\build\youtube_dl\YoutubeDL.py", line 586, in trouble


F:\zluoy_files\media_download_notes>pause
请按任意键继续. . .

###########
F:\zluoy_files\media_download_notes>youtube-dl.exe https://www.youtube.com/watch?v=NFx3V3j8BCI -f 137 -v --proxy socks5://127.0.0.1:1080/
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['https://www.youtube.com/watch?v=NFx3V3j8BCI', '-f', '137', '-v', '--proxy', 'socks5://127.0.0.1:1080/']
[debug] Encodings: locale cp936, fs mbcs, out cp936, pref cp936
[debug] youtube-dl version 2020.01.01
[debug] Python version 3.4.4 (CPython) - Windows-7-6.1.7601-SP1
[debug] exe versions: ffmpeg N-64195-g723550d
[debug] Proxy map: {'https': 'socks5://127.0.0.1:1080/', 'http': 'socks5://127.0.0.1:1080/'}
[youtube] NFx3V3j8BCI: Downloading webpage
[youtube] NFx3V3j8BCI: Downloading video info webpage
[debug] Invoking downloader on 'https://r3---sn-ab5szn7z.googlevideo.com/videoplayback?expire=1578990312&ei=iCYdXrObIYGc8wTnhKKwCQ&ip=104.168.96.157&id=o-ABFrUidHtivm5s-svRsEOXPc46BmLR3zXwWgp8wRJIlE&itag=137&aitags=133%2C134%2C135%2C136%2C137%2C160%2C242%2C243%2C244%2C247%2C248%2C278&source=youtube&requiressl=yes&mm=31%2C26&mn=sn-ab5szn7z%2Csn-vgqsrne6&ms=au%2Conr&mv=m&mvi=2&pl=24&gcr=us&initcwndbps=472500&vprv=1&mime=video%2Fmp4&gir=yes&clen=966704541&dur=2968.499&lmt=1541062637930998&mt=1578968620&fvip=3&keepalive=yes&fexp=23842630&c=WEB&txp=5432432&sparams=expire%2Cei%2Cip%2Cid%2Caitags%2Csource%2Crequiressl%2Cgcr%2Cvprv%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=ALgxI2wwRgIhAPlpr7V0b4YwZgsZdS1k7s5KL-UdhE7BDB2USGIGrArbAiEA1a3ZZZBx6WksMAzYbkAmlz_9Cmx0AKJfhzNdEfUYVn4%3D&lsparams=mm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AHylml4wRAIgaAwPz2H8dF5v2L8y2cgJrkDMg_Ny1dib64n_xDU_mYcCIC8HFK4BIGFjkIqYc-QeCAoN7rh7dIGn6mJ1yNSz0zOG&ratebypass=yes'
[download] Resuming download at byte 22500434
[download] Destination: 《西游记》第11集 Journey to the West EP11 【超清】-NFx3V3j8BCI.mp4
[download]   3.4% of 921.92MiB at 25.35KiB/s ETA 09:59:25

###########
F:\zluoy_files\media_download_notes>aria2c.exe https://www.youtube.com/watch?v=NFx3V3j8BCI -j 8 -s 8 -x 8 -k 5M --all-proxy=127.0.0.1:8118 -D

01/14 09:30:51 [NOTICE] Downloading 1 item(s)
[#7559f0 42KiB/0B CN:1 DL:58KiB]
01/14 09:30:54 [NOTICE] Download complete: F:/zluoy_files/media_download_notes/watch

Download Results:
gid   |stat|avg speed  |path/URI
======+====+===========+=======================================================
7559f0|OK  |   104KiB/s|F:/zluoy_files/media_download_notes/watch

Status Legend:
(OK):download completed.

F:\zluoy_files\media_download_notes>pause
请按任意键继续. . .


Description

I am in China, I want to download a Classic TV series from youtube. It needs a proxy. But the speed is too slow, I want to use aria2c to speed up by multithreading. aria2c proxy I use Privoxy change socks5 to http.
I use youtube-dl with proxy to download, it is OK.
I use aria2c with proxy to download, it is OK.
I use youtube-dl + aria2c with proxy to download, it is BAD.
I try to use youtube-dl enable debug info, aria2c enable debug info. Youtube-dl can print the debug info, but aria2c not show debug info.

aria2 version 1.35.0
youtube-dl version 2020.01.01

@dstftw
Copy link
Collaborator

dstftw commented Jan 14, 2020

aria2c does not support socks5 proxies.

@luoyanghero
Copy link
Author

@dstftw I have use Privoxy change socks5 to http. My socks5 port is 1080, my http port is 8118. The above log, I have tested aria2c use 8118 port is ok.

@dstftw
Copy link
Collaborator

dstftw commented Jan 14, 2020

Do not pass any proxy to aria2c on your own, this is already done by youtube-dl. Pass http proxy to youtube-dl.

@ytdl-org ytdl-org locked and limited conversation to collaborators Jan 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants