metube
metube copied to clipboard
Allow rate limiting
YT-DLP doesn't support it directly, but the ratelimit ability is used in the downloader (https://github.com/yt-dlp/yt-dlp/blob/master/yt_dlp/YoutubeDL.py#L176 (line 466))
Even better would be a little scheduler where you can rate limit during, say, working hours, but late night, have it be at a different limit
You can set the option via the YTDL_OPTIONS environment variable, see the README. About the scheduler, I'm not sure how common the use case it. Leaving it here for future feedback.
Not directly relevant, but I'm leaving how to limit the download speed here. I believe it would be useful to add this as an example in the Configuration via environment variables section as I struggled for a while with all the permutations.
Config Type: Variable
Name: YTDL_OPTIONS
Key: YTDL_OPTIONS
Value: {"ratelimit": 3000000}
Speed is in bytes/s so 3000000B/s = 3.00MB/s
A crude solution for the scheduling would be having two user scripts, one composed for day use with a low ratelimit, and another for night use with a higher ratelimit. Then it's a case of scheduling these to run at your desired times.