Git Product home page Git Product logo

mpvc's Introduction

GitHub GitHub Release Date GitHub release (latest by date) GitHub top language GitHub lines of Code

mpvc 🎧

An mpc-like control interface for mpv with a nearly complete compatibility layer for mpc commands in addition to GNU style arguments. This forks lwillets/mpvc providing some extra goodies such as: improved CLI, TUI, FZF & playing media from YouTube & streaming services. Check the Wiki & Casts for a detailed view of the extra features of this fork.

QuickInstall ▶️

mpvc-installer fetch-user: installs mpvc under BINDIR=~/bin/

curl -fsSL -o mpvc-installer https://github.com/gmt4/mpvc/raw/master/extras/mpvc-installer && sh ./mpvc-installer fetch-user

QuickStart

 # fetch a local copy of the github repo
 git clone https://github.com/gmt4/mpvc/
 # use extras/mpvc-installer: just copy/link to your $HOME/bin
 (cd mpvc; extras/mpvc-installer link-user)

 # use mpvc-fzf to search and play youtube media
 mpvc-fzf -p kupla mirage
 # use mpvc to add/load/save media files or online YT URLs
 mpvc add /path/to/your/*.mp3 # or your URLs
 find . -type f -name | mpvc load
 mpvc save my-playlist

 # use mpvc-fzf to manage the playlist
 mpvc-fzf -f
 # use mpvc-tui to start the tui + desktop notifications
 mpvc-tui -T

Screenshots

mpvc-tui -T: running the mpvc TUI

mpvc-tui -T screenshot

mpvc-fzf -f: running with fzf to manage the playlist

mpvc-fzf screenshot

mpvc-tui -n: running with mpvc-fzf and desktop notifications on the upper-right corner

mpvc tui+fzf+notifications screenshot

Dependencies

Required:

  • mpv
  • socat: is recommended due to the differing implementations of netcat across UNIXes.
  • awk: a sane version of awk is recommended

Recommended extras:

  • curl
  • fzf
  • notify-send

Install

To install mpvc:

Distro packages:

  • Arch Linux package: pacaur -y mpvc-git mpvc-git
  • Gentoo Linux package: emerge mpvc mpvc
  • Nix package: nix-env -i mpvc mpvc

Usage

mpvc requires the use of mpv and its --input-ipc-server option.

mpvc automatically opens an ipc-server for you when adding files to be played, but by default will close the ipc-server when all files have finished playing.

To keep the ipc-server open permanently, use:

$ mpv --input-ipc-server=/tmp/mpvsocket

You can also specify the default ipc server in your $XDG_CONFIG_HOME/mpv.conf which will make the most recent mpv instance you start be controllable via mpvc:

input-ipc-server=/tmp/mpvsocket

However, this may not be suitable if you have background music added to the socket and then open a video using mpv. The new mpv instance will be controllable through the socket, but the previous instance is not. You can get around this by adding the video via mpvc, and manually switching to the video.

Useful Tricks

Some basic tricks are provided in QuickStart. For more tips on loading/saving/maniputaling the mpv playlist/state, managing av/vf filters, etc. are provided in the LogBook.

  • Hotkey daemons like sxhkd can be used to bind mpvc commands to key combinations. Alternatively check your window manager documentation on how to bind keys to commands.
  • Any URL that can be played using mpv can be added to the playlist, e.g. using mps-youtube with player set to mpvc and playerargs set to add.
  • mpvc executes faster ~4x faster when using dash symlinked to /bin/sh instead of bash. Another faster alternative is mksh.
  • mpvc should be fully POSIX compliant, meaning it should run on any UNIX-like variant. Please report an issue if you experience trouble.

Limitations

Like any piece of software, mpvc is not perfect:

  • mpvc does not resolve individual files in a directory unless it is currently in or has been inside that directory, giving misleading results about the total number of files in the current playlist. This is a limitation of mpv.
  • mpvc depends on shell tools. If your shell is misconfigured or you are using unusual variants of basic UNIX tools, mpvc is not guaranteed to work. However, all effort has been made to make mpvc as POSIX compliant as possible.

Check out the Issue Tracker for further improvements to be made.

mpvc's People

Contributors

gmt4 avatar lwilletts avatar heckendorfc avatar woorst avatar awan avatar bricewge avatar wildefyr avatar neeasade avatar gergesh avatar l-acs avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.