Where does youtube-dl download the videos to?
There are really two questions here:
1. Why does youtube-dl not feature in Dash?
This is because youtube-dl
is run from a Terminal window only and does not come with icons, desktop files and the like. It is simply run from any Terminal window as follows:
youtube-dl [options] url [url...]
Details of the command line options can be easily seen by running the following command:
youtube-dl -h
Experiment a little to make youtube-dl
work as you wish.
2. Where does Youtube-dl download YouTube files?
By default youtube-dl
will download the files in the current working directory of the Terminal that you have opened. Usually this is your $HOME
environment, but not always. This behavior can be modified in either of two ways:
-
Use the -o option with
youtube-dl
to manually give a location for the downloaded files:youtube-dl -o "~/Desktop/%(title)s.%(ext)s" 'youtube file url'
and of course substitute your actual url for 'youtube file url'. This example sends the completed download to your Desktop.
-
Create a configuration file for
youtube-dl
as follows:touch ~/.config/youtube-dl.conf
Then set a default download location in this file:
--output "~/Desktop/%(title)s.%(ext)s"
With this in place all downloaded files will automatically go to your Desktop.
References:
- youtube-dl Readme
By default youtube-dl downloads files in the same directory from where you run the command. Mostly it's your home directory. If your name is Tom, then it is /home/Tom. To force it to download elsewhere you should use -o option; and to select quality of video, there is -f option. But how would you know the variety of quality of files. That is achieved by -F option. So combine all these in one shell script, make it executable and put it in a bin directory. And life becomes easy going.
I have written one script for my own use. It works fine. You don't have to worry where all those downloaded files are going. I've chosen ~/Videos directory for downloading YT videos; you can choose any other. Also replace 'Tom' by your name. Here is the script:
#!/bin/sh
answer=""
tput clear
tput cup 05 10
echo "Give the YouTube URL: \c"
# Here you paste the YT-video-URL by ctrl+shift+V
read answer
# The follwing command will display a list of video quality options to choose from
youtube-dl -F $answer
echo
# Here you give the number shown in first column as per your choice
echo "Select Quality (Choose a number): \c"
read qual
# If you don't want to download and quit the shell, give 99
if [ $qual -ne 99 ]
then
youtube-dl -f $qual -o "/home/Tom/Videos/%(title)s.%(ext)s" $answer
else
exit 0
fi
If you run youtube-dl
like this:
youtube-dl -o "/home/vasa1/Downloads/%(title)s" http://www.youtube.com/watch?v=rnvK2TIhYns
The video should be in /home/vasa1/Downloads
. Of course you need to put your username in place of vasa1
.
by default youtube-dl downloads it's files on your home directory to access your downloaded filed please open the terminal change the directory to your home directory user:~$ cd /home/user Notice: user is your user name
Ubuntu 14 fix of official installation procedure
Create directory here:
sudo mkdir /opt/youtube-dl
Move youtube-dl from installation place:
sudo mv /usr/local/bin/youtube-dl /opt/youtube-dl
Make symlink:
pushd /usr/local/bin/ && sudo ln -s /opt/youtube-dl/youtube-dl
Test symlink:
ls -la youtube-dl
lrwxrwxrwx 1 root root 26 Oct 16 20:41 youtube-dl -> /opt/youtube-dl/youtube-dl
popd
Test file:
ls -la /opt/youtube-dl/youtube-dl
-rwxrwxrwx 1 root root 639567 Oct 15 12:42 /opt/youtube-dl/youtube-dl
Fix permissions:
sudo chmod 755 /opt/youtube-dl/youtube-dl
Remove old cache:
sudo rm -r /home/<user>/.cache/youtube-dl/
e'voila! youtube-dl without having a need for a sudo in front of it