youtube-dl rate limit download speed and auto resume download

Tejus Prasad picture Tejus Prasad · May 2, 2015 · Viewed 24.4k times · Source

I am using a shell script for video conversion.

this is the shell script

#!/bin/bash
#downloading video
youtube-dl www.someurl.com
#video conversion operations

Due to bandwidth issues, I have to lower the download speed. how do I limit the speed of video that is being downloaded from youtube-dl?
and how to make a youtube-dl auto-resume when my laptop wakes up from sleep? youtube-dl stops download when laptop sleeps and doesn't auto restart downloading even though my laptop is connected to the internet.

Answer

Tapan Prakash picture Tapan Prakash · May 2, 2015

You can use -r option to limit the speed. For example

youtube-dl -r 20K www.someurl.com

This will limit the speed to 20K. Note that speed is specified in bytes per second.