LinuxCommandLibrary

ytfzf

Search and play YouTube videos from terminal

TLDR

Search for videos on YouTube with thumbnail previews

$ ytfzf --show-thumbnails [search_pattern]
copy

Play only the audio of the first item in a loop
$ ytfzf --audio-only --auto-select --loop [search_pattern]
copy

Download a video from the history
$ ytfzf --download --choose-from-history
copy

Play all the music found in a search
$ ytfzf --audio-only --select-all [search_pattern]
copy

See the trending videos in an external menu
$ ytfzf --trending --ext-menu [search_pattern]
copy

Search on PeerTube instead of YouTube
$ ytfzf --peertube [search_pattern]
copy

SYNOPSIS

ytfzf [options] [search query]

PARAMETERS

-h, --help
    Show help message and exit.

-u, --update
    Update ytfzf.

-l, --local
    Use local cache.

-p, --player
    Specify a video player (e.g., mpv, vlc).

-d, --debug
    Output debug information

DESCRIPTION

ytfzf is a command-line tool that allows you to browse and play YouTube videos from your terminal using fzf, a fuzzy finder. It provides a convenient and efficient way to search, filter, and select YouTube videos without needing to open a web browser. ytfzf leverages youtube-dl or yt-dlp to extract video information and fzf for the interactive selection process. After selecting a video, ytfzf can play it using a media player like mpv, or vlc.

It's a powerful tool for users who prefer a terminal-based workflow and want a quick and customizable way to interact with YouTube content. ytfzf is highly configurable, allowing users to customize the search queries, video player, and other settings. It's also scriptable, making it suitable for integration into other command-line workflows.

CAVEATS

Requires fzf, youtube-dl (or yt-dlp), and a media player (e.g., mpv, vlc) to be installed.

CONFIGURATION

ytfzf is highly configurable. Most configurations can be done setting environment variables which gives a great flexibility when integrating with other tools.

EXAMPLES

  • Search YouTube for 'Linux': ytfzf Linux
  • Search using a specific player: ytfzf -p vlc Linux
  • Update ytfzf: ytfzf -u

SEE ALSO

fzf(1), youtube-dl(1), yt-dlp(1), mpv(1)

Copied to clipboard