Zoneminder Source Settings for Chromecast

Forum for questions and support relating to the 1.30.x releases only.
Locked
databoy2k
Posts: 28
Joined: Thu Nov 16, 2017 5:20 pm

Zoneminder Source Settings for Chromecast

Post by databoy2k »

I'm looking for some help making a Zoneminder stream match the Chromecast requirements (https://developers.google.com/cast/docs/media). I don't know what options to use and would appreciate some help.

I've got a LaView Doorbell Camera (a rebrand of the Hikvision one); PDB1520F1. It's running into Zoneminder (Monitor 6). I'm trying to cast the Zoneminder stream to a Chromecast through Home Assistant using the following URL: http://[ZM-IP]/zm/cgi-bin/nph-zms?mode=jpeg&monitor=6&scale=100&maxfps=5.

The camera natively streams at 1080p (1920x1080). Its codec is H264 - MPEG-4 AVC (part 10) according to VLC. Obviously I can access other resolutions by manipulating the capture width and height in ZM. Nothing that I've done, though, makes it possible for the Chromecast to access the stream.

There's a decent explanation of options to use with BlueIris here: https://community.home-assistant.io/t/g ... tant/63671. Any help translating those options or the Chromecast ones above into Zoneminder would be hugely appreciated.
Maximo1970
Posts: 97
Joined: Sun May 28, 2017 4:29 pm

Re: Zoneminder Source Settings for Chromecast

Post by Maximo1970 »

Did you ever get this resolved and working?
raymonvdm
Posts: 23
Joined: Thu Jan 16, 2014 3:01 pm

Re: Zoneminder Source Settings for Chromecast

Post by raymonvdm »

I`m able to access the url, directly using the browser when i disable OPT_USE_AUTH

Code: Select all

https://zoneminder_url/zm/cgi-bin/nph-zms?mode=jpeg&monitor=1&scale=100&maxfps=5
If this is working, the next step wil be to cast the image to a Google HUB

Code: Select all


service: media_player.play_media
data:
  entity_id: media_player.babbelscherm
  media_content_id: >-
    https://zoneminder_url/zm/cgi-bin/nph-zms?mode=jpeg&monitor=1&scale=100&maxfps=5
  media_content_type: image/jpg
entity_id: media_player.babbelscherm

So i`m having an authentication issue here and need some help to get past this. But when i disable authentication i CAN cast to Google Hub
User avatar
burger
Posts: 390
Joined: Mon May 11, 2020 4:32 pm

Re: Zoneminder Source Settings for Chromecast

Post by burger »

This might apply more to 1.32 and newer, but see:
https://wiki.zoneminder.com/External_Live_Stream
Post by rockedge» Fri Jun 30, 2017 8:09 pm
in a WordPress page or post I use something like this: Remember that
with certain authorizations set, the URL would be slightly different.
this URL works when :
Options->System->OPT_USE_AUTH = ON
Options->System->AUTH_TYPE = Builtin
Options->System->AUTH_RELAY = NONE

Code: Select all

<h2><img class="aligncenter"
src="http://your_zm_server/cgi-bin/nph-zms?mode=jpeg&scale=100&maxfps=5&buffer=1000&monitor=1&user=admin" alt="stream down" width="420" height="340" /></h2>
You can have a password as well, such as:

Code: Select all

http://IPOFZMSERVER/zm/cgi-bin/nph-zms?mode=jpeg&monitor=6&scale=100"&user="watchinguser"&pass="somepassword
fastest way to test streams:
ffmpeg -i rtsp://<user>:<pass>@<ipaddress>:554/path ./output.mp4 (if terminal only)
ffplay rtsp://<user>:<pass>@<ipaddress>:554/path (gui)
find paths on ispydb or in zm hcl

If you are new to security software, read:
https://wiki.zoneminder.com/Dummies_Guide
Locked