Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rate limit does not work #21301

Closed
6 tasks done
Etherrrr opened this issue Jun 4, 2019 · 1 comment
Closed
6 tasks done

rate limit does not work #21301

Etherrrr opened this issue Jun 4, 2019 · 1 comment

Comments

@Etherrrr
Copy link

Etherrrr commented Jun 4, 2019

Checklist

  • I'm reporting a broken site support issue
  • I've verified that I'm running youtube-dl version 2019.05.20
  • I've checked that all provided URLs are alive and playable in a browser
  • I've checked that all URLs and arguments with special characters are properly quoted or escaped
  • I've searched the bugtracker for similar bug reports including closed ones
  • I've read bugs section in FAQ

Verbose log

[debug] System config: []
[debug] User config: []
[debug] Custom config: ['-i', '-o', '%(uploader_id)s[%(uploader)s]/%(upload_date)s - %(title)s - (%(duration)ss) [%(resolution)s] [%(id)s].%(ext)s', '--download-archive', 'list-archive.txt', '-a', 'channel.txt', '-r', '2000K', '--match-filter', 'duration > 5', '-f', 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best', '--prefer-ffmpeg', '--merge-output-format', 'mp4', '--add-metadata', '--write-description', '--write-thumbnail', '-v']
[debug] Command-line args: ['--config-location', 'config.conf']
[debug] Batch file urls: ['https://www.youtube.com/channel/UCpmC-ZTXaVa1LHs-cJtS9aQ/', 'https://www.youtube.com/channel/UCwBMSUVMvck6EaBD0f1tHsQ/', 'https://www.youtube.com/channel/UCY32QZ2pczK5kSroH5zpDnQ/', 'https://www.youtube.com/channel/UCBIR44irWpj1eTx0ZQFofHg/', 'https://www.youtube.com/channel/UCQ7KYc1-IMQ8_Uz7XTE5DWw/', 'https://www.youtube.com/channel/UCcmSo1FpQygmtT7GzHFRh8A/']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2019.05.20
[debug] Python version 3.5.3 (CPython) - Linux-4.9.0-8-amd64-x86_64-with-debian-buster-sid
[debug] exe versions: ffmpeg 4.1.1, ffprobe 4.1.1, rtmpdump 2.4
[debug] Proxy map: {}
[debug] Invoking downloader on 'https://r5---sn-3pm7sn7s.googlevideo.com/videoplayback?id=o-AEtip3mhqQmYwFvgZWVNUl1jVE32RDSqi3vrVg-eP_qm&aitags=133%2C134%2C135%2C136%2C160%2C242%2C243%2C244%2C247%2C278&itag=136&source=youtube&requiressl=yes&mm=31%2C29&mn=sn-3pm7sn7s%2Csn-3pm76n7r&ms=au%2Crdu&mv=m&pl=37&ei=krL2XM-5IsWUigbetqTYAQ&gcr=jp&initcwndbps=11747500&mime=video%2Fmp4&gir=yes&clen=492495620&dur=4040.733&lmt=1559626697913887&mt=1559671323&fvip=6&keepalive=yes&c=WEB&txp=7316222&ip=2400%3A8500%3A1302%3A909%3A150%3A95%3A210%3A37&ipbits=0&expire=1559693042&sparams=ip%2Cipbits%2Cexpire%2Cid%2Caitags%2Csource%2Crequiressl%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Cei%2Cgcr%2Cinitcwndbps%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&signature=E5D29E3733821E74CCAF31F5300F7127028D9B02.431085E9195DD6A5B5E4D4ECC6DE78A17D4D7BA6&key=yt8&ratebypass=yes'
[download] Destination: UCwBMSUVMvck6EaBD0f1tHsQ[綴目日傘]/20190603 - 【急遽】Nostalgic Train  ノスタルジックトレイン【綴目日傘 新人Vtuber】 - (4041s) [1280x720] [OXdMqwde1xQ].f136.mp4
[download]   2.8% of 469.68MiB at  22.89MiB/s ETA 02:37

Description

I've limited rate to 2M with -r 2000K but it seems not work. The speed will keep about 2M/s for a while and suddenly increase to 20M/s so the network usage graph looks like a pulse graphic. Can this be fixed?

@dstftw
Copy link
Collaborator

dstftw commented Jun 4, 2019

You can't get ideally flat graph since the whole principle of rate limiting is to sleep between downloading blocks of data. The bigger a block the more efficiently data is processed and the more spikes graph has.
What you can do is to use fixed buffer block size.

--buffer-size SIZE               Size of download buffer (e.g. 1024 or 16K)
                                 (default is 1024)
--no-resize-buffer               Do not automatically adjust the buffer
                                 size. By default, the buffer size is
                                 automatically resized from an initial value
                                 of SIZE.

Obviously this will result in less efficient processing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants