Show HN: mpvc-tui – A minimal mpc-like CLI and TUI for controlling mpv
gmt4.github.ioHi there, This is just a shameless self-plug about a personal project of mine:
"Using mpv and mpvc to play and manage the stuff I listen."
To that end I've forked the great https://github.com/lwilletts/mpvc and started hacking around, so far I've focused on: getting a minimal TUI working, improving the CLI, playing online music (eg. youtube and other streaming services), and bugfixes (including the introducing new ones).
The project is mainly developed, and, used under Debian/Ubuntu systems so expect the best results with these.What I expect from sharing in HN is:
- Letting people know about that might find it useful/interesting.
- Getting some feedback about things that I might have been missing.
- Being a personal project, that I use and develop, I've got no commercial interest, but I highly value if people find it useful and promote it.
If you are still reading, just head to https://gmt4.github.io/mpvc/
Thanks! This looks very neat. Thanks for sharing! mpv has been my favorite media player for years, and one of my favorite pieces of software, period. It's simple, gets out of my way, works beautifully across platforms, has some of the best documentation I've ever seen[1], and is very extensible. I wasn't even aware of mpvc, and your fork has some nice additions. Currently I'm using plain M3U playlists for both video and audio files. The default hotkeys and UI work fine, as I've found I don't have a need for a file or playlist manager, metadata editor, and all the fancy features popular audio players have. Any features I need, like scrobbling, can be easily added. I'm not sure if a TUI and mpc-like interface will drive me away from my current setup, but I'll definitely give it a try. Just came here to chime that I've been playing with mpv + fzf + notify-send, and as a result mpvc-tui has got now some cool fuzzy search + desktop notifications. I've included a bunch of screenshots showing the updates at: https://gmt4.github.io/mpvc/ Good to know, and thanks! I started using mpv recently, about year ago, and also found that mpv is simple, works, and the documentation has you covered. Note that the aim/need is not on providing a complete player/interface replacement, but on co-existing, and having an easy way to control the running mpv from the terminal, so if I'm working from the terminal I don't need to switch to the player window/terminal. One example of the above, is when you're listening music and want to filter the playlist to a specific artist. That's easy, just issue: "mpvc save | awk '/artist/' | mpvc load", then, the playlist is good and want to save it for later use: "mpvc autosave good.m3u", or the good part of the track starts at minute 34, so I can "mpvc time 34m".
For more complex uses, as applying audio/video filters to the running player, things like "mpvc cmd af toggle lavfi=[loudnorm=I=-16:TP=-3:LRA=4]" are possible.
The mpvc-tui covers a similar purpose: that last song/artist/section was good, what's the name?, start mpvc-tui and have a quick look at the playlist, or status. And as you say, I also found out that I didn't require much fancy from a media player, just a player that worked, and a bit of shell scripting to cater my needs. A TUI; the first thought: "Go or Rust"? The refreshing answer: shell and awk. Good one, I wondered the same, and decided that for a minimal TUI the shell was more than enough. I would have used Pascal :/ I use MPD and various network clients. I guess this is not for me? I'm unfamiliar with mpv, but then I don't get out much The MPD & its clients are quite more complete, providing features such as: media library, indexing, extended searches, tags. etc.
Instead mpvc is just a simple client that provides a mpc-like interface, and communicates with the mpv running on the same machine over a Unix Socket. So YMMV depending on how many MPD features you require. Doing IPC with mpv with JSON, sockets and partially undocumented values is a bit of a pain. Not sure that you should care though. That's definitely worth keeping an eye on, but actually its not that bad.
Take this with a grain of salt, as I only have a user view, not mpv developer. I consider the JSON IPC API quite stable, well documented through mpv(1) and https://mpv.io/manual/stable/. Almost every command-line option documented in mpv(1) is mapped 1:1 to the JSON IPC, so mpv(1) documents both the command-line, and, the JSON IPC.