Tuesday, June 30, 2015

Downloading youtube Videos with VLC (command line)

Ladies and gentlemen, we present you the fast and easy way to download Youtube videos using VLC and a shell script:

The script:

  # INPUT is the URL as seen in the browser
  # OUTPUT is any arbitrary file.
  vlc --intf dummy "${INPUT}" --sout=file/ts:${OUTPUT} vlc://quit

A problem appears if there are many related videos to download (for example a 50 video tutorial).
 Using Firefox I just select them all on the "right column" (related videos), right-click to select "see source code selected" and then clean the html to let only the input URL and the video title. 

Then a few Vim macros is all that needed to convert them in a shell script.

World Domination is an step closer now!