Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/seanbreckenridge/mpvf
Interface to select youtube-dl format for streaming stuff with mpv
https://github.com/seanbreckenridge/mpvf
audio cli fzf fzf-scripts mpv mpv-script video youtube-dl
Last synced: about 1 month ago
JSON representation
Interface to select youtube-dl format for streaming stuff with mpv
- Host: GitHub
- URL: https://github.com/seanbreckenridge/mpvf
- Owner: seanbreckenridge
- License: mit
- Created: 2020-04-12T03:49:39.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-04-29T21:03:33.000Z (5 months ago)
- Last Synced: 2024-06-30T13:37:20.392Z (3 months ago)
- Topics: audio, cli, fzf, fzf-scripts, mpv, mpv-script, video, youtube-dl
- Language: Shell
- Homepage:
- Size: 12.7 MB
- Stars: 13
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-mpv - mpvf - Select youtube-dl format for streaming. (Streaming)
README
# mpvf
Interface to select a `youtube-dl` format for streaming [stuff](https://ytdl-org.github.io/youtube-dl/supportedsites.html) 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`:
```bash
export MPVF_PICKER=rofi
mpvf 'https://...'
export MPVF_PICKER=dmenu
mpvf 'https://...'
```### Installation
Dependencies: [`mpv`](https://mpv.io/), [`youtube-dl`](https://ytdl-org.github.io/youtube-dl/index.html), [`fzf`](https://github.com/junegunn/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`](https://github.com/basherpm/basher):
```bash
basher install seanbreckenridge/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:
- bound to different keybinds:
- [grab URL from my clipboard and stream using `mpvf`](https://sean.fish/d/stream-media?redirect)
- or, grab the URL and [just stream audio](https://sean.fish/d/stream-audio?redirect)
- or, grab the URL and [stream video](https://sean.fish/d/stream-corner?redirect), stickying the video in the bottom right of the screen ('picture in picture'-like), using [this](https://sean.fish/d/i3-picture-in-picture?redirect)
- have other related variations; to grab the URL and [stream at different resolutions](https://github.com/seanbreckenridge/dotfiles/blob/9da260bd6610dbbe5ff90b6bea54cfba48bd505a/.config/shortcuts.toml#L509-L562), often called from my RSS reader
- [`twitch`](https://github.com/seanbreckenridge/dotfiles/blob/2cf8b8d6e5901e3a099cfafb925a72ba1e40504a/.local/share/shortcuts/twitch-stream): streams a twitch stream using `mpvf`. See [this blog post](https://sean.fish/x/blog/how-i-watch-twitch/) for more context.
- [`mediaproxyvideo`](https://github.com/seanbreckenridge/vps/blob/11df5cba6b9d7016b42b817de48e3b16f5ce9ecb/bin/mediaproxyvideo): mostly a copy of `mpvf`, which prompts me to select a format, `ssh`'s onto my server, `youtube-dl`/`ffmpeg`'s that video onto my server, and copies the public link its hosted on onto my clipboard.