erkstruwe / chromecast-cli Goto Github PK
View Code? Open in Web Editor NEWCommand line interface for Google Chromecast
Command line interface for Google Chromecast
Chromecast has a YouTube app, which can play youtube videos (without needing to extract the url with youtube-dl)
https://www.npmjs.com/package/castv2-youtube
could this be added?
Hi,
I tried to cast a simple video from my local by doing:
chromecast --host 192.168.0.48 play ./myvideo.mp4
However the only thing displayed is a black screen with a blue cast logo. (The one you have when a video is finish)
here is the status of my Chromecast
I tried to cast with another CL tool (catt) and it works fine.
Is there anything i missed?
Working on Windows
Thanks
In the command line parameters for this utility:
-H, --host <host> IP address or hostname of Chromecast (required)
Hardcoding the IP address works just fine, but I am unable to get the 'hostname' option to work for me:
darren@penguin:~$ /usr/local/bin/chromecast --host 192.168.4.35 play http://192.168.5.45:8000/test.mp3
Playing http://192.168.5.45:8000/test.mp3
Status IDLE
darren@penguin:~$ /usr/local/bin/chromecast --host "Downstairs Speaker" play http://192.168.5.45:8000/test.mp3
Client error Error: getaddrinfo ENOTFOUND Downstairs Speaker
at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26) {
errno: -3008,
code: 'ENOTFOUND',
syscall: 'getaddrinfo',
hostname: 'Downstairs Speaker'
}
Using another utility to show the addresses/names of my Chromecast devices:
darren@penguin:~$ catt scan
Scanning Chromecasts...
192.168.4.34 - Downstairs Google TV - Google Inc. Chromecast
192.168.4.35 - Downstairs Speaker - Google Inc. Google Home Mini
192.168.4.74 - Downstairs TV - KaonMedia KSTB2100
192.168.4.26 - Kitchen Speaker - Google Inc. Google Home Mini
192.168.4.73 - Kitchen TV - KaonMedia KSTB2100
Am I misunderstanding how this is intended to function? Thanks!
Thanks for this! I found a way to play YouTube videos as well, using youtube-dl
to get the raw URL:
chromecast-cli -f bestaudio --host $IP play (youtube-dl --get-url 'https://www.youtube.com/watch?v=WI4-HUn8dFc')
I thought some might find it useful. I use -f bestaudio
because I my cast device is audio only
Is there a way to play a local file from this utility -- rather than from a URL?
darren@dell3010:~$ chromecast --host 192.168.4.35 play nosuchfile.mp3
Playing nosuchfile.mp3
Status IDLE
The file 'nosuchfile.mp3' doesn't actually exist, yet the messages make it appear as though it has found the file and successfully played it.
Warnings installing on my current LMDE system:
darren@dell3010:~$ sudo npm install -g chromecast-cli
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: '[email protected]',
npm WARN EBADENGINE required: { node: '>=18', npm: '>=10' },
npm WARN EBADENGINE current: { node: 'v18.19.0', npm: '9.2.0' }
npm WARN EBADENGINE }
changed 25 packages in 5s
I note that this does not (?) appear to prevent installation of 'chromecast-cli'.
First of all, great work on this project, works right away without issues. What I was wondering: I have multiple Nest Audio speakers around my house. I have been able to have them stream the same url, but these are not synchronized. I was wondering if it's possible to stream to the speaker group instead of each speaker individually.
Ubuntu 16.04 x86
When I run:
chromecast --host 192.168.1.100 status
I am getting:
/usr/bin/env: ‘node\r’: No such file or directory
Could you please add a pause command to the command list.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.