39

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.

Vikrant
  • 4,920
  • 17
  • 48
  • 72
Tejus Prasad
  • 6,322
  • 7
  • 47
  • 75

2 Answers2

49

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.

Tapan Prakash
  • 773
  • 8
  • 7
21

I hope my answer is not too late, but in case of those that might still need it,

Download resume :

the -c, --continue Force resume of partially downloaded files. By default, youtube-dl will resume downloads if possible.

youtube-dl  -c  www.someurl.com

Limit download speed:

the -r, --rate-limit LIMIT Maximum download rate in bytes per second (e.g. 50K or 4.2M)

youtube-dl  --rate-limit 20k  www.someurl.com

OR

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

SOURCE: https://github.com/rg3/youtube-dl

femotizo
  • 1,135
  • 2
  • 12
  • 18