YouTube downloads with yt-dlp
Download in max resolution
yt-dlp CHANNEL_URL|PLAYLIST_URL|VIDEO_URL
Change default resolution to 1080
yt-dlp CHANNEL_URL|PLAYLIST_URL|VIDEO_URL -S res:1080
Download to location by source meta mask
yt-dlp CHANNEL_URL/playlists -o '%(uploader)s/%(playlist)s/%(title)s.%(ext)s'
Download video with multiple audio streams
- tested on yt-dlp v2025.12.08
Download best video, best audio (original + uk) and subs
yt-dlp -f "bv+ba+ba[language=uk]" \
--audio-multistreams \
--embed-metadata \
--embed-subs \
--all-subs \
--merge-output-format mkv \
URL
- it's important to provide the `--embed-metadata` flag to prevent all audio options from being marked as 'English'
- the `--merge-output-format mkv` argument is recommended, as the MKV container provides the necessary features for built-in audio and subtitle options
Fix audio stream names using post-processing
If the `--embed-metadata` argument is missing, you can fix the names for audio options after by using ffmpeg:
ffmpeg -i input.mkv \
-map 0 -metadata:s:a:0 language=en -metadata:s:a:1 language=uk \
-c copy output.mkv
- it's important to keep the previous `-f` order
or just inline:
yt-dlp ... \
--exec "ffmpeg -i {} -map 0 -metadata:s:a:0 language=en -metadata:s:a:1 language=uk -c copy output.mkv" URL
Download with age confirmation
yt-dlp --cookies-from-browser chromium --js-runtimes node URL
Extract audio
yt-dlp CHANNEL_URL|PLAYLIST_URL|VIDEO_URL --extract-audio --audio-format vorbis
Get help
yt-dlp --help
/en/