Viewing YouTube movies offline
youtube-dl
The classic youtube-dl [8], written in Python, is under active development – and at a very fast pace. If you cannot find the tool in your distribution's repositories, you can install the current version with the commands from Listing 1. To use the program, you only need to pass it a URL, and off you go.
Listing 1
Installing youtube-dl
$ sudo wget https://yt-dl.org/downloads/2013.11.20/youtube-dl -O /usr/local/bin/youtube-dl $ sudo chmod a+x /usr/local/bin/youtube-dl
The online help, which you can view by typing youtube-dl --help
, exposes the program as a functional monster: Using appropriate parameters, you can set up a download via a proxy server or change the string for the user agent. Youtube-dl downloads playlists completely or partially on request. For partial downloads, you either specify the number of videos, use regular expressions to select movies with a specific song, or to specify a date. The program cannot tap complete channels. On request, the script reduces the data rate, thus considerably saving network bandwidth.
Youtube-dl saves metadata, video descriptions, and subtitles in separate files on request. However, the software does not provide an option for defining the file name of the movies that you save. Like cclive, it only lets you specify parts of the name using wildcards. For example, the following command would save the MP4 video titled Big Buck Bunny
in the ~/Videos
as Big Buck Bunny.mp4
:
$ youtube-dl -o '~/Videos/%(title)s.%(ext)s' http://www.youtube.com/watch?v=YE7VzlLtp-4
During the download, the script reveals the progress, the file size of the entire movie, the data rate, and the time remaining. Broken downloads can be continued later if needed. The program even automatically detects whether a canceled download exists and it then revives the process.
Youtube-dl can simultaneously download a movie in all formats offered by YouTube. If you are interested in only a particular format, you can first list the available formats (Figure 7). When starting the script, then enter the appropriate identification number. You even have the option of specifying preferences. If you need to log in to access a movie, the program helps you do so. It will also forward downloaded movies to another application, such as FFmpeg, on request.
Conclusions
If you want an easy option for downloading a YouTube movie, you should go for a program with a graphical user interface. The 4K Video Downloader is very easy to handle but comes with annoying advertising and half-crippled functions.
ClipGrab launches quickly on 32-bit systems, but the search feature proved useless in our lab. Minitube plays the video but only downloads videos with a Creative Commons license in the current version. xVideoServiceThief is recommended for anybody who typically downloads many videos overnight.
In terms of command-line programs, youtube-dl's large feature set and update frequency speak in favor of this tool. Hot on its heels follows cclive, which offers very similar functions. Get-flash-videos failed to download any movies at all, at least in the version we tested (1.24), and is thus disqualified.
Thinking Outside the Box
In addition to the applications presented here, you can find numerous other download helpers. The Firefox add-on Video DownloadHelper [9] adds a new menu item to the browser with buttons that let you download the YouTube video you are currently viewing (Figure 8). You have the choice between formats provided by the platform, and the extension will even convert video to other formats after downloading, if so desired. Thus, Video DownloadHelper is ideal for users who often browse YouTube.
If you only occasionally download a video, the easiest way is to leave it up to a service on the Internet. For example, on the Clip Converters page [10], simply enter the URL for the video, choose a format and file name, and then download the movie (Figure 9).
Infos
- 4K Video Downloader: http://www.4kdownload.com/
- cclive: http://cclive.sourceforge.net/
- List of YouTube codecs: http://en.wikipedia.org/wiki/YouTube#Quality_and_codecs
- ClipGrab: http://clipgrab.org
- get-flash-videos: http://code.google.com/p/get-flash-videos/
- Minitube: http://flavio.tordini.org/minitube
- xVideoServiceThief: http://xviservicethief.sourceforge.net
- youtube-dl: http://rg3.github.io/youtube-dl/download.html
- Video Downloadhelper: https://addons.mozilla.org/en-US/firefox/addon/video-downloadhelper/
- Clip Converter: http://www.clipconverter.cc
« Previous 1 2 3
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Canonical Bumps LTS Support to 12 years
If you're worried that your Ubuntu LTS release won't be supported long enough to last, Canonical has a surprise for you in the form of 12 years of security coverage.
-
Fedora 40 Beta Released Soon
With the official release of Fedora 40 coming in April, it's almost time to download the beta and see what's new.
-
New Pentesting Distribution to Compete with Kali Linux
SnoopGod is now available for your testing needs
-
Juno Computers Launches Another Linux Laptop
If you're looking for a powerhouse laptop that runs Ubuntu, the Juno Computers Neptune 17 v6 should be on your radar.
-
ZorinOS 17.1 Released, Includes Improved Windows App Support
If you need or desire to run Windows applications on Linux, there's one distribution intent on making that easier for you and its new release further improves that feature.
-
Linux Market Share Surpasses 4% for the First Time
Look out Windows and macOS, Linux is on the rise and has even topped ChromeOS to become the fourth most widely used OS around the globe.
-
KDE’s Plasma 6 Officially Available
KDE’s Plasma 6.0 "Megarelease" has happened, and it's brimming with new features, polish, and performance.
-
Latest Version of Tails Unleashed
Tails 6.0 is based on Debian 12 and includes GNOME 43.
-
KDE Announces New Slimbook V with Plenty of Power and KDE’s Plasma 6
If you're a fan of KDE Plasma, you'll be thrilled to hear they've announced a new Slimbook with an AMD CPU and the latest version of KDE Plasma desktop.
-
Monthly Sponsorship Includes Early Access to elementary OS 8
If you want to get a glimpse of what's in the pipeline for elementary OS 8, just set up a monthly sponsorship to help fund its continued existence.