I found this cool post where someone created a script that plays a video over chromecast and sets the color of some lights:
They mentioned that they weren’t able to find out how to directly cast a YouTube video, so they downloaded the video and casted it from their device instead. I’d like to be able to directly cast a video from youtube.com (seems a lot easier than downloading videos and setting up a video server), so I’m wondering if anyone has been able to do this? With the media_player.play_media service, I tried many combinations of media_content_type and media_content_id, but never got it to play the URL video. The chromecast would change to the cast symbol, display a loading bar, and ‘load’, but nothing would play.
Sadly, I was never able to figure out how to do this. I’m hoping one day someone will post about doing this, but for now I’m looking for a work around.
Hey, know you’re looking for a chromecast option. I did it with my Roku and a curl request using their http services. Have not tried the following link yet for casting to chromecast from a command line, but might be worth a try: https://github.com/xat/castnow. If this works, set up a command line switch.