Watch & Download YouTube Videos In Linux Terminal Using YTFZF

YTFZF Lets You Watch And Download YouTube Videos In Linux Terminal

If you’re a terminal enthusiast who wants to watch YouTube videos without opening a browser or calling API, then ytfzf is the latest command-line utility of your interest.

ytfzf is simply a POSIX script that lets you search, play, and download YouTube videos without leaving the terminal.

It is available for all Unix-like operating systems including Linux and macOS. However, the thumbnail preview feature is currently unavailable on macOS.

How To Install YTFZF Video Downloader?

The easiest way to get ytfzf on any OS is first by cloning the repository and then installing with the Makefile.

$ git clone https://github.com/pystardust/ytfzf
$ cd ytfzf
$ sudo make install
Install ytfzf
Install ytfzf

If you use Arch Linux, then ytfzf is already available in the AUR repo, which you can install by running the command:

$ yay -S ytfzf-git

After the utility installation, you also need to install dependencies it make use of such as:

  • mpv video player
  • youtube-dl for downloading videos
  • fzf for menu (optional)
  • jq to parse JSON data
  • ueberzug for thumbnails (optional)
$ sudo apt install jq mpv youtube-dl fzf

For Debian-based distros, you should install youtube-dl from its official repo as Debian repos contain its outdated version.

And if you want to search videos with thumbnails, you also need to install Ueberzug utility:

$ pip install ueberzug

Features Of YTFZF Video Downloader

Once you properly install ytfzf, you can start searching for YouTube videos by running ytfzf or ytfzf <query> command:

Search YouTube Videos
Search YouTube Videos

If you also want to see the thumbnail preview, you can use -t flag as ytfzf -t <query>.

List YouTube videos with thumbnails
List YouTube videos with thumbnails

As you can see, it lists the top result in the right panel and thumbnail preview of the current videos in the left panel.

You can select the video to play it using the default MPV video player. Key binding for MPV player is also available such as f for full-screen, J for subtitles, and L for single-loop.

ytfzf playing videos using mpv player
ytfzf playing videos using mpv player

If you want to quit from the video selection prompt, you can either press ESC or CTRL + C.

Besides, it also lets you queue videos using fzf multi-select option. You can Press the tab to select a video and line it up in mpv.

queue videos
queue videos

Ytfzf is still under continuous development. If you want to contribute or know more about it like changing configuration, check out the official repository.

Similar Posts