chromecast and chromium not working out of the box



Thanks: 4
Messages: 50

So I replaced Linux with FreeBSD on my desktop finally (having previously run it only for my home server). It works well enough, except Chromium doesn't seem to detect my Chromecast (Nexus Player). I used Chrome+Linux previously and it worked fine, and my phone has no trouble casting either. My firewall is not enabled on the desktop at this time, and I'm not sure why it isn't working. Google seems to indicate that Chromium *should* be able to see a Chromecast. Is there anything special I need to do to make it work? special group permissions or something?


Aspiring Daemon

Thanks: 362
Messages: 924

I don't think it works in FreeBSD's Chromium, Google used to have an add-on, but then they discontinued it.
I use
Also I use a simple script to watch youtube videos:
if [ "x$ARG" = "xstop" ]
    curl -H "Content-Type: application/json" http://<CHROMCAST_IP_ADDRESS>:8008/apps/YouTube -X DELETE
    exit 0
curl -H "Content-Type: application/json" http://<CHROMCAST_IP_ADDRESS>:8008/apps/YouTube -X POST -d v=`echo $ARG | sed 's/.*v=\(.*\)/\1/'`
I saved it as ~/bin/cast, to play a youtube video just supply either a full URL or just a video id (after v=), e.g.:
or use cast stop to stop.
There is another useful project, I don't use it much though (just one script to control Chromcasts's volume):
It supports many things including transcoding.



Thanks: 21
Messages: 95

Doesn't work for me either. I have specifically installed FreeBSD on a machine to Chromecast a monitoring dashboard in the office. Nothing. Can't find the device. I'm on the same network. Castnow works fine though, but it can't cast a web site. If anyone has an idea how to Chromecast a web site from FreeBSD, I would really appreciate it! (Or, I swear, I'll install Linux!)


Aspiring Daemon

Thanks: 362
Messages: 924

multimedia/ffmpeg can capture the screen (if built with XCB option), e.g.:
ffmpeg -video_size 640x480 -framerate 18 -f x11grab -i :0.0 /tmp/output.mp4
Now I'd like to figure out a way to stream its output to Chromcast. It shouldn't be hard. I don't see any castnow's option to cast a local stream. Maybe it's easier to implement in stream2chromcast since it's written in Python (not in JS).


Staff member

Thanks: 925
Messages: 2,127

OpenBSD has recently added chromecast support:
Make Chromecast devices and casting work by doing several different things:

- The media router extension which handles chromecast is only enabled
on official Chrome builds so enable it on chromium as well.

- Our multicast implementation is a legacy one so patch it around
to make it work and use SO_REUSEADDR and SO_REUSEPORT on the socket
to make other clients able to bind to the same port and address so
that everything will work smoothly together and chromium will not
"block" the multicast ports.

- Enable a good amount of features that are used in the javascript extension
code that were only enabled for linux and used by the media router

Everything works from youtube casting, desktop casting to browser tab casting.
The only thing that does not work is the actual initial setup of the chromecast
device because that requires connecting to the device's wifi network and the browser
cannot do that on OpenBSD so another device has to be used for that, but I guess
everyone has a smartphone nowadays :)



Thanks: 342
Messages: 1,871

Now that is interesting. I wonder how hard it would be to get that working with the FreeBSD port of Chromium...