Limit download speed to not kill internet

This commit is contained in:
2024-06-21 22:23:02 +02:00
parent be38b3d602
commit 089e7f637f
2 changed files with 12 additions and 4 deletions

View File

@@ -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)
}