[Solved] RTSP Camera Serverr on Android Phone - Cannot connect to ZM and viewing video in ZM not working

Forum for questions and support relating to the 1.34.x releases only.
Post Reply
kyferez
Posts: 21
Joined: Fri Dec 25, 2020 7:13 pm

[Solved] RTSP Camera Serverr on Android Phone - Cannot connect to ZM and viewing video in ZM not working

Post by kyferez »

Hi all, I'm trying to use the camera in a phone using an Android app called RTSP Camera Server ( https://play.google.com/store/apps/deta ... n_US&gl=US )

I can connect to the phone server with VLC using the following: http://192.168.1.57:8080/playlist.m3u

I can open the playlists in VLC and see the streams: Active Cam, Front Cam, and Rear cam, and the paths are just like the App details says, shown below.

However when I setup the camera in ZoneMinder, I get the attached log results for RSTP and HTTP, see images. It's either "Unrecognised content type 'audio/mpegurl'" for HTTP or "No image since startup" for RSTP.

Has anyone gotten RSTP Camera Server working with ZoneMinder? If so, what settings do you use?

I tried with this camera (https://www.amazon.com/gp/product/B083Z ... =UTF8&th=1) and it does work with FFMPEG and source path of rtsp://192.168.7.51:5554/1/h264major. This works but same settings do not work for RTSP Camera Server. Also I've found that VLC also will not open the stream of the RTSP Camera Server using the direct RTSP stream for some reason which I suspect is part of the issue? Anyone got ideas on how to get that to work? It will enable me to use all my old no-good phones as cameras!

Path Info:
Playlist - http://(device ip address):8080/playlist.m3u
Active camera - rtsp://(device ip address):5554/camera
Back camera - rtsp://(device ip address):5554/back
Front camera - rtsp://(device ip address):5554/front

Camera URL Parameters:
res Resolution - width(number)xheight(number)
fps Frame per second - fps(number)
mic Enable/Disable microphone - on(string) or off(string)
Example: rtsp://(device ip address):5554/back?res=640x480&fps=10&mic=on
Attachments
RTSP Logs
RTSP Logs
rtsp.png (119.24 KiB) Viewed 5272 times
HTTP Logs
HTTP Logs
http.png (81.69 KiB) Viewed 5272 times
Last edited by kyferez on Sun Dec 27, 2020 1:29 am, edited 1 time in total.
kyferez
Posts: 21
Joined: Fri Dec 25, 2020 7:13 pm

Re: RTSP Camera Serverr on Android Phone - Cannot connect to ZM

Post by kyferez »

Humm, Progress. Now when using FFMPEG and RSTP address rtsp://192.168.7.50:5554/front I'm getting the below error. However VLC streams that address just fine.
"Unable to open input rtsp://192.168.7.50:5554/front due to: Invalid data found when processing input"
User avatar
bkjaya1952
Posts: 282
Joined: Sat Aug 25, 2018 3:24 pm
Location: Sri Lanka

Re: RTSP Camera Serverr on Android Phone - Cannot connect to ZM

Post by bkjaya1952 »

User avatar
burger
Posts: 475
Joined: Mon May 11, 2020 4:32 pm

Re: RTSP Camera Serverr on Android Phone - Cannot connect to ZM

Post by burger »

If it works in VLC, use libVLC. If it works in ffmpeg or ffplay from terminal use ffmpeg libraries.

Sometimes you can use ffmpeg libraries if it works in VLC, but not every time.

More instructions here: https://wiki.zoneminder.com/Finding_Camera_Stream_Paths
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
kyferez
Posts: 21
Joined: Fri Dec 25, 2020 7:13 pm

Re: RTSP Camera Serverr on Android Phone - Cannot connect to ZM

Post by kyferez »

Thank you both! It's working now using IP Webcam.
kyferez
Posts: 21
Joined: Fri Dec 25, 2020 7:13 pm

Re: RTSP Camera Serverr on Android Phone - Cannot connect to ZM

Post by kyferez »

Putting this here for others. I also was getting an issue viewing the cameras in ZM. Logs showed below error. However there some changes that are not in the manuals and were confusing:

1. In this version of ZM (1.34) the Options->Paths is no longer there. I had to manually edit the file. On CentOS 7 the file was at /etc/zm/conf.d/01-system-paths.conf so I updated the line "ZM_PATH_ZMS=/usr/libexec/zoneminder/cgi-bin/nph-zms" to "ZM_PATH_ZMS=/zm/cgi-bin/nph-zms"

2. Apache runs from /etc/sbin/httpd. Running the command /etc/sbin/httpd -V showed me an error about ScriptAlias (below). I reviewed the apache config and was not able to determine any repeat of ScriptAlias for /zm/cgi-bin. I then ran /etc/sbin/httpd -DDUMP_CONFIG > /home/output.txt which allowed me to view the full Apache config. That didn't help, but a little research showed that Alias' must be in order, most specific to least specific (see https://serverfault.com/questions/66523 ... arlier-ali )The section starting with [Alias /zm "/usr/share/zoneminder/www"] was BEFORE the section with line [ScriptAlias "/zm/cgi-bin" "/usr/libexec/zoneminder/cgi-bin"]. So I moved the section for /zm/cgi-bin above the one for /zm and then restarted apache. This immediately fixed the viewing video issue.

Error in Log:
Socket /var/lib/zoneminder/sock/zms-349451s.sock does not exist. This file is created by zms, and since it does not exist, either zms did not run, or zms exited early. Please check your zms logs and ensure that CGI is enabled in apache and check that the PATH_ZMS is set correctly. Make sure that ZM is actually recording. If you are trying to view a live stream and the capture process (zmc) is not running then zms will exit. Please go to http://zoneminder.readthedocs.io/en/lat ... window-etc for more information.
Error for ScriptAlias:
[alias:warn] [pid 26449] AH00671: The ScriptAlias directive in /etc/httpd/conf.d/zoneminder.conf at line 48 will probably never match because it overlaps an earlier Alias.
Post Reply