Limit download speed to not kill internet
This commit is contained in:
@@ -13,12 +13,12 @@ var dl = ytdlp.New().
|
||||
// FormatSort("bestvideo[ext=mp4]+bestaudio[ext=m4a]").
|
||||
FormatSort("res,ext:mp4:m4a").
|
||||
Output("C:/Users/Administrator/ytdlpVideos/%(uploader)s/%(title)s.%(ext)s").
|
||||
LimitRate("50M").
|
||||
LimitRate("5M").
|
||||
// HTTPChunkSize("20M").
|
||||
MarkWatched().
|
||||
SponsorblockMark("all").
|
||||
RecodeVideo("mp4").
|
||||
ConcurrentFragments(4)
|
||||
ConcurrentFragments(6)
|
||||
|
||||
// func Download(event PBEvent, status chan error) {
|
||||
// _, err := dl.Run(context.TODO(), event.Record.Link)
|
||||
@@ -40,4 +40,5 @@ func DownloadURL(url string, status chan error) {
|
||||
}
|
||||
|
||||
log.Printf("Downloaded %s", url)
|
||||
close(status)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user