---
title: yt-dlp
kind: note
description: 'Link Resources Wikipedia Tutorial for Windows users Installation 1. Start "Ubuntu" from the start menu 2. If it is not installed: 1. Start "Terminal" from the start menu 2. Enter and press Enter 3. If…'
words: 512
readingMinutes: 2
created: '2024-08-19T18:35:41+02:00'
updated: '2025-10-19T17:08:37+02:00'
website: https://github.com/yt-dlp/yt-dlp
---
## Link

<https://github.com/yt-dlp/yt-dlp>

## Resources
- [Wikipedia](https://en.wikipedia.org/wiki/Youtube-dl)
## Tutorial for Windows users
### Installation
1. Start "Ubuntu" from the start menu
2. If it is not installed:
	1. Start "Terminal" from the start menu
	2. Enter `wsl --install` and press Enter
	3. If asked, confirm that you want to elevate permissions (click "Yes")
	4. Restart the computer when the screen tells you to
	5. Start "Ubuntu" from the start menu
	6. Enter a username, e.g. your name, all lowercase letters
	7. Enter a password and save it somewhere, the characters will _not_ be shown while you type, and press Enter
	8. Re-enter the same password and press Enter
3. Copy the following command, right-click in Ubuntu to paste it, and press Enter:
	```shell
	sudo ln -s /usr/bin/python3 /usr/bin/python
	```
	  Enter the password from step 2.g above and press Enter
4. Copy the following command, right-click in Ubuntu to paste it, and press Enter:
	```shell
	sudo apt install python3-pip
	```
	  Enter the password from step 2.g above and press Enter
5. Copy the following command, right-click in Ubuntu to paste it, and press Enter:
	```shell
	sudo python3 -m pip install https://github.com/yt-dlp/yt-dlp/archive/master.tar.gz
	```
	  Enter the password from step 2.g above and press Enter
### Whenever you want to download one video
1. Copy the following command, replace _USERNAME_ with your Windows username, then copy it again, right-click in Ubuntu to paste it, and press Enter:
	```shell
	cd /mnt/c/Users/USERNAME/Downloads
	```
	  If you log in to Windows with a Microsoft account, your username is typically the first part (before the @) of your email address.
2. Type the following command in Ubuntu, replacing "URL" with the address of the webpage that contains the video, and press Enter:
```shell
yt-dlp "URL"
```
3. The video should now be downloaded to your Downloads folder. Keep the Ubuntu window open until the $ sign reappears (until it is ready for you to type another command).
### Whenever you want to download  several videos
1. Open Notepad
2. Paste all the URLs from YouTube into Notepad, one per line
3. Save the text file in your Downloads folder with the filename "videos.txt"
4. Copy the following command, replace _USERNAME_ with your Windows username, then copy it again, right-click in Ubuntu to paste it, and press Enter:
	```shell
	cd /mnt/c/Users/USERNAME/Downloads
	```
	  If you log in to Windows with a Microsoft account, your username is typically the first part (before the @) of your email address.
5. Copy the following command, right-click in Ubuntu to paste it, and press Enter:
```shell
yt-dlp -i -a videos.txt
```
6. The videos should now be downloaded to your Downloads folder. Keep the Ubuntu window open until the $ sign reappears (until it is ready for you to type another command).
## FAQ
### Requested formats are incompatible for merge
> If however you are really keen to get the best quality video and the best quality video audio but only in an mp4 container (thus bypassing the mkv warning and subsequent Matrosk container output from youtube-dl) you can use something like the following:
>
> `youtube-dl -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]' URL`
> 
  [Source](https://askubuntu.com/questions/806258/requested-formats-are-incompatible-for-merge)
### Do not stop downloading when one of the files fails
- Add `-i` to the command line parameters to continue downloading after a failing file
### Download playlist as MP3
```shell
yt-dlp -x --audio-format mp3 --audio-quality 0 -o "%(playlist_index)s - %(title)s.%(ext)s" --yes-playlist --ignore-errors "https://www.youtube.com/playlist?list=PLw-XXXXXXX"
```
### Show available formats
```shell
yt-dlp -F VIDEO_URL
```
### Download audio and video streams separately and merge
```shell
yt-dlp -f VIDEO_FORMAT_ID+AUDIO_FORMAT_ID --merge-output-format mp4 VIDEO_URL
```
### Download all from <span class="dead-link">YouTube</span> "Watch Later" as MP4
Replace `$BROWSER$` with e.g. "chrome", "safari", "edge" etc.
```shell
yt-dlp --cookies-from-browser $BROWSER$ --download-archive archive.txt --no-overwrites --ignore-errors --recode-video mp4 --embed-metadata --embed-thumbnail --add-metadata --format "bestvideo[ext=mp4][vcodec~='h264']?+bestaudio[ext=m4a]/best[ext=mp4]/best" "https://www.youtube.com/playlist?list=WL"
```
