Gathering detailed insights and metrics for @ybd-project/ytdl-core
Gathering detailed insights and metrics for @ybd-project/ytdl-core
Gathering detailed insights and metrics for @ybd-project/ytdl-core
Gathering detailed insights and metrics for @ybd-project/ytdl-core
Fast and secure YouTube downloader for JavaScript and TypeScript
npm install @ybd-project/ytdl-core
Typescript
Module System
Min. Node Version
Node Version
NPM Version
63.2
Supply Chain
97
Quality
94.6
Maintenance
100
Vulnerability
98.9
License
TypeScript (96.91%)
JavaScript (2.57%)
Batchfile (0.52%)
Total Downloads
16,346
Last Day
62
Last Week
636
Last Month
2,763
Last Year
16,346
29 Stars
1,327 Commits
5 Forks
5 Watching
2 Branches
1 Contributors
Latest Version
6.0.8
Package Id
@ybd-project/ytdl-core@6.0.8
Unpacked Size
4.50 MB
Size
1.10 MB
File Count
315
NPM Version
10.9.0
Node Version
22.8.0
Publised On
13 Nov 2024
Cumulative downloads
Total Downloads
Last day
-16.2%
62
Compared to previous day
Last week
-2.6%
636
Compared to previous week
Last month
-16.6%
2,763
Compared to previous month
Last year
0%
16,346
Compared to previous year
YBD Project fork of ytdl-core
. This fork is dedicated to developing a YouTube downloader that is fast, stable, and takes into account various use cases, with reference to LuanRT/YouTube.js and yt-dlp.
[!NOTE] If you are looking for v5 documentation for
@ybd-project/ytdl-core
, please click here.
There are no announcements at this time.
To use @ybd-project/ytdl-core
without problems, use Node.js 16 or higher. (Recommended is Node.js 18 or higher.)
[!IMPORTANT] Use with Node.js 16 is not recommended, but will be supported as much as possible.
[!IMPORTANT]
@ybd-project/ytdl-core
has not been tested in non-Node.js environments such as Deno. If you need ytdl-core optimized for these environments, please create an issue.
As usual, when using Node.js, as noted in the prerequisites, v16 or higher will work fine. If you have an example that does not work with 16 or higher versions, please create an issue.
When using a browser, the latest version is preferred due to the API used. However, when operating a website or other site, it is unknown which version and browser the client will use, so the following are the main browsers (Chrome, Edge, Firefox, Brave, Opera, Safari) that are currently confirmed to work.
Live demo used for testing: ytdlcore.static.jp
Browser Name | Supported Versions |
---|---|
Google Chrome | v76 - latest |
Microsoft Edge | v80 - latest |
Mozilla FireFox | v78 - latest |
Apple Safari | v14 - latest |
Brave | v1 - latest |
Opera | v63 - latest |
(Tested with BrowserStack)
We have confirmed that ytdl-core
for serverless functions works properly in the following environment.
[!TIP] We recommend deploying to Cloudflare Workers because of its simplicity and lower cost compared to other platforms.
Service Name | Remarks |
---|---|
Cloudflare Workers | With nodejs_compat compatibility flag |
Vercel Functions | Streaming doesn't work. |
1npm install @ybd-project/ytdl-core@latest
Make sure you're installing the latest version of @ybd-project/ytdl-core
to keep up with the latest fixes.
For details API documentation, see the Wiki.
Only a simple example is given in the README. For a list of options and other advanced usage, please refer to the API Documentation.
1import fs from 'fs';
2import { YtdlCore, toPipeableStream } from '@ybd-project/ytdl-core';
3// For browser: import { YtdlCore } from '@ybd-project/ytdl-core/browser';
4// For serverless functions: import { YtdlCore } from '@ybd-project/ytdl-core/serverless';
5
6// JavaScript: const { YtdlCore } = require('@ybd-project/ytdl-core');
7
8const ytdl = new YtdlCore({
9 // The options specified here will be the default values when functions such as getFullInfo are executed.
10});
11
12// Download a video
13ytdl.download('https://www.youtube.com/watch?v=dQw4w9WgXcQ').then((stream) => toPipeableStream(stream).pipe(fs.createWriteStream('video.mp4')));
14
15// Get video info
16ytdl.getBasicInfo('https://www.youtube.com/watch?v=dQw4w9WgXcQ').then((info) => {
17 console.log(info.videoDetails.title);
18});
See the Examples folder for examples of using @ybd-project/ytdl-core
.
@ybd-project/ytdl-core
is unable to retrieve or download information from the following videos.
The URL to view the retrieved video is valid for 6 hours. (In some cases, downloading may only be possible from the same IP.)
When doing too many requests YouTube might block. This will result in your requests getting denied with HTTP-StatusCode 429. The following steps might help you:
@ybd-project/ytdl-core
to the latest versionDistributed under the MIT License.
No vulnerabilities found.
No security vulnerabilities found.