Downloading videos to an external drive with youtube-dl

How about:

cd '/media/New Volume/Youtube Downloads'
youtube-dl URL1...
youtube-dl URL2...

...

All of these work for me when run from /home/vasa1. I don't have to first cd to the target folder (or drive):

  • youtube-dl -o "/media/vasa1/TOSHIBA EXT/%(title)s" http://www.youtube.com/watch?v=OqxLmLUT-qc (an external USB drive)

  • youtube-dl -o "/media/vasa1/EC82B9BF82B98E98/%(title)s" http://www.youtube.com/watch?v=OqxLmLUT-qc (an NTFS partition on the internal hard disk)

  • youtube-dl -o "/home/vasa1/Downloads/%(title)s" http://www.youtube.com/watch?v=OqxLmLUT-qc


    I suggest you run youtube-dl --version and then look for your version here: https://github.com/rg3/youtube-dl/tree/. When you click on your version from the list, you'll be taken to a page that has a detailed section on usage.


This simple function would save "Nyan Cat 10 hours (original).mp4" from YouTube in the Videos folder:

video(){  
    youtube-dl -o "/Users/daniel/Videos/%(title)s.%(ext)s" $1 -f mp4  
}

Usage from your terminal:

video https://www.youtube.com/watch?v=wZZ7oFKsKzY