CLI Usage
ytdlp-nodejs comes with a powerful Command Line Interface (CLI) that supports both interactive and non-interactive modes.
Interactive Mode
Simply run the command without arguments to start the interactive menu:
1npx ytdlp
2# or if installed globally
3ytdlp
This will launch a beautiful interactive menu where you can:
- Download videos with quality selection
- Download audio with format selection
- Get formatted video information
- Update yt-dlp binary
- Download FFmpeg binaries
Interactive Commands
These commands will prompt you for additional options interactively:
Download Video
You'll be prompted to:
- Select video quality (4K, 1080p, 720p, etc.)
- Enter optional extra arguments (e.g.,
--embed-subs)
Download Audio
You'll be prompted to:
- Select audio format (MP3, M4A, WAV, or Best Quality)
- Enter optional extra arguments
Get Video Info
Displays formatted video information including title, uploader, duration, views, and more.
Direct Commands
These commands run without interactive prompts:
List Formats
List all available formats for a video:
Download with Specific Quality
Download directly with a specific quality (non-interactive):
1ytdlp video <url> --quality 1080p
Download FFmpeg
Download FFmpeg binaries to the project:
Update yt-dlp
Update the internal yt-dlp binary:
Examples
Quick interactive download
1ytdlp download https://youtube.com/watch?v=dQw4w9WgXcQ
2# Select quality from menu → Downloads video
Direct audio download
1ytdlp audio https://youtube.com/watch?v=dQw4w9WgXcQ
2# Select MP3 → Downloads as audio
Get video information
1ytdlp info https://youtube.com/watch?v=dQw4w9WgXcQ
2# Displays formatted video details