Viewing YouTube movies offline

Video On the Go

Article from Issue 162/2014
Author(s):

With the right tools, you can store YouTube movies on your hard disk and view them when Internet access is unsatisfactory or unavailable.

The drawback of movies on the web is that they are only available for online viewing. For many reasons, you might want to download a movie – perhaps because your connection is not good enough for smooth playback, or you want to archive a video, or you want to view it where you won't have Internet access. Several small programs can download web movies – and sometimes even convert them to another format.

Programs such as 4K Video Downloader, cclive, ClipGrab, get-flash-videos, Minitube, xVideoServiceThief, and youtube-dl can help (but see the "Warning" box). These tools appear to YouTube like a normal user, which allows you to save the streaming output to a file on your hard disk.

Warning

Respect copyrighted material: You cannot download just any video without considering your actions and then use it for any purpose. If in doubt, ask the movie creator for permission.

4K Video Downloader, ClipGrab, Minitube, and xVideoServiceThief offer graphical user interfaces. In contrast, cclive, get-flash-videos, and youtube-dl are programs for the command line, meaning a tougher learning curve while you learn the cryptic parameters. On the upside, however, you can embed the tools in shell scripts. A quick overview of the most important functions is provided in Table 1.

Table 1

Candidates

 

4K Video Downloader

cclive

ClipGrab

 

http://www.4kdownload.com/

http://cclive.sourceforge.net

http://clipgrab.org

License

Closed source

GPLv3/AGPLv3

GPLv3

Version

3.0

v0.7.16

3.3.0.1

Interface

GUI

Command line

GUI

Format selection

Yes

Yes

Yes

Format conversion

No

No

Yes

Pause download

Yes

Yes

Cancel only

Resume download

No

Yes

No

Timer-controlled download

No

No

No

Download playlist

Yes (max. 25 movies)

No

No

Tap channels

Yes (max. 25 movies)

No

No

Export subtitles

Yes (max. 25 items)

No

No

Extract soundtrack

Yes

No

Yes

Proxy server

No

Yes

Yes

Save

Freely selectable file name

Freely selectable file name

Freely selectable file name

Table 1

Candidates (continued)

 

get-flash-videos

Minitube

xVideoServiceThief

youtube-dl

 

http://code.google.com/p/get-flash-videos/

http://flavio.tordini.org/minitube

http://xviservicethief.sourceforge.net

http://rg3.github.io/youtube-dl/download.html

License

Apache License 2.0

GPLv3

GPLv3

Unlicensed (public domain)

Version

1.24

2.1.2

2.5

2013.11.20

Interface

Command line

GUI

GUI

Command line

Format selection

Limited

Limited

No

Yes

Format conversion

No

No

No

No

Pause download

No

Cancel only

Yes

Yes

Resume download

No

No

No

Yes

Timer-controlled download

No

No

Yes

No

Download playlist

No

No

No

Yes

Tap channels

No

No

No

No

Export subtitles

No

No

No

Yes

Extract soundtrack

No

No

No

No

Proxy server

No

No

Yes

No

Save

Freely selectable file name

Freely selectable directory

Freely selectable directory

Limited selection of file name

Apart from ClipGrab and Minitube, all the applications require the URL for the desired movie, which can be obtained by navigating to the movie on YouTube in your browser and copying the address from the address bar. Once you get this far, you might alternatively opt for a web-based solution (see "Outside the Box").

4K Video Downloader

Although Open Media LLC advertises 4K Video Downloader as an open source product, it exists only as a binary package for Ubuntu [1]. Users of other distributions can try the portable packages offered on the download page: These tarballs contain all the libraries needed by the program. You only need to unpack the archive and run the 4kvideodownloader.sh script.

When launched, the tool comes up with a clearly arranged main window (Figure 1). To download a movie, copy the URL for the movie to the clipboard and press Paste Url in the 4K Video Downloader toolbar, then enter a file name in a new window, choose the format, and set the compression method.

Figure 1: 4K Video Downloader is easy to use but comes with annoying advertising.

