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.
Any ideas on how to preload youtube-dl into RAM to save on disk i/o? #15870
Comments
|
Just pass this long queue of videos as list of URLs to single youtube-dl instance so that modules will be loaded only once. Alternatively you can implement a simple daemon like https://github.com/jaimeMF/youtube-dl-api-server. |
|
@dstftw |
Make sure you are using the latest version
Before submitting an issue make sure you have:
What is the purpose of your issue?
Description of your issue, suggested solution and other information
When running multiple youtube-dl instances with a long queue of video, I'm noticing a lot of disk I/O and high CPU usage when using the
-Jargument to get JSON for a youtube video.I'm pretty sure it's because of all the modules that have to be loaded every time the script runs. I'm thinking of ways to wrap youtube-dl in another python script that initializes it only once (and stores it all in RAM so when it needs to run again everything is already preloaded and ready to go). I feel like this could also speed up youtube-dl execution time greatly.
Does anyone have any suggestions on linux tools/commands or other scripts that can help me do this? I would hate to be re-inventing the wheel if I didn't have to😋