Adding Xcam Issues

Forum for questions and support relating to 1.33.x development only.
Locked
kcjonez
Posts: 10
Joined: Tue Dec 25, 2018 3:49 pm

Adding Xcam Issues

Post by kcjonez »

I have been having a hell of a time trying to get this camera added!
I work for Comcast and had their home security system installed. When I had it removed, they gave me the cameras and said I had paid for them.
I had them working with iSpy just fine, but had to run that on my windows box and not fond of that since that computer is used for my home studio.
Anyway, I have the IP Asdress and path for the video stream and can type “10.0.0.18/img/video.mjpeg” from a browser and it works fine.
But I am unable to get it to connect to ZM period! I have tried the recommended settings and nothing.
Any help would be appreciated as I have guests at home who I don’t necessarily trust...
User avatar
iconnor
Posts: 2900
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Adding Xcam Issues

Post by iconnor »

Use the ffmpeg monitor type.

Enter http://username:password@10.0.0.18/img/video.mjpeg into the url field.

Set the width and height correctly. That should be it. Check logs for errors.
kcjonez
Posts: 10
Joined: Tue Dec 25, 2018 3:49 pm

Re: Adding Xcam Issues

Post by kcjonez »

Unfortunately there isn’t a username and password to put in there. Even being an employee, I’m unable to get that information.
But just using the URL gets you in there without having to log in. The log in is pretty much just for settings.
I’ll give that a try tho. Thank you!
kcjonez
Posts: 10
Joined: Tue Dec 25, 2018 3:49 pm

Re: Adding Xcam Issues

Post by kcjonez »

Looking at the log, it keeps trying to connect using www-data and I have everything set to a different user and group. I changed all the folders to the correct user...thinking that’s my issue.
Anyone know where in the settings or files I can change that?
rockedge
Posts: 1173
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA

Re: Adding Xcam Issues

Post by rockedge »

Ownership conflicts is most likely the problem......what do you have running at what?
Quick try before explaining ...you may add a zmcustom.conf file in /etc/zm/conf.d if one is not there. It is generated by zmupdate.pl or you can manually add it. It is very important that the LAMP and ZoneMinder are running as the same user and the ownership of certain directories match.

this file will not change in an upgrade - update of zoneminder.
mine looks like this as my LAMP (really it is Hiawatha and not Apache) and my webserver and zoneminder run not as www-data but as webuser and my /cgi-bin is in a slightly different location than it is by default.

Code: Select all

# These values were autogenerated by zmupdate.pl
# You may edit these values. ZoneMinder will not overwrite them.
#
ZM_WEB_USER=webuser
ZM_WEB_GROUP=webgroup
ZM_PATH_ZMS=/cgi-bin/nph-zms
add the file then restart Apache restart ZM

Code: Select all

chown -R youruser:yourgroup /etc/zm
chown -R youruser:yourgroup /var/cache/zoneminder
chown -R youruser:yourgroup /usr/share/zoneminder
kcjonez
Posts: 10
Joined: Tue Dec 25, 2018 3:49 pm

Re: Adding Xcam Issues

Post by kcjonez »

Thanks!

I went through earlier and changed all the ownership properties in those files. I actually have the camera showing running now and it’s loadinf up my drive with images and videos. But trying to view it I’m getting no picture. Trying to watch the video same deal. Thinking my computer at work doesn’t have the codecs installed.

Starting to get somewhere anyway! lol

I’ll check that config file and permissions again.

Thanks for the help peeps! :)
rockedge
Posts: 1173
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA

Re: Adding Xcam Issues

Post by rockedge »

check that the alias is pointing to the correct /cgi-bin/nph-zms. not being able to view a stream like you mention usually involves the
/cgi-bin/nph-zms not being correctly declared in the configuration.
kcjonez
Posts: 10
Joined: Tue Dec 25, 2018 3:49 pm

Re: Adding Xcam Issues

Post by kcjonez »

Where do I find those settings? There' so many configuration files!! lol
rockedge
Posts: 1173
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA

Re: Adding Xcam Issues

Post by rockedge »

look at /etc/apache2/conf-available/zoneminder.conf check that the ScriptAlias paths match what you have...make sure that this configuration is enabled and has a symlink in /etc/apache2/conf-enabled with a command

Code: Select all

a2enconf zoneminder
make sure when you have this checked and in place to RESTART Apache

it looks like this :

Code: Select all

# Remember to enable cgi mod (i.e. "a2enmod cgi").
ScriptAlias /zm/cgi-bin "/usr/lib/zoneminder/cgi-bin"
<Directory "/usr/lib/zoneminder/cgi-bin">
    Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
    AllowOverride All
    Require all granted
</Directory>

Alias /zm /usr/share/zoneminder/www
<Directory /usr/share/zoneminder/www>
  php_flag register_globals off
  Options -Indexes +FollowSymLinks
  <IfModule mod_dir.c>
    DirectoryIndex index.php
  </IfModule>
</Directory>

<Directory /usr/share/zoneminder/www/api>
    AllowOverride All
</Directory>
kcjonez
Posts: 10
Joined: Tue Dec 25, 2018 3:49 pm

Re: Adding Xcam Issues

Post by kcjonez »

Thanks! I'll check that.

Quick question though...As I said, I have it recording and saving snapshots. But my gawd!!! It had used up over 100GB in just a few hours! It is saving upwards of 20,000 images at 76k a piece each hour. Not to mention the 500MB mp4 file it saves every hour! I had to turn off the service and delete them before it used up my 2TB drive in a day! lol

I have been all through the settings and do not see anywhere to prevent that. Is it saving the video as jpeg files for each frame at 30fps?
rockedge
Posts: 1173
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA

Re: Adding Xcam Issues

Post by rockedge »

wow...you definitely need to do some tuning. There are quite a few settings to tweak once you get the hang of it.
how many cameras are recording? are they recording continuously? what are the monitors (camera) Storage settings? what fps are you running the cameras? what resolution are the videos and jpeg's?

try to limit what you save in the monitors Storage settings, slow down the cameras fps, reduce camera resolution. There are some WIKI pages that have ZM tweaks
kcjonez
Posts: 10
Joined: Tue Dec 25, 2018 3:49 pm

Re: Adding Xcam Issues

Post by kcjonez »

haha ya think?

I jus have the one camera. I set it to record at 25fps (changed it to 15fps) and haven't quite figured out (or looked for...lol) the motion detection yet, so I imagine it's continuous. Cameras are set to 1280px/720px.

I just checked every setting and found many little errors...file permissions, etc. and it's still storing tons of files! Cept now they're 85k! lol

Might have to give one of you permissions to check it out!
kcjonez
Posts: 10
Joined: Tue Dec 25, 2018 3:49 pm

Re: Adding Xcam Issues

Post by kcjonez »

aaaaand I did have it set to save frames as jpeg...Just turned that off. See what hppens
kcjonez
Posts: 10
Joined: Tue Dec 25, 2018 3:49 pm

Re: Adding Xcam Issues

Post by kcjonez »

yeah that did it! No more saving every frame!! haha

Still can't monitor it through the app tho. I have it set to monitor from a URL
kcjonez
Posts: 10
Joined: Tue Dec 25, 2018 3:49 pm

Re: Adding Xcam Issues

Post by kcjonez »

I guess the last thing I would probably want to change is the video output format. It's saving to mp4 right now and seems like that has been a pain to view! If I can get it to save as avi or even wmv if available, that would be the best! Have been looking in the GUI and not seeing it in there...
Locked