On request, the program extracts only the soundtrack and saves any existing subtitles. If you are downloading multiple movies, enter the desired video format via Smart Mode before doing so in the settings. 4K Video Downloader displays the volume of data already downloaded and the remaining time. After downloading, choose Play from the context menu to play back the movie in your desktop environment's default movie player.

If necessary, you can pause the download and continue later. The downloaded files still remain on the hard disk if you remove the entry in the main window of the application via the context menu. 4K Video Downloader repeatedly displays annoying ads for the full version, which lets you download an unlimited number of videos from playlists and channels and store an unlimited number of movies and subtitles. In contrast, the free version only handles 25 movies or subtitles.

cclive

The console tool cclive [2] is included in almost all major distributions; installation is thus a simple matter with the package manager. On openSUSE, the tool resides in the Packman repository. You can usually expect the stable version, 0.7, which is released under the GPLv2. The developer version 0.9, on the other hand, uses the AGPLv3. Besides the license, the two versions differ mainly under the hood.

To download a movie, simply pass the URL of the movie to the program in quotes. During the download, the tool shows the progress in terms of the volume of downloaded data, the remaining time, and the current data rate. If you want to download in a specific format, query the existing formats first with -S (Figure 2). The program then returns a list of cryptic identifiers; the overview on the web will help you interpret them [3]. To specify the desired format, use -s:

Figure 2: Cclive uses very cryptic commands; however, the tool is very useful for scripting.
$ cclive -s fmt17_144p "http://www.youtube.com/watch?v=YE7VzlLtp-4"

With additional parameters, you can pass in an explicit proxy server or modify the details for the user agent. By default, the program pretends to be Mozilla/5.0. Cclive restarts aborted downloads at a later time. On request, it starts another program directly after downloading. You can use this ability, for example, to integrate FFmpeg for data conversion.

If you don't like the file name chosen automatically by the program, you can change the structure. The --filename-format %t.%s option tells cclive to compose the file name from the title and the suffix, as in bigbuckbunny.mp4. Alternatively, simply specify your choice of name using the -o parameter. The program does not accept complete channels or playlists as a source, and it can't extract audio tracks.

ClipGrab

To launch ClipGrab, download the tool from the web page [4], unzip the package, make the file that starts with clipgrab executable, and then launch the program. In the test, the program ran under Ubuntu, openSUSE, and Arch Linux – but only on 32-bit systems. It refused to work on 64-bit Ubuntu. If you like, you can have a look at the source code; the program itself is released under the GPLv3.

The main window has several tabs that you have to go through once from left to right (Figure 3). The first tab lets you search YouTube; thus, there is no need to identify the URL of the video you want to download in your browser. However, the search returns extremely few hits: For Big Buck Bunny, ClipGrab found just eight videos, not even including the official film by the Blender Foundation.

Figure 3: ClipGrab searching for videos. Clicking on a match tells the program to use its address for the download.

If you fail to find the movie you want with the built-in search, type the URL manually in the Downloads tab, then set the appropriate format. If YouTube does not provide this itself, ClipGrab converts the video with FFmpeg. Although the application lets you cancel a download, it lacks the ability to continue it later.

During the download, the tool only displays the progress. As with cclive, the ClipGrab settings allow you to specify a proxy server. The program can extract sound tracks.

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Minitube: Slimline YouTube Client

    Anyone wanting to watch just a short video on YouTube probably won't need Minitube, for those that want more, it's a must-have app.

  • YouTube Players

    YouTube offers more than just funny kitten movies; you will also find more than 60 million music videos. With a native YouTube client for Linux, you can use this online jukebox as conveniently as your local music collection.

  • New Boxee Beta Brings Streaming Movie Library to Your Desktop

    Home Theater PC program adds steaming movie library from YouTube, Hulu.

  • Movgrab

    Video portals such as YouTube or Vimeo offer a wealth of curious and entertaining short films. If you want to enjoy them offline, a small tool called Movgrab can help.

  • Tool Tips

    We tested Mtools 2.3, PasDoc 0.14.0, SMTube 15.8.0, Jq 1.5, Pen 0.30.0, and PingChecker 15.8.16.

comments powered by Disqus
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.

Learn More

News