Actions

Downloading YouTube Videos in Whonix ™

From Whonix



youtube-dl Icon

Introduction[edit]

youtube-dl is: [1]

... a command-line program to download videos from YouTube.com and a few more sites. It requires the Python interpreter (2.6, 2.7, or 3.2+), and it is not platform specific. We also provide a Windows executable that includes Python. youtube-dl should work in your Unix box, in Windows or in Mac OS X. It is released to the public domain, which means you can modify it, redistribute it or use it however you like.

youtube-dl is simple to use in Whonix ™. Simply follow the instructions to install it below, identify the relevant YouTube video URL, then run the application in a terminal to download the video. Once it has finished downloading, VLC Media Player (installed by default) can be used to view the video.

Installation[edit]

The Whonix ™ wiki normally recommends that additional software is installed from Debian stable, but in the case of youtube-dl there is often a significant difference between the stable and backports versions. Since the developers frequently update the software to address broken functionality when attempting downloads from various websites, an upgrade of youtube-dl from Debian backports may be required. [2]

youtube-dl can be installed from Debian backports. This is non-ideal, see footnote. [3]

1. Boot Whonix-Workstation ™ (whonix-ws-15) TemplateVM.

2. Add the current Debian stable backports codename buster-backports to Debian apt sources.

Note: this applies to Whonix ™ 15.0.1.9.3. Later Whonix ™ versions may use a codename different to buster.

In Whonix-Workstation ™ (whonix-ws-15) TemplateVM, run.

sudo su -c "echo -e 'deb tor+https://deb.debian.org/debian buster-backports main contrib non-free' > /etc/apt/sources.list.d/backports.list"

Alternatively, users who like Onionizing Repositories can set the .onion mirror.

sudo su -c "echo -e 'deb tor+http://2s4yqjx5ul6okpp3f2gaunr2syex5jgbfpfvhxxbbjwnrsvbk5v3qbid.onion/debian buster-backports main contrib non-free' > /etc/apt/sources.list.d/backports.list"

3. Update the package lists.

sudo apt-get update

4. Install the select software.

sudo apt-get -t buster-backports install youtube-dl

The procedure is now complete.

5. Undo.

On occasion it is necessary to undo this configuration, for example when upgrading from Debian buster to bullseye. [4] To proceed, run.

sudo rm /etc/apt/sources.list.d/backports.list

Usage[edit]

First identify the relevant YouTube video URL in Tor Browser, then right-click the link and select "Copy Link Location". In the example below it is "Why Do so Many People Hate Windows 10?" (https://youtube.com/watch?v=KpEb8M23LsU [archive])

Figure: Example YouTube Video to Download

Whyhatewindows10.png

Next, open a terminal. To download the relevant YouTube video, run (replace 'link-to-video' with the chosen URL).

youtube-dl link-to-video

Figure: youtube-dl Example Download

Youtubedlexample.png

Finally, open VLC Media Player and select the relevant file to play: MediaOpen File...Open the video file

Figure: VLC Media Player

Youtubedownloadinvlc.png

Extensive documentation [archive] is available describing a host of possible options, including:

  • general options
  • network options
  • geo restriction
  • video selection
  • download options
  • filesystem options
  • thumbnail images
  • verbosity/simulation options
  • workarounds
  • video format options
  • subtitle options
  • authentication options
  • Adobe pass options
  • post-processing options

In addition the documentation describes numerous configuration settings, output templates, format selection and video selection among other topics. Many readers will be interested in how to select preferred video quality; see here [archive] for a quick overview.

Alternatives[edit]

See Also[edit]

Footnotes[edit]

  1. https://ytdl-org.github.io/youtube-dl/ [archive]
  2. At the time of writing, the Debian package tracker [archive] shows stable has a 2019 version, while backports has a late 2020 version available.
  3. Users should Prefer Packages from Debian Stable Repository, but using backports is better than manual software installation or using third party package managers since this prefers APT. To contain the risk, Non-Qubes-Whonix ™ users might want to consider using Multiple Whonix-Workstation ™ and Qubes-Whonix ™ users might want to consider using Multiple Qubes-Whonix ™ TemplateVMs or Software Installation in a TemplateBasedVM.
  4. Most often this step applies before attempting major Whonix ™ upgrades; upgrade instructions are also made available at that time (see Stay Tuned).


Fosshost is sponsors Kicksecure stage server Whonix old logo.png
Fosshost About Advertisements

Search engines: YaCy | Qwant | ecosia | MetaGer | peekier | Whonix ™ Wiki


Follow: 1024px-Telegram 2019 Logo.svg.png Iconfinder Apple Mail 2697658.png Twitter.png Facebook.png Rss.png Reddit.jpg 200px-Mastodon Logotype (Simple).svg.png

Support: 1024px-Telegram 2019 Logo.svg.png Discourse logo.png Matrix logo.svg.png

Donate: Donate Bank Wire Paypal Bitcoin accepted here Monero accepted here Contriute

Whonix donate bitcoin.png Monero donate Whonix.png United Federation of Planets 1000px.png

Twitter-share-button.png Facebook-share-button.png Telegram-share.png Iconfinder Apple Mail 2697658.png Reddit.jpg Hacker.news.jpg 200px-Mastodon Logotype (Simple).svg.png

Follow us on Twitter.png Twitter / Facebook.png Facebook.

https link onion link Priority Support | Investors | Professional Support

Whonix | © ENCRYPTED SUPPORT LP | Heckert gnu.big.png Freedom Software / Osi standard logo 0.png Open Source (Why?)

The personal opinions of moderators or contributors to the Whonix ™ project do not represent the project as a whole.

By using our website, you acknowledge that you have read, understood and agreed to our Privacy Policy, Cookie Policy, Terms of Service, and E-Sign Consent.