Linux: Download YouTube videos via the terminal
Under Linux operating systems such as Ubuntu, you can download YouTube videos directly from the terminal. For this you need the command line program "Youtube-dl".
Youtube-dl: Download videos via Linux terminal
Note: To use "Youtube-dl" you need the programming language "Python" and the application collection "FFmpeg" / "Libav". However, these dependencies are usually preinstalled on Ubuntu.
- Open the terminal and install "Youtube-dl" with the following command: "sudo apt-get install youtube-dl". Enter your password in the user query, then the command line program will be installed.
- To download a YouTube video, copy the link from the browser and paste it into the terminal together with "Youtube-dl". A command then looks something like this: "youtube-dl".
- Tip: The command line "Youtube-dl" does not only work with the popular video portal Youtube. You can also download clips from many other libraries using the same terminal command. You can get an overview of all providers with the terminal command "youtube-dl --list-extractors".
- If you only need the audio track of a video, type the following command into the terminal: "youtube-dl -x". You can also set the audio file format: "youtube-dl -x --audio-format mp3 --audio-quality 0".
- If you would like to download a long list of YouTube videos, save all links in a TXT file (one video link per line). Then enter the following command into the terminal: "youtube-dl -c --title --batch-file = '. Txt'" - Tip: If you have saved the TXT file in the user directory, you only need the file name, not the path to the file. the command could then be something like: "youtube-dl -a textfile.txt"
- All other commands and help for Youtube-dl can be obtained with the terminal command "youtube-dl -h"
The terminal proves to be a very useful tool under Linux-based operating systems: In addition to video downloads, you can even implement program installations using the command.