Edited by Earl on Nov-18-2015
How to Download YouTube Videos with Linux
This method works well for me with Linux Mint 12.
Install the Small command-line program youtube-dl.
VIDEO Showing How youtube-dl Works
$ youtube-dl https://www.youtube.com/watch?v=L14BzMA985I
Edited November 18, 2015Youtube-dl could no longer download videos from vimeo.com. Updating the software fixed this. Here are the two commands I entered into a Linux terminal to upgrade youtube-dl.
$ sudo wget --no-check-certificate https://yt-dl.org/downloads/2015.11.18/youtube-dl -O /usr/local/bin/youtube-dl
$ sudo chmod a+rx /usr/local/bin/youtube-dl
Useful config settings for youtube-dl
Sometimes youtube-dl downloads the video and the audio streams separately and combines them into a MKV file. I was having trouble playing MKV video, which would usually not play on any of my computers. I found a solution and decided to share it.
To force youtube-dl to not merge video and audio into the MKV format, I edited the config file to have a single line.
To edit the config file:
$ sudo kate /etc/youtube-dl.conf
-f best -o "%(title)s - %(uploader)s.%(ext)s"
The code above also adds to the filename the title and uploader of the video.
For now, this option “-f best” is stopping youtube-dl from making MKV videos and now youtube-dl mostly downloads MP4 videos instead, which always play on my computers.