https://gmt4.github.io/mpvc/ @gmt4 mpvc * about A minimal mpc CLI and TUI for controlling mpv. * tags cli music-player terminal minimal mpv tui media-player mplayer posix-sh mpv-player mpvc mpvc-tui * goodies Support for TUI, CLI, manage/play URLs to youtube and other music streaming services * github https://github.com/gmt4/mpvc/ * wiki https://github.com/gmt4/mpvc/wiki/ * discussions https://github.com/gmt4/mpvc/discussions/ * promote star, share, and promote our work through the buttons below if you find it useful. Star Follow @gmt4 Download Watch Discuss --------------------------------------------------------------------- mpvc screenshots mpvc-tui screenshot --------------------------------------------------------------------- mpvc quickstart git clone https://github.com/gmt4/mpvc/ mpvc/mpvc add /path/to/your/*.mp3 # or your URLs mpvc/mpvc-tui --------------------------------------------------------------------- mpvc logbook The logbook below is just that, a log of notes as I use and work on mpvc-tui. Entries are chronologically ordered with oldest first, and, attempt to be self-contained focused on a certain functionality/ topic, to the extent that it is possible. On playing URLs, Wed 30 Mar 2022 What got me started on using mpvc is being able to play URLs. This is the cause to start writing what you are reading now (this repo at https://github.com/gmt4/mpvc/) On securing mpv socket location, Mon 14 Nov 2022 One thing that bothers me when using mpvc, is that most programs performing ipc on mpv socket, just leave the socket at /tmp/ mpvsocket. A better default location for the mpv socket is $HOME /.config/mpvc/mpvsocket On load/save functionality, Fri 18 Nov 2022 A thing that I'd like to be able to do is to perform mpvc load/save of the playlist, and, be able of manipulating the playlist using standard Unix commands eg. grep. The easiest way that comes to mind, is something a la: mpvc save | grep -v artist | mpvc load. This enables to filter out an artist, and drop all the songs by this artist. On persistent mpv startup, Sun 20 Nov 2022 One particular feature where improvement could be done mpvc -a audio.opus, when mpv finishes playing audio.opus, mpv terminates, and, the current playlist is lost. This happens as mpv is started with --idle=once. A solution for this is to start mpv separately with --idle=yes. A shortcut for this is to run `mpvc --mpv` that does exactly this, after this the mpv instance can be manipulated with mpvc, and does not terminate once mpv finishes playing. On a minimal mpvc-tui, Sat 03 Dec 2022 One thing I keep doing a lot, is typing mpvc status and mpvc -i, to check the mpv playlist and status. To this end I've quickly hacked a minimal TUI https://github.com/gmt4/mpvc/blob/master/mpvc-tui, that continuously shows the mpvc playlist & status. In addition, while in mpvc-tui you can Control+C, to get a mpvc prompt to run quick mpvc commands, like: prev, next, pause, toggle, seek, volume, etc. On using the mpvc-tui prompt, Wednesday 13 Dec 2022 As explained above, mpvc-tui does three things: 1) display status, 2) display playlist, 3) prompt the user for interaction. Once we hit Control+C, and land on the user prompt, the following can be done: 1. run mpvc commands starting with "mpvc". This allows for manipulating the mpv/mpvc status. The commands run with "mpvc" have QUIETFLAG=true set, to not clutter the mpvc-tui. 2. run shell commands internally starting with "!". This allows for commands that manipulate mpvc-tui program, such as changing the working directory, with cd/pwd. This also allows for starting your favorite editor to configure the mpvc-tui look and feel with: "!$EDITOR $MPVC_CONFIG". 3. run shell commands externally starting with "!!". This allows for running commands on a separate shell. This gives room for more complex commands, like starting alsamixer to manipulate audio levels, change outputs with `pactl(1)`, etc. 4. quit the mpvc-tui, by typing quit, exit, or "q". When using the mpvc-tui prompt for some time, one notices that there's a lot of repetition of commands. To address repetition, one solution is to use a history file of past commands, and completion of commands & filenames. This can be achieved using `rlwrap(1)` in one shot mode that becomes a life-saver. Now, you get a more comfortable prompt, where TAB completion works on commands and filenames, as well as Control+R to repeat previous commands in the history file. On using the mpvc-tui -x launcher, Thursday 14 Dec 2022 Another nifty detail of mpvc-tui, is that it can be quickly spawn from the WM launcher by using `mpvc-tui -x`, then type a few mpvc commands to setup music, and close it. Or it can be started on the current terminal with `mpvc-tui` and left running as a long running program, and get back to it when needed. On managing playlists with mpvc autoload/autosave, Thursday 15 Dec 2022 When using `mpc(1)`, playlists can be managed using the mpc load/save /lsplaylists commands. In addition to load/save, mpvc adds the autoload/autosave commands: * mpvc autosave: save the current playlist to $XDG_CONFIG_HOME/mpvc /playlist/. If no arguments are provided the current playlist is named "$(date -Imin)". Otherwise, if a name is given "mpvc autosave ambient.m3u", then the file is saved as "ambient.m3u" * mpvc autoload: loads the named playlist from $XDG_CONFIG_HOME/ mpvc/playlist/. * mpvc lsplaylists: list the playlists under $XDG_CONFIG_HOME/mpvc/ playlist/. The above enables to arrange a playlist, and once we are happy with it, save it with `mpvc autosave playlist.m3u`, later, we can replay it again with: `mpvc autoload playlist.m3u`. On customizing mpvc-tui look and feel, Friday 16 Dec 2022 While using mpvc-tui, one ends up wanting to configure the minimal look and feel that mpvc-tui provides. To this end the file mpvc-tui.conf under $XDG_CONFIG_HOME/mpvc/playlist/ provides a place to overwrite the look and feel default settings of mvpc-tui. have a Show HN: mpvc-tui, A minimal mpc-like cli and tui for mpv., Friday 16 Dec 2022 We are on "Show HN"! https://news.ycombinator.com/item?id=34013150