www-gem words

Online videos platforms in your terminal: ytfzf

Published on

cli The definition of ytfzf given by its developer is that it is “a POSIX script that helps you find Youtube videos (without API) and opens/downloads them using mpv/youtube-dl”. And that’s actually only the short version of what ytfzf is.

╭── Some tools deserve more visibility

I’ve first heard about ytfzf on Mastodon. I’ve tried to look for who brought it to my attention but couldn’t find that so please give me a sign if you read that so I can at least cite your name here. Anyway, when this person mentions another tool to search Youtube videos in the terminal I was skeptical due to some previous attempts but because I’m curious (and I had time to spare) I decided to give it a try. First look at the github page, my impressions were so-so. Based on the very minimal information, I felt like either this tool could be awesome or just a crap. I still decided to install it (it took 10 seconds to do so and 3 more to remove it if I wouldn’t have like it) and I took a quick look at the manpage. At that point, I realized that ytfzf will be awesome and even more capable than I will need but more is better than less I guess…

╭── It’s not only Youtube and it’s really in your terminal

Sometimes titles make overstatement to appeal to the readers but ytfzf literally brings Youtube in your terminal (while losing the ads in the process ^^).

This tool allows you to:

╭── Great power comes with great responsibilities

For that reason, I will let you check the extremely well written manpage(s) of ytfzf

ytfzf(1) ytfzf(5)

For example, here are the config parameters I use:

video_pref="137+bestaudio/271+bestaudio/best" # codes can be found with the command yt-dlp -F VIDEO_URL

sub_link_count=5 # number of videos per channel for subscriptions

thumbnail_viewer=ueberzug # you can also use chafa, chafa-16, chafa-tty
                          # catimg,catimg-256
                          # imv
                          # mpv
                          # kitty
                          # swayimg
                          # swayimg-hyprland
                          # additional viewers can be put into $YTFZF_THUMBNAIL_VIEWERS_DIR

fzf_preview_side=right

thumbnail_quality=high

pages_to_scrape=3 # number of pages to retrieve from the online videos platform(s)

keep_cache=0

ytdl_path=/usr/bin/yt-dlp

external_menu () {
    rofi -dmenu -p ""
} # use rofi when the -D flag is used in the ytfzf command

So that’s it. If you get enough opening your web browser (or an additional tab) just to watch a video, if you want to increase the diversity of your sources, if you want to easily download a video, or if you’re tired of the ads, then give ytfzf a try ! You’ll probably won’t regret it.


Thanks for your read. Hope it's been useful to you.


Interact with this post using Mastodon or

Comment on wwwgem's post

Copy and paste this URL into the search field of your favourite Fediverse app or the web interface of your Mastodon server.

✄ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈

More food for thoughts? Check other posts about: #Cli