problems with chinese IP camera

Forum for questions and support relating to the 1.24.x releases only.
Locked
KennyPowers
Posts: 8
Joined: Wed Jun 01, 2011 1:26 am

problems with chinese IP camera

Post by KennyPowers »

I have the following IP camera:

(apparently new users can't post off-site URLs, so just google "dealextreme ip-400 camera" and click the first link)

I'm running ZoneMinder 1.24.4 compiled from source on Gentoo. I configured the monitor as described by two posters with the same camera in this thread:

http://www.zoneminder.com/forums/viewto ... 400#p69353

I get the broken image icon when trying to view the monitor. I was getting "Can't get shared memory id '7a6d0006', 6: No such file or directory" type errors in zmwatch.log, but I seem to have resolved them by raising the shared memory limit. I'm not getting any errors in zmwatch.log at this point, but I still don't get an image. I can go to <camera ip>/image.jpg and see the image, so I'm at a loss as to why it's not working.
algenon
Posts: 55
Joined: Mon Oct 20, 2003 1:25 am

Re: problems with chinese IP camera

Post by algenon »

I have that camera working fine. Although the camera is a bit crapola.

How is your 'Source' setup? Mine is;

Host Name: admin:123456@192.168.1.15
Port: 80
Path: /image.jpg
Capture Width: 640
Capture Height: 480

Buffers;
20
10
10
10
1

Hope that helps.

Algenon
KennyPowers
Posts: 8
Joined: Wed Jun 01, 2011 1:26 am

Re: problems with chinese IP camera

Post by KennyPowers »

Currently, my source is:

HTTP
Simple
192.168.123.248 (camera's local IP address, I've tried it with and without the user:password@ since it doesn't prompt for user/pass when I go to the camera's IP in a browser)
80
/image.jpg
24 bit colour
640
480

I tried setting my buffers to match yours with no effect.

The camera is configured for 640x480. Again, I can go to 192.168.123.248/image.jpg in a browser and see the output from the camera.
algenon
Posts: 55
Joined: Mon Oct 20, 2003 1:25 am

Re: problems with chinese IP camera

Post by algenon »

The camera probably has to be on the same subnet as ZM is.

Algenon
KennyPowers
Posts: 8
Joined: Wed Jun 01, 2011 1:26 am

Re: problems with chinese IP camera

Post by KennyPowers »

algenon wrote:The camera probably has to be on the same subnet as ZM is.

Algenon
How do I determine that? The zoneminder machine is 192.168.123.102, but it's also a public-facing webserver and I access the zoneminder control panel using the external domain name.
algenon
Posts: 55
Joined: Mon Oct 20, 2003 1:25 am

Re: problems with chinese IP camera

Post by algenon »

KennyPowers wrote:
algenon wrote:The camera probably has to be on the same subnet as ZM is.

Algenon
How do I determine that? The zoneminder machine is 192.168.123.102, but it's also a public-facing webserver and I access the zoneminder control panel using the external domain name.

Then the camera is already on the ZM subnet. Can ZM access the camera if it is set to 320 x 240 in 'Hosts" setup?
KennyPowers
Posts: 8
Joined: Wed Jun 01, 2011 1:26 am

Re: problems with chinese IP camera

Post by KennyPowers »

algenon wrote:
KennyPowers wrote:
algenon wrote:The camera probably has to be on the same subnet as ZM is.

Algenon
How do I determine that? The zoneminder machine is 192.168.123.102, but it's also a public-facing webserver and I access the zoneminder control panel using the external domain name.

Then the camera is already on the ZM subnet. Can ZM access the camera if it is set to 320 x 240 in 'Hosts" setup?
No, though when I changed it to 320x240 in zoneminder the source on the control panel was displayed in red until I also configured the camera to output 320x240 as well, which suggests to me that some level of communication is occurring. I also still seem to be getting "Can't get shared memory id '7a6d0008', 8: No such file or directory" errors, though very rarely. There doesn't seem to be any pattern to what causes them. I've raised both kernel.shmall and kernel.shmmax to 512MB which should be plenty right?
algenon
Posts: 55
Joined: Mon Oct 20, 2003 1:25 am

Re: problems with chinese IP camera

Post by algenon »

I have Memory set as;

kernel.shmall = 512000
kernel.shmmax = 1000000000

Algenon
PacoLM
Posts: 971
Joined: Wed Dec 02, 2009 9:55 pm
Location: Spain

Re: problems with chinese IP camera

Post by PacoLM »

Try this modified script from the user Pada to get the best settings for your shared memory:

Code: Select all

#!/bin/sh
# Copyright (C) 2010 Chris "Pada" Kistner
# Modified by PacoLM to check only shared memory settings
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
# NOTE: -f you find errors, check that coreutils are installed, if not, run the command below
# apt-get -y install coreutils bc
echo "--- Checking memory setting..."
page_size=$(getconf PAGE_SIZE)
mem_bytes=$(awk '/MemTotal:/ { printf "%0.f",$2 * 1024}' /proc/meminfo)
mb=1048576
mem_bytes_mb=$(expr $mem_bytes / $mb)
shmmax=$(echo "$mem_bytes * 0.90" | bc | cut -f 1 -d '.')
shmmax_mb=$(expr $shmmax / $mb)
shmall=$(expr $mem_bytes / $page_size)
shmmax_cur=$(sysctl -n kernel.shmmax)
shmmax_cur_mb=$(expr $shmmax_cur / $mb)
shmall_cur=$(sysctl -n kernel.shmall)
echo "-- Total memory = $mem_bytes B = $mem_bytes_mb MB"
echo "-- Page size = $page_size B"
echo "-- Current kernel.shmmax = $shmmax_cur B = $shmmax_cur_mb MB"
echo "-- Current kernel.shmall = $shmall_cur pages"
if [ "$shmmax" -eq "$shmmax_cur" ] && [ "$shmall" -eq "$shmall_cur" ]; then
   echo "-- Recommended shm values already set"
else
   echo "-- Recommended: kernel.shmmax = $shmmax B = $shmmax_mb MB"
   echo "-- Recommended: kernel.shmall = $shmall pages"
fi
# Done
echo "--- Done."
Hope it helps,

PacoLM

After more than 15 years, no longer using ZM as surveillance system.
Now in the dark side, using a commercial system...
KennyPowers
Posts: 8
Joined: Wed Jun 01, 2011 1:26 am

Re: problems with chinese IP camera

Post by KennyPowers »

Well, I finally removed the from-zource install and located a portage overlay that contains zoneminder (gentoo removed zoneminder from the main package repo awhile back for some reason). When installing from portage, it pulled in a bunch of dependencies I didn't have. Now I get the image from the camera in zoneminder, but when viewing the monitor, the image never updates and the fps is always shown as "- fps". It just shows the image from the camera from when I started viewing the monitor. Any ideas on that one?

Update: Nevermind, I put a value in RELOAD_CAMBOZOLA (it was empty), and now it appears to be working.
KennyPowers
Posts: 8
Joined: Wed Jun 01, 2011 1:26 am

Re: problems with chinese IP camera

Post by KennyPowers »

Well, everything was working this morning when I was accessing zoneminder from within my LAN. I went to work and attempted to view the camera by logging into my zoneminder machine from there. It works except the camera image is black and the state is listed as "State: Idle - 0.00 fps". I've tried adjusting the bandwidth settings with no success.
Locked