Foscam stream to Chromecast?

I’m trying to cast my Foscam “Mjpeg” stream to Chromecast, but seems that chromecast doesn’t support that stream. So I settled for just casting a snapshot image, when my camera detects motion. So far I’ve been able to send the Snapshot via FTP to Openhab/raspberry. When I try to cast the local stored snapshot, I get an error: could not open media. I can cast png and jpeg images from http without any problems. So It seems that chromecast binding doesn’t support casting from local folders? Are there any solutions for this?

Could one option be to upload snapshots to openhab webserver, and then chromecast the http url?

I’ve been able to get my RTSP stream from Foscam camera converted with openRTSP to mp4, and then sent to chromecast through a Openhab rule :slight_smile:
I triggered a openrtsp.py script with motion feedback from Synology Surveillance Station event handler. Python script containing just the command line command for openrtsp, which results in a mp4 file of 10sec uploaded to etc/openhab2/html/. Then I trigger an action to cast http://IP_SERVER/8080/static/filename.mp4

1 Like

Hey @sjef86,

I’m trying a bit the same thing. When somebody hits the frontdoor, the move is shown on the TV.

Can you share an example of the openrtsp.py script?

Got a Foscam camera that’s been linked with zondeminder. I can create fe jpeg’s with wget. But don’t have a clue how to convert it to mp4.

PS, is this ‘live feed’? Or do you have to wait till the mp4 is created before you can show it on the chromecast?

I haven’t figured out how to live stream yet. You’ll have to wait untill the file is created. So I have managed that by only capturing 10sec before sending the converted snippet to chromecast.

motion.py

openRTSP -4 -w 704 -h 480 -f 05 -d 10 -b 5000000 -v "rtsp://user:pass@IP-address:88/videoMain" > /etc/openhab2/html/foscam.mp4 &