yt-dlp-video
Version:
A robust video downloader built on yt-dlp for downloading and processing video content from various sources.
111 lines (79 loc) ⢠3.31 kB
Markdown
<div align="center">
# yt-dlp-video
š„ The most reliable Node.js video downloader powered by yt-dlp
[](https://www.npmjs.com/package/yt-dlp-video)
[](https://www.npmjs.com/package/yt-dlp-video)
[](https://github.com/abdulaziz20007/yt-dlp-video/blob/main/LICENSE)
*Download videos from YouTube and 1000+ sites with just a few lines of code! Zero configuration required - we handle the yt-dlp installation automatically.*
</div>
## ⨠Key Features
- š **Simple Promise-based API** - Easy to use with async/await
- š¦ **Zero Configuration** - Automatic yt-dlp binary installation
- šÆ **Progress Tracking** - Real-time download progress updates
- āļø **Flexible Options** - Customize formats, quality, and more
- šŖ **Cross-Platform** - Works on Windows, macOS, and Linux
- š **Universal Support** - Compatible with 1000+ video sites
## š Installation
```bash
npm install yt-dlp-video
```
That's it! No need to install yt-dlp separately - everything is handled automatically.
## š Usage
### Basic Example
```javascript
const { downloadVideo } = require('yt-dlp-video');
// Download video in best quality MP4 format
await downloadVideo('https://www.youtube.com/watch?v=VIDEO_ID');
```
### Advanced Options
```javascript
await downloadVideo('https://youtube.com/watch?v=VIDEO_ID', {
outputDir: './downloads', // Where to save the video
format: 'mp4', // Video format
quality: 'best', // Video quality
filename: 'my-video' // Custom filename (without extension)
});
```
### With Progress Tracking
```javascript
try {
const result = await downloadVideo('https://youtube.com/watch?v=VIDEO_ID', {
outputDir: './videos'
});
console.log('ā
Download complete!');
} catch (error) {
console.error('ā Download failed:', error);
}
// Console output:
// š„ Download progress: 23.5%
// š„ Download progress: 47.2%
// š„ Download progress: 89.7%
// ā
Download progress: 100%
```
## āļø Configuration Options
| Option | Type | Default | Description |
|--------|------|---------|-------------|
| `outputDir` | `string` | Current directory | Directory where videos will be saved |
| `format` | `string` | `'mp4'` | Video format (mp4, webm, etc.) |
| `quality` | `string` | `'best'` | Video quality (best, worst, or specific resolution) |
| `filename` | `string` | Video title | Custom filename (without extension) |
## š Supported Platforms
Download videos from popular platforms including:
- YouTube
- Vimeo
- Twitter
- TikTok
- Instagram
- Facebook
- *And 1000+ more sites!*
## š Requirements
- Node.js 14 or higher
- Internet connection (required only for first run)
## š License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
## š¤ Contributing
Contributions, issues, and feature requests are welcome! Feel free to check the [issues page](https://github.com/abdulaziz20007/yt-dlp-video/issues).
---
<div align="center">
Made with ā¤ļø by the yt-dlp-video team
</div>