The Video equivalent of MP3

Using cast-web-api and Sharptools rules I have got my system to play an mp3 that I have on my Google drive when a sensor is triggered, it basically plays a lion roar in the back garden if the Foxes come in, is it possible to get the system to play an MP4? or even a GIF?
The plan is this, at the moment at 11pm the system checks all the locks then plays a variable on my Google display that says all doors locked etc etc, but can I get it play an MP4 instead?

1 Like

From what I can tell, the underlying Google Cast API supports playing MP4s*

*Note that MP4 is just a container and it would need to be in a video codec supported by Google Cast (also noted in the linked document)

From a quick review of the google-cast-api device handler for SmartThings, it looks like the playTrack() method assumes you’re playing an MP3, but the presets let you customize what type of content you’re playing. Maybe try creating a preset with your desired MP4 file and then try the playPreset(presetNumber) method?

That sound terrific my friend !..I had tried reproduce MP3 in Alexa with Voice Monkey Tutorial from SimpleSmart123 channel, without success. I only have got working text to voice command, but Im looking now MP3. Can you share some tips how to do it ?..THANKS in advance

That’s interesting I haven’t played wit the pre-sets yet, I will give that a go. Thank you

Hi Carlos, It is quite simple, create a variable with the download link to the sound you want to play, for example in your google drive create a folder and the place the MP3 in that folder, share it, then create a download link, add that URL to the variable then in rules use play, the the variable.

1 Like

Thanks my friend, sounds pretty easy, but Im lost in the part of “in rules use play, the the variable.”
Where do I have to play it? I mean, how do I have to tell Sharptools that “play” the variable in my echo dot ?

When I do text to voice I use http post and json commands, like:

“monkey”: “ECHO NAME”,
“announcement”: “Hey, the front door is opened”

Thanks in advance for share, your time and your patience.