How to get my .mp4 files to play on my Chromecast

So I have a couple of .mp4 files on my network drive that I would like to send to my Chromecast. I was not able to achieve this in the following script. My Chromecast would start and seem to load but no video was ever started:

sequence:

Now I’ve installed Plex on my Pi and I’ve successfully mapped my network drive and the videos are in the Plex library. Now I want to have a script that sends a specific video in my Plex library to my Chromecast.

Is this possible?

Remember: If you load files bigger then a certain size, it will not load… So files bigger dan 2GB will not load…

I can’t get this thing to work :confused:

- service: media_player.play_media
        data:
          entity_id: media_player.tv
          media_content_id: https://hass-ip/local/d.mp4
          media_content_type: video/mp4 

the mp4 file itself is about 1mb, so it’s not an issue with the file size.

all that happens is that chromecast turns on, the cast icon appears and that it.

1 Like

Very interesting, where do you find the video file limitation ? Is it with testing ?

Does it have any other kind of limitation like resolution, duration … ?

Was an answer ever discovered for this? I seem to be in the exact same situation. I’m trying to play a local mp4 file stored on the Hass.io Pi on a chromecast.

@EricJH33 Found any solution to this? Would also like to get it to work.

Same thing here, what’s happening and how am I supposed to solve this?

Just guessing, have you tried “url” instead of video/mp4 in the media_content_type?