Hacker News new | ask | show | jobs
by liability 2102 days ago
If you don't want a Google device on your LAN and are willing to put in a little bit more work for that, I've found that remotely controlling an instance of mpv over the JSON IPC interface works well for me. I can send it URLs from the web or paths to local files. My client for this isn't currently public, but it's a rather easy interface that some of you may find it easy enough to integrate into your other systems.

(Note that it only listens on a Unix socket. With socat you can redirect that to a TCP socket though, preferably listening on a wireguard interface to keep the rest of your LAN from accessing it, since there's otherwise no security.)

Definitely not for everybody, but perhaps suitable for some.

https://mpv.io/manual/master/#json-ipc

3 comments

If you haven't, you should check mpd (music player daemon). Lots of clients, works very well.
This is my preference as well! I even wrote an Android client app / Python server to control it from my phone.

https://github.com/mcastorina/mpv-remote-app

This looks useful and to the point. Would you consider submitting it to f-droid?
Maybe it's late and I am misunderstanding ... Why would one not want a Google device on their LAN?

Isn't a Chromecast very different than controlling locally stored media files, i.e. you can stream YouTube, Netflix, Spotify, mirror your devices (laptop), etc on Chromecast but not your solution?

mpv plays youtube links and many other websites (although not netflix or spotify to my knowledge) using the excellent youtube-dl. For my purposes it is more than sufficient, but as I said it won't be for everybody.

As to why I don't want google devices on my LAN, I'm sure you could already guess that the answer is the usual privacy/political concerns, which I'll not bore you with since you obviously don't care. There are however some practical benefits to my arrangement, particularly being able to play media served up by NFS (DLNA never gave me anything but grief and unreliability.) Furthermore youtube-dl supports a very long tail of sites that Chromecast doesn't (at least not without the jank of screen mirroring, which AFAIK only works for as long as the laptop being mirrored is turned on.)