Live data from Hacker News

Show HN: Control Chromecasts from Linux

github.com

61–70 of 74 posts

Re: Show HN: Control Chromecasts from Linux

#61
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

Isn't there a workaround to get Chromecast to accept user changes in DNS settings. Maybe use DHCP on the user's router to suggest user-chosen DNS servers. I have forgotten. The big show stopper with Chromecast is that Google makes it difficult for the user to set their own DNS servers. As I recall, with the early Chromecast models, users could replace the Google OS with a modified one that let users choose their own DNS servers. One technique used a Teensy. Subsequent Google updates I believe closed off that option.

Re: Show HN: Control Chromecasts from Linux

#62
OT, but i had an idea yesterday... will explain in UX language: would it be possible to send video to chromecast-like device and 'leave sound on mobile device' to be able to listen on bluetooth connected headphones while watching on big screen?

Re: Show HN: Control Chromecasts from Linux

#63
post #62

OT, but i had an idea yesterday... will explain in UX language: would it be possible to send video to chromecast-like device and 'leave sound on mobile device' to be able to listen on bluetooth connected headphones while watching on big screen?

That would be cool. Roku boxes actually come with a headphone jack in the remote so you can do just that (but not through bluetooth).

Re: Show HN: Control Chromecasts from Linux

#64
post #62

OT, but i had an idea yesterday... will explain in UX language: would it be possible to send video to chromecast-like device and 'leave sound on mobile device' to be able to listen on bluetooth connected headphones while watching on big screen?

I've thought about the same thing, but I don't think it's feasible because you essentially need to play the video in both places and ensure it stays in sync. The easy solution is to hook up a Bluetooth transmitted to your TV.

Re: Show HN: Control Chromecasts from Linux

#65
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

Thanks for your work on pychromecast, I've looked and it's the best supported library for working with Chromecasts out there. It was also pleasant to integrate into this project.

Does the pychromecast project use semantic versioning? I've had to pin the library to a specific version after running into an API breaking change on what would be a minor or patch update to 7.X if the project used SemVer.

Re: Show HN: Control Chromecasts from Linux

#66
post #5

Earlier quoted context omitted.

VLC has a native client afaik. Edit: included since v3.0 https://www.videolan.org/developers/vlc-branch/NEWS

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.

I opened a bug report[1] regarding this issue a few days ago if you'd like to leave a comment.

[1] https://trac.videolan.org/vlc/ticket/25116

Re: Show HN: Control Chromecasts from Linux

#67

This is nice, I've been using catt mapped to the media keys via the native window manager shortcuts, but this seems easier to set up.

I do something similar with chromecast_mpris. I have my media keys mapped to Plasma's Media Controller, which uses MPRIS in the background. Works well for me, and you don't have to wait for catt to launch and find your Chromecast each time.

Re: Show HN: Control Chromecasts from Linux

#68
post #3

I can't tell from this project's readme how to actually play things. It has an instruction for connecting to your chromecast...ok, and then what? In the past I've used https://github.com/keredson/gnomecast which is a standalone simple media player that transcodes if needed and streams to my Chromecast. Thoughts on what this provides that's better?

While you have chromecast_mpris running, you can use an MPRIS client to issue the OpenUri method[1]. Here's an example:

    $ export URL="http://ccmixter.org/content/gmz/gmz_-_Parametaphoriquement.mp3"
    $ playerctl -p My_Chromecast open "$URL"
This will cast a song to the Chromecast named "My_Chromecast". I forgot that OpenUri was implemented in the project because I typically cast from other devices and programs, but I'll include it in the README.

> Thoughts on what this provides that's better?

People tend to use catt or castnow to cast from the command-line. I wrote about using VLC to cast to the Chromecast[2], but I wouldn't recommend it unless you're watching something that you need VLC for.

[1] https://specifications.freedesktop.org/mpris-spec/2.2/Player...

[2] https://alexdelorenzo.dev/linux/2020/03/14/pipes

Re: Show HN: Control Chromecasts from Linux

#69

Title says 'from Linux', but the README says 'Linux / *BSD / macOS' under 'Requirements'. How would this work on macOS?

> How would this work on macOS?

Theoretically it should work if you're able to get D-Bus working on macOS. D-Bus is usually a Linux thing, but it's been ported to other platforms. macOS isn't included in the title because most macOS users don't have D-Bus installed.

I included instructions here[1] with URLs to the macOS versions of D-Bus and PyGObject. I'd be interested in whether you're able get it working.

[1] https://github.com/alexdelorenzo/chromecast_mpris#requiremen...

Re: Show HN: Control Chromecasts from Linux

#70
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.

Open the website ?

What I would like to do is flip youtube videos or whatever on my phone and cast to the monitor, which is 6 feet from the couch... an impassable barrier as I'm sure you'll agree.
Post reply on HN