Skip to content

Termux How To

Euro20179 edited this page Jul 22, 2022 · 2 revisions

This is a simple how-to guide on making ytfzf work well on Termux.

  1. Install ncurses-utils, and fzf
    • If you want thumbnails, there are not a lot of options on mobile, the best being chafa
  2. There a few options for this step
    1. Option 1: Install a special patch of mpv-android, located on this issue on mpv-android, the direct download link is here
      • Make sure the regular version of mpv-android is not installed
      • This patch allows for mpv to play youtube videos directly.
      • See using mpv-android
    2. Option 2: use vlc see Using vlc
    3. Option 3: skip to alternative player function

Using mpv-android

  1. Open mpv, go to three dots top right->Settings->Advanced->Install/Update youtube-dl and select Install and choose yt-dlp

  2. in ~/.config/ytfzf/conf.sh add these lines

termux_player () {
    am start --user 0 -a android.intent.action.VIEW -d "$1" is.xyz.mpv/.MPVActivity
}
url_handler=termux_player

Using vlc

  1. Download vlc.
  2. in ~/.config/ytfzf/conf.sh add these lines
termux_player () {
    am start -a android.intent.action.VIEW -d "$1" org.videolan.vlc/.StartActivity
}
url_handler=termux_player

Alternative Player Function

This function opens the video in your youtube app of choice, eg: new pipe or just the default youtube

termux_player () {
    termux-open "$1"
}
url_handler=termux_player

Credits

Thanks to @stl3 for explaining this in this comment

Clone this wiki locally