Live data from Hacker News

Show HN: Control Chromecasts from Linux

github.com

51–60 of 74 posts

Re: Show HN: Control Chromecasts from Linux

#51
post #30
post #14

Author of pychromecast here, the underlying library that this project uses to control the Chromecast. I wrote this lib initially for use in Home Assistant, https://www.home-assistant.io For Home Assistant I made a rule that all device drivers are stand-alone Home Assistant agnostic Python packages. That way more projects can use it. Glad to see that strategy is working out and it powering projects like this

It would be incredible if there was a way to use mpsyt to watch Youtube videos with your library.

It's possible if you hook something running Kodi up to your TV.

Here's some example code I wrote, in the form of a few ZSH shell scripts:

https://github.com/chbarts/kodi-command-line

The logic should port nicely to other languages. In particular, it shows how to do things like playing a YouTube video using either the URL or just the hash, plus, of course, a way to play videos on the computer you're running the commands from.

Re: Show HN: Control Chromecasts from Linux

#53
post #49

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.…

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.)

Re: Show HN: Control Chromecasts from Linux

#54
post #40

Shameless threadjack: does anyone know a way to cast _to_ a linux or windows desktop? We use chromecast on all our entertainment video monitors, but sometimes I would like to hang on the couch in my office and cast a video to my desktop monitor.

Discord screenshare :)

Re: Show HN: Control Chromecasts from Linux

#55
post #14

Author of pychromecast here, the underlying library that this project uses to control the Chromecast. I wrote this lib initially for use in Home Assistant, https://www.home-assistant.io For Home Assistant I made a rule that all device drivers are stand-alone Home Assistant agnostic Python packages. That way more projects can use it. Glad to see that strategy is working out and it powering projects like this

It's always awesome to see early, potentially unfruitful decisions workout in a project.

Re: Show HN: Control Chromecasts from Linux

#56
post #40

Shameless threadjack: does anyone know a way to cast _to_ a linux or windows desktop? We use chromecast on all our entertainment video monitors, but sometimes I would like to hang on the couch in my office and cast a video to my desktop monitor.

Maybe scrcpy is enough for you.

https://github.com/Genymobile/scrcpy

If opening a browser tab is all you need any tab syncing app / service will do. I use kdeconnect / gsconnect so I don't have to rely on a 3rd party service, Google and Mozilla included.

Re: Show HN: Control Chromecasts from Linux

#57
post #4

Thanks for this, I can't wait to test it out. Are there other ways to control chromecasts from Linux? I used to be able to cast straight from Chromium, but that hasn't worked for me in at least a couple years.

https://rafostar.github.io/gnome-shell-extension-cast-to-tv/ has worked well for me so far

Re: Show HN: Control Chromecasts from Linux

#58
post #14

Author of pychromecast here, the underlying library that this project uses to control the Chromecast. I wrote this lib initially for use in Home Assistant, https://www.home-assistant.io For Home Assistant I made a rule that all device drivers are stand-alone Home Assistant agnostic Python packages. That way more projects can use it. Glad to see that strategy is working out and it powering projects like this

Thank you for the library, but I wish you paid more attention to the backwards compatibility and didn't break it that often. The unannounced changes recently broke mkchromecast twice in different ways.

Re: Show HN: Control Chromecasts from Linux

#59
post #14

Author of pychromecast here, the underlying library that this project uses to control the Chromecast. I wrote this lib initially for use in Home Assistant, https://www.home-assistant.io For Home Assistant I made a rule that all device drivers are stand-alone Home Assistant agnostic Python packages. That way more projects can use it. Glad to see that strategy is working out and it powering projects like this

Thank you for the library, but I wish you paid more attention to the backwards compatibility and didn't break it that often. The unannounced changes recently broke mkchromecast twice in different ways.

By the way, even the pychromecast examples broke with those updates. Very frustrating to see as a 1) user of mkchromecast, 2) user of pychromecast, 3) maintainer of both in Debian

Re: Show HN: Control Chromecasts from Linux

#60
post #41

Earlier quoted context omitted.

The VLC client is "barebones" - even simple functionality like adjusting the volume is missing. If the network connection drops, the chromecast stops playing (regular chromecast would continue). There is no support for subtitles, alternate audio/video tracks, audio effects, video playback speed, or pretty much anything else. Seeking is supported tho, as are audio-only files.

> If the network connection drops, the chromecast stops playing (regular chromecast would continue) How would you expect the video bits to get from the machine running VLC to the chromecast if the network drops? Not sure what you mean by "regular chromecast", but if the network connection between the chromecast and the video source is lost, you lose playback. That's true if you're watching YouTube videos or Netflix,…

Most services (like YouTube, Netflix, etc.) transfer data direct from their servers to your Chromecast, without your phone or laptop in the loop for anything more than a remote control. It means you can start Netflix running for the kids from your phone and then go out to run an errand and it will keep playing.

VLC could do that for network sources. Even for a local file source, it could copy the whole file over - the Chromecast has a decent amount of RAM.

Post reply on HN