UNPKG

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
<div align="center"> # yt-dlp-video šŸŽ„ The most reliable Node.js video downloader powered by yt-dlp [![npm version](https://img.shields.io/npm/v/yt-dlp-video.svg)](https://www.npmjs.com/package/yt-dlp-video) [![Downloads](https://img.shields.io/npm/dm/yt-dlp-video.svg)](https://www.npmjs.com/package/yt-dlp-video) [![License](https://img.shields.io/npm/l/yt-dlp-video.svg)](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>