# chromecast and chromium not working out of the box



## puppyboy (Jan 8, 2018)

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?


----------



## aragats (Jan 8, 2018)

I don't think it works in FreeBSD's Chromium, Google used to have an add-on, but then they discontinued it.
I use https://github.com/xat/castnow.
Also I use a simple script to watch _youtube_ videos:
	
	



```
ARG=$1
if [ "x$ARG" = "xstop" ]
then
    curl -H "Content-Type: application/json" http://<CHROMCAST_IP_ADDRESS>:8008/apps/YouTube -X DELETE
    exit 0
fi
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.:
	
	



```
cast https://www.youtube.com/watch?v=HDBYFaRB5WI
```
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):
https://github.com/Pat-Carter/stream2chromecast
It supports many things including transcoding.


----------



## blackhaz (Jan 11, 2018)

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


----------



## aragats (Jan 11, 2018)

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


----------



## cpm@ (Jan 21, 2018)

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



http://openports.se/commit_files.php?messageId=09915a1c315145c2@openbsd.org


----------



## tingo (Jan 24, 2018)

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


----------



## cpm@ (Jan 28, 2018)

tingo said:


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



I added these patches to enable Chromecast in chromium 63:

https://github.com/gliaskos/freebsd-chromium/pull/103


----------

