Home

Awesome

mpvf

<img src="https://raw.githubusercontent.com/purarue/mpvf/master/.github/demo.gif">

Interface to select a youtube-dl format for streaming stuff with mpv.

If you select a format with video only, automatically adds 'bestaudio' to the format.

Usage: mpvf URL [OPTION]...
Interface to select a youtube-dl format for streaming stuff with mpv.

Pass the URL to stream from as the first argument.
Additional options/arguments are passed onto mpv.

You can set the MPVF_DL environment variable to download
the selected format code instead, like:
MPVF_DL=1 mpvf https://... [youtube-dl OPTION...]

You can set the MPVF_PICKER environment variable to use dmenu/rofi instead of fzf:

export MPVF_PICKER=rofi
mpvf 'https://...'
export MPVF_PICKER=dmenu
mpvf 'https://...'

Installation

Dependencies: mpv, youtube-dl, fzf (or specify dmenu/rofi as alternative)

Install each dependency if not already installed and then download/copy mpvf to somewhere on your $PATH

Could also use basher:

basher install purarue/mpvf

Notes

If you want to stream just the audio, you can select the audio format, or pass the --no-video mpv flag.

I've further wrapped this script as well:

Manual Install

wget https://github.com/purarue/mpvf/raw/refs/heads/master/mpvf
chmod +x ./mpvf
sudo mv ./mpvf /usr/bin/