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
Direct Download
Read full article as PDF:
Price $2.95
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
-
Armbian 23.05 is Now Available
Based on Debian 12, the latest version of the ARM/RISC-V distribution is now available to download and install.
-
Linux Mint Finally Receiving Support for Gestures
If you use the Linux Mint Cinnamon desktop, you'll be thrilled to know that 21.2 is getting support for gestures on touchscreen devices and touchpads.
-
An All-Snap Version of Ubuntu is In The Works
Along with the standard deb version of the open-source operating system, Canonical will release an-all snap version.
-
Mageia 9 Beta 2 Ready for Testing
The latest beta of the popular Mageia distribution now includes the latest kernel and plenty of updated applications.
-
KDE Plasma 6 Looks to Bring Basic HDR Support
The KWin piece of KDE Plasma now has HDR support and color management geared for the 6.0 release.
-
Bodhi Linux 7.0 Beta Ready for Testing
The latest iteration of the Bohdi Linux distribution is now available for those who want to experience what's in store and for testing purposes.
-
Changes Coming to Ubuntu PPA Usage
The way you manage Personal Package Archives will be changing with the release of Ubuntu 23.10.
-
AlmaLinux 9.2 Now Available for Download
AlmaLinux has been released and provides a free alternative to upstream Red Hat Enterprise Linux.
-
An Immutable Version of Fedora Is Under Consideration
For anyone who's a fan of using immutable versions of Linux, the Fedora team is currently considering adding a new spin called Fedora Onyx.
-
New Release of Br OS Includes ChatGPT Integration
Br OS 23.04 is now available and is geared specifically toward web content creation.