add example to download video with multiple audio streams

This commit is contained in:
postscriptum 2026-01-06 17:42:46 +02:00
parent 439086b93f
commit e456e391b7

View file

@ -18,6 +18,42 @@ yt-dlp CHANNEL_URL|PLAYLIST_URL|VIDEO_URL -S res:1080
yt-dlp CHANNEL_URL/playlists -o '%(uploader)s/%(playlist)s/%(title)s.%(ext)s' 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
``` bash
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:
``` bash
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:
``` bash
yt-dlp ... \
--exec "ffmpeg -i {} -map 0 -metadata:s:a:0 language=en -metadata:s:a:1 language=uk -c copy output.mkv" URL
```
## Extract audio ## Extract audio
``` bash ``` bash