You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* IPv6 Rotating ^-^
* linter got mad at missing semicolon nice
* Fixing format
Fixing the format of files so eslint does not throw any errors.
* adding colon
* added test for IPv6 Block
* Forgot to lint
* Info test and download test improvement
* use net instead if .includes
* remove chunking-related stuff
* Update lib/util.js
Co-authored-by: fent <fentbox@gmail.com>
* improve tests, fix the check in util
* add test for invalid subnet
* place done's on separate lines
* fix typo in readme
* fixing README.md
* fixed mistake
* fixed other mistake
* Update README.md
Co-authored-by: fent <fentbox@gmail.com>
* Update README.md
Co-authored-by: fent <fentbox@gmail.com>
* fix conflicts
* i forgot about this change
* Fix undefined testInfo
* ignoring invalid this
* fix info test
* fix million's await
* remove useless part
* Adding requested test
* remove unrelated dependency
* remove unused option
* update readme
* lint ipv6 example
* remove ip6 dependencie
* improve test coverage
* (es)lint
* Update lib/utils.js
Co-authored-by: Voltrex <mohammadkeyvanzade94@gmail.com>
Co-authored-by: MILLION <apaolini900o@outlook.com>
Co-authored-by: Million900o <apaolini900o@gmail.com>
Co-authored-by: fent <fentbox@gmail.com>
Co-authored-by: MILLION <30964205+Million900o@users.noreply.github.com>
Co-authored-by: TimeForANinja <t.kutscha@yahoo.de>
Co-authored-by: TimeForANinja <TimeForANinja@users.noreply.github.com>
Co-authored-by: Voltrex <mohammadkeyvanzade94@gmail.com>
Copy file name to clipboardExpand all lines: README.md
+19Lines changed: 19 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,6 +36,7 @@ Attempts to download a video from the given url. Returns a [readable stream](htt
36
36
*`liveBuffer` - How much time buffer to use for live videos in milliseconds. Default is `20000`.
37
37
*`highWaterMark` - How much of the video download to buffer into memory. See [node's docs](https://nodejs.org/api/stream.html#stream_constructor_new_stream_writable_options) for more. Defaults to 512KB.
38
38
*`dlChunkSize` - When the chosen format is video only or audio only, the download is separated into multiple chunks to avoid throttling. This option specifies the size of each chunk in bytes. Setting it to 0 disables chunking. Defaults to 10MB.
39
+
*`IPv6Block` - IPv6 block to rotate through, an alternative to using a proxy. [Read more](#How-does-using-an-IPv6-block-help?). Defaults to `undefined`.
@@ -156,6 +157,24 @@ ytdl cannot download videos that fall into the following
156
157
157
158
Generated download links are valid for 6 hours, and may only be downloadable from the same IP address.
158
159
160
+
### Ratelimits
161
+
When doing to many requests YouTube might block. This will result in your requests getting denied with HTTP-StatusCode 429. The following Steps might help you:
162
+
* Update ytdl-core to the latest version
163
+
* Use proxies (you can find an example [here](https://github.com/fent/node-ytdl-core/blob/master/example/proxy.js))
164
+
* Extend on the Proxy Idea by rotating (IPv6-)Addresses
165
+
* read [this](#How-does-using-an-IPv6-block-help?) for more information about this
166
+
* Use cookies (you can find an example [here](https://github.com/fent/node-ytdl-core/blob/master/example/cookies.js))
167
+
* for this to take effect you have to FIRST wait for the current ratelimit to expire
168
+
* Wait it out (it usually goes away within a few days)
169
+
170
+
#### How does using an IPv6 block help?
171
+
172
+
For request-intensive tasks it might be useful to spread your requests across multiple source IP-Addresses. Changing the source IP that you use is similar to using a proxy, except without bypassing restrictions such as a region lock. More IP-Addresses result in less requests per IP and therefor increase your ratelimit. Since IPv4 Addresses are a limited Resource we advise to use IPv6.
173
+
174
+
Using an IPv6 block is essentially having millions of IPv6 addresses at your request. In a /64 IPv6 block (which is usually the Block given to a single Household), there are 18,446,744,073,709,551,616 unique IPv6 addresses. This would allow you to make each request with a different IPv6 address.
175
+
176
+
Even though using an IP-Block does help against ratelimits it requires you to setup your host system to accept http traffic from every message in an IP-Block. We can not help you with the setup for any specific host / hosting provider but searching the internet most likely can.
177
+
159
178
## Handling Separate Streams
160
179
161
180
Typically 1080p or better videos do not have audio encoded with it. The audio must be downloaded separately and merged via an encoding library. `ffmpeg` is the most widely used tool, with many [Node.js modules available](https://www.npmjs.com/search?q=ffmpeg). Use the `format` objects returned from `ytdl.getInfo` to download specific streams to combine to fit your needs. Look at [example/ffmpeg.js](example/ffmpeg.js) for an example on doing this.
0 commit comments