video-download
Download video and audio from URLs using yt-dlp directly. No wrapper scripts needed.
Prerequisites
- yt-dlp:
brew install yt-dlporpip install yt-dlp - ffmpeg:
brew install ffmpegorapt install ffmpeg(required for merging video+audio streams)
Update yt-dlp periodically to keep up with site changes: yt-dlp -U or pip install -U yt-dlp.
Commands
Download best quality
Download specific resolution
Audio only
Download subtitles
Get metadata (no download)
List available formats
Specify output directory
Quality Presets
Output Template Variables
Common variables for -o templates:
Tips
- Always use
--merge-output-format mp4to avoid ending up with.webmor.mkvfiles. - Use
--no-downloadwith--dump-jsonfor metadata-only queries -- no files written to disk. - If a download fails with HTTP errors, update yt-dlp first (
yt-dlp -U). - Use
-f "bestvideo[height<=720]+bestaudio"to save bandwidth when full resolution is not needed. - yt-dlp automatically handles rate limiting and retries.
- The
--dump-jsonoutput includestitle,duration,uploader,view_count,description,formats,subtitles, and much more.
Troubleshooting
- "yt-dlp: command not found": Install it (
pip install yt-dlp) and ensure your PATH includes pip's bin directory. - "ffmpeg: command not found": Install ffmpeg. Without it, downloads fail when video and audio are separate streams (common on YouTube for HD).
- Downloads fail or return errors: Run
yt-dlp -Uto update. Sites change frequently and yt-dlp ships fixes regularly.

