Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
[Feature Request] Allow use of an external downloader for getting video info/subtitles/thumbnails/etc. #20398
Comments
|
Does any of the supported external downloaders even supports connection caching between executions? I doubt that. Also such TCP connection reuse may bring observable benefit only when there are lots sequential connections to the same host that is not usually the case for downloading non-media data. Times taking external downloader process to start also should be counted and may easily outperform any speedup of connection reuse. Needless to say this will unnecessarily complicate code. |
|
The only case where this would be (really) useful is for getting all subtitle languages, on a platform like YouTube this can easily reach the hundreds (YouTube supports around 107 languages). On the network I'm on it takes 2 seconds per subtitle to download (high latency high bandwidth). it only takes 0.219s to start python3 and import urllib3. So if I download all subtitle languages it's 214 seconds of total download time vs 23.433 seconds of starting overhead. If you are just downloading a video or two this is barely anything, but on a big playlist or a whole channel it adds up. The two ways this can be implemented are modifying |
Not between executions, but during the same execution I know |
|
Update: I found out that it was the DNS server being slow that caused the slowness in downloading. |
Please follow the guide below
xinto all the boxes [ ] relevant to your issue (like this:[x])Make sure you are using the latest version: run
youtube-dl --versionand ensure your version is 2019.03.18. If it's not, read this FAQ entry and update. Issues with outdated version will be rejected.Before submitting an issue make sure you have:
What is the purpose of your issue?
Description of your issue, suggested solution and other information
Explanation of your issue in arbitrary form goes here. Please make sure the description is worded well enough to be understood. Provide as much context and examples as possible.
If work on your issue requires account credentials please provide them or explain how one can obtain them.
Downloading all of the subtitles opens a connection, downloads the info, closes the connection, and repeats. On certain networks (mostly just high latency ones) this causes it to go slower than it otherwise would because it's opening all those connections. I propose that youtube-dl uses the
--external-downloadercommand line argument if given to download videos instead of the internal downloader. This would allow the use of an external downloader that caches the connections to bypass a lot of the latency.