

This is what you'll need for the default download location that you're looking for. Youtube-dl also allows use of a configuration file - a file that can be used to configure the switches you most frequently use so the program can pull them from there instead, saving you from having to explicitly call them each time you run it.

For all of the variables that can be used in a filename, have a look at the youtube-dl documentation here. In this example, it will output the title of the original downloaded video followed by the file extension, which is my personal preference.

Youtube-dl -o '%USERPROFILE%\Desktop\%(title)s-%(id)s.%(ext)s' Note that -o has a dual function in that it also sets a template for how your output files will be named, using variables. Output on youtube-dl is handled with the -output or -o switch pass it as an option, followed by the destination you want to save your downloads to: Join the nixCraft community via RSS Feed, Email Newsletter or follow on Twitter.You need to use the -o switch with the Configuration file He wrote more than 7k+ posts and helped numerous readers to master IT topics. Vivek Gite is the founder of nixCraft, the oldest running blog about Linux and open source. Update: Check out this bash script – it does same thing without using python. It is released to the public domain, which means you can modify it, redistribute it or use it however you like. It should work in your Unix box, in Windows or in Mac OS X. It requires the Python interpreter (2.6, 2.7, or 3.3+), and it is not platform specific. It is a small command-line program to download videos from and a few more sites. It is not platform-specific it can run under Linux, Mac OS X, or Windows platforms so long as a recent - 2.4 or later - version of Python is installed.

Youtube-dl is a Python script, licensed under the “non-copyleft” free software MIT/X11 license.
