Search code examples
shellubuntuvideoyoutubeyoutube-dl

youtube-dl rate limit download speed and auto resume download


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.


Solution

  • 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.