-
YouTube Video download
- From a video or from a playlist
- Download caption option available
- Selectable resolution
-
YouTube Audio download
- From a video or from a playlist
-
To install
-
Using
pip
pip install youtube-downloader-cli
-
Using
uv
uv tool install youtube-downloader-cli
-
Using
uvx
to use this tool directly without installuvx youtube-downloader-cli
-
-
To upgrade
-
Using
pip
pip install --upgrade youtube-downloader-cli
-
Using
uv
uv tool install --upgrade --reinstall youtube-downloader-cli
-
Using
uvx
uvx youtube-downloader-cli@latest
-
Available options:
1. Download audio only
2. Download video
3. Download video with caption
4. Download audios from playlist
5. Download videos from playlist
If option 2, 3, or 5 is chosen in Step 2, please select a preferred resolution for video downloading.
Available options:
SD - 480p
HD - 720p
FullHD - 1080p
QHD - 1440p
4K - 2160p
best
Video with highest resolution, but not higher than user's choice (unless 'best' is chosen), will be downloaded.
If option 3 is chosen in Step 2, please select which caption(s) to be downloaded. User will only be prompted if more than one caption is available for selected video.
Note
If PyTubeFix failed to connect to YouTube, it may need to be upgraded to the newest version.
Using pip
: pip install --upgrade pytubefix
.
Or using uv
: uv install --upgrade --reinstall youtube-downloader-cli
.
Tip
When downloading from a playlist (Option 4 & 5), videos/audios will be downloaded in parallel. Maximum number of parallel downloads could be set via environment variable YTDL_WORKERS
(default is 4).
-
For CLI Application
- pyperclip
- pytubefix
- questionary
- rich
-
Of
pytubefix
NodeJS is used for POTOKEN generation bypytubefix
. If NodeJS is not available, POTOKEN will be skipped, may result in YouTube denyingpytubefix
's requests. -
FFMPEG
Progressive stream (both audio & video in one file) in YouTube has lower resolution. If
ffmpeg
is available, high resolution video & audio will be downloaded separately, then merges usingffmpeg
.If
ffmpeg
is not available in $PATH, progressive stream will be downloaded.