I don't know about the first, but the second can be easily done with youtube-dl
:
sudo apt-get install youtube-dl
I've copied the help text about formating here:
Video Format Options:
-f, --format FORMAT video format code, specifiy the order of
preference using slashes: "-f 22/17/18"
--all-formats download all available video formats
--prefer-free-formats prefer free video formats unless a specific one
is requested
--max-quality FORMAT highest quality format to download
-F, --list-formats list all available formats (currently youtube
only)
So you can use --max-quality
to get the maximum quality format. On a personal note, I find youtube-dl
very easy to use (I just type yo and Tab in terminal and it auto-completes it for me). It can also download every video by a specific channel and has a multitude of options.
I believe you can set it to continue downloads with the -c
option and if you do that for a channel, it should download only new ones if in the same directory as the others were downloaded to, but have not tried it in practice. If you can, then you can run youtube-dl
on a script and it will only download the files when there are new ones.
The first video downloaded successfully with a recently updated version of youtube-dl which I installed with python-pip using python pip install youtube-dl
inside a Python virtual environment (python-virtualenv). For information about how to setup and use a Python virtual environment see How to set up and use a virtual python environment in Ubuntu?.
The command I used to show the available video formats was:
youtube-dl -F "https://www.youtube.com/watch?v=wo6Sq1h2DI4"
The command I used to download the first YouTube video was:
youtube-dl -f 18 "https://www.youtube.com/watch?v=wo6Sq1h2DI4"
The second video could not be downloaded using youtube-dl, but I did not give up. I upgraded my youtube-dl to the latest version by running:
pip install --upgrade youtube-dl # inside the Python virtual environment
I didn't need to use sudo
because my Python virtual environment was installed inside my own user directory (~/my-Python-virtual-env
). After upgrading youtube-dl I ran this command to download the second YouTube video:
youtube-dl -f 18 "https://www.youtube.com/watch?v=BbbhZl8xqVY"
Why not simply use sudo pip install --upgrade youtube-dl
?
One of the reasons I use Ubuntu is to escape the madness of the way Windows installs applications. I install packages from the default Ubuntu repositories whenever possible. In this case I know that youtube-dl is a Python program, so I can locally install the latest version of youtube-dl in a Python virtual environment without messing up my filesystem.
Another alternative is to install the youtube-dl snap package:
sudo snap install youtube-dl # start with snap run youtube-dl
I believe that since from now some things have changed in YouTube's service and applications' way to access it.
True. Google has been changing the way to access YouTube videos more frequently now than was the case three years ago, so in order to keep youtube-dl up-to-date, it has to be updated more frequently too. I have observed over the years that YouTube videos appear to be blocked mostly related to the date when they were uploaded.
Before I started using youtube-dl, I used a Firefox extension called Video DownloadHelper to download YouTube videos. I have come to prefer youtube-dl because it has the highest probability of successfully grabbing YouTube videos of any downloader that I have ever used.
Best Answer
Using a terminal you may wish to give a chance to youtube-dl which can be easily installed by dropping
sudo apt-get install youtube-dl
and its usage is quite easy: simply copy the youtube url and add it in the terminal just afteryoutube-dl
as shown in the next example:This code will download Baltimora Chinese Restaurant video.
This will resut in the flv video to be downloaded in the folder where the terminal resides at the very moment that you start downloading, so make sure you first change directory to your videos folder.
Another excellent option is via GUI, by using Mobile Media Converter by MikSoft
And or JDownloader. JDownloader will also allow you to choose which video format you want to donload based on the available formats in youtube, which may include but not limited to: mp4, flv, ogv, mp3 and a few other.
Good luck!