Cast media to ChromeCast
Last update
2020-04-06
2020
04-06
« — »

This post covers the simple usage of go-chromecast:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# install
go get -u github.com/vishen/go-chromecast

# list devices
go-chromecast -i eth0 ls

# cast a video
go-chromecast -i eth0 -n Chromecast load sample.mp4 &
go-chromecast -i eth0 -n Chromecast ui   # ncurses ui
go-chromecast -i eth0 -n Chromecast stop

# show a single image
go-chromecast -i eth0 -n Chromecast load sample.jpg &
go-chromecast -i eth0 -n Chromecast stop

# images slideshow
go-chromecast -i eth0 -n Chromecast slideshow *.jpg --duration=3 --repeat=false &
go-chromecast -i eth0 -n Chromecast ui   # ncurses ui
go-chromecast -i eth0 -n Chromecast stop

# play a single music file
go-chromecast -i eth0 -n Mini load sample.mp3 &
go-chromecast -i eth0 -n Mini stop

# play multiple music files
go-chromecast -i eth0 -n Mini playlist *.mp3 &
go-chromecast -i eth0 -n Mini ui   # ncurses ui
go-chromecast -i eth0 -n Mini stop

# start the playlist with UI and by selecting the first file to play
go-chromecast -i eth0 -n Mini playlist *.mp3 --with-ui --select