yt-dlp: Command-line audio/video downloader
Python CLI for downloading audio/video from thousands of websites, fork of youtube-dl.
Learn more about yt-dlp
yt-dlp is a command-line program written in Python that downloads audio and video files from streaming platforms and websites. The tool operates by extracting direct media URLs from web pages and downloading content in various formats and quality levels. It supports thousands of sites through modular extractors and includes features like format selection, metadata modification, and post-processing capabilities. The project serves as an actively maintained fork of youtube-dl, commonly used for content archival, offline viewing, and media processing workflows.
Extensive Site Support
Supports thousands of websites through modular extractor architecture. Includes specialized handling for major platforms and niche streaming services.
Advanced Format Control
Provides granular control over video/audio quality, format selection, and filtering options. Supports custom output templates and metadata modification.
Active Fork Maintenance
Maintains compatibility and adds features as an actively developed fork of youtube-dl. Includes SponsorBlock integration and regular updates for site compatibility.
import yt_dlp
# Configure download options
ydl_opts = {
'format': 'best[height<=720]', # Download best quality up to 720p
'outtmpl': '%(title)s.%(ext)s', # Output filename template
'writeinfojson': True, # Save video info as JSON
'writesubtitles': True, # Download subtitles if available
}
# Create yt-dlp object and download
with yt_dlp.YoutubeDL(ydl_opts) as ydl:
try:
url = 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'
ydl.download([url])
print("Download completed successfully!")
except Exception as e:
print(f"Error occurred: {str(e)}")See how people are using yt-dlp
Top in Developer Tools
Related Repositories
Discover similar tools and frameworks used by developers
whatsmeow
Go client library for WhatsApp web multidevice protocol.
wifi-password
Bash utility for extracting Wi-Fi passwords from macOS keychain storage.
ts-node
Execute TypeScript directly without precompilation step.
Corepack
Enforces package manager versions specified in package.json.
spdlog
Fast C++ logging with flexible sinks and fmt formatting.