this indeed looks like a problem with the live videos, i assume due to some issue with the yt-dl that is being used by the media_extractor for “video/youtube” media_type.
probably media_extractor implementation in home-assistant should support also the “is_live” option - see this info:
"is_live (boolean): Whether this video is a live stream or a fixed-length video"
Hi @goprojojo - If i understand the normal youtube link is working but livestream isn’t. I used your config above and tried to play a video but it doesn’t seem to work. I have added a media_player configuration too. Is the above config correct? Should we add a media_extractor section in config?
The above config should still work and you need to include media_extractor too. Try to replace it with a non-livestream url, for example: https://youtu.be/cHHLHGNpCSA
Has there been any update on this? I was also wondering if you could get around this by just having home assistant display an internal HTML page to the chromecast with just a simple iframe to the live video embedded?
I set up CATT in my HA container (non-persistent, but easy enough to restore when necessery)
Came across this thread today trying to live-stream lo-fi hip-hip girl and the local news. Turns out CATT does this out of the box catt -d "My Room display" cast "https://www.youtube.com/watch?v=5qap5aO4i9A"
The only hassle is that I’m integrating this with HA via shell_command, and haven’t worked out how to pass service data to the command successfully. At this stage. I’m stuck using an individual command for each video, but that’s a pretty simple workaround.
I just tried the YAML I posted in the Developer Tools and it worked like a charm I would expect the same YAML to work in an automation by just calling that service as an action?
Sorry for not being very clear; the “app”-part was just what I understood from the Home Assistant documentation where I found how to do this It should not be important.
My problem was very similar, I wanted to make an alarm clock with a YouTube live show. My problem was that the id changed every day when I started the stream. For this Google has its YouTube api. I created a new sensor to get the live id and call it from the automation. I leave the code below:
I’m running into a new problem with casting live streams, it looks like the underlying pythin library casttube is not setting the correct Length header on one of its API calls resuling in the following erorr:
requests.exceptions.HTTPError: 411 Client Error: Length Required for url: https://www.youtube.com/api/lounge/pairing/get_lounge_token_batch