Having some problems getting started

Support and queries relating to all previous versions of ZoneMinder
Locked
DervMan
Posts: 23
Joined: Wed Feb 25, 2009 2:04 pm
Location: Bristol, UK

Having some problems getting started

Post by DervMan »

I'm trying to get zoneminder running using a USB Logitech QuickCam Pro 4000.

Ubuntu 8.10 (up to date with patches)
Installed zoneminder from the repositories (version 1.23.3)
I've installed camorama and am able to get a live stream, so in other words the WebCam has been recognised and is working.

I've increased the shared memory by adding
kernel.shmall = 134217728
kernel.shmmax = 134217728
to /etc/sysctl.conf and rebooting.

Code: Select all

cat /proc/sys/kernel/shmall 134217728
cat /proc/sys/kernel/shmmax 134217728
Here's what I'm getting in the log files

Code: Select all

steve@M:~$ tail /tmp/zm*
==> /tmp/zmaudit.log <==

==> /tmp/zmdc.log <25> /tmp/zmfilter.log <02> /tmp/zmpkg.log <02> /tmp/zmupdate.log <==

==> /tmp/zmwatch.log <==
25/02/09 13:29:11.793094 zmwatch[18229].INF [Restarting capture daemon for Logitech-cam, shared memory not valid]
25/02/09 13:29:12.173952 zmwatch[18229].INF ['zmc -d /dev/video0' starting at 09/02/25 13:29:12, pid = 18324]
25/02/09 13:29:22.176473 zmwatch[18229].INF [Restarting capture daemon for Logitech-cam, shared memory not valid]
25/02/09 13:29:22.547996 zmwatch[18229].INF ['zmc -d /dev/video0' starting at 09/02/25 13:29:22, pid = 18340]
25/02/09 13:29:32.550191 zmwatch[18229].INF [Restarting capture daemon for Logitech-cam, shared memory not valid]
25/02/09 13:29:32.949024 zmwatch[18229].INF ['zmc -d /dev/video0' starting at 09/02/25 13:29:32, pid = 18351]
25/02/09 13:29:42.951131 zmwatch[18229].INF [Restarting capture daemon for Logitech-cam, shared memory not valid]
25/02/09 13:29:43.346978 zmwatch[18229].INF ['zmc -d /dev/video0' starting at 09/02/25 13:29:43, pid = 18355]
25/02/09 13:29:53.349183 zmwatch[18229].INF [Restarting capture daemon for Logitech-cam, shared memory not valid]
25/02/09 13:29:53.728394 zmwatch[18229].INF ['zmc -d /dev/video0' starting at 09/02/25 13:29:53, pid = 18361]
Here's the shared memory info

Code: Select all

steve@M:~$ sudo ipcs -m

------ Shared Memory Segments --------
key        shmid      owner      perms      bytes      nattch     status
0x00000000 0          tv        600        393216     2          dest
0x00000000 32769      tv        600        393216     2          dest
0x00000000 65538      tv        600        393216     2          dest
0x00000000 98307      tv        600        393216     2          dest
0x00000000 131076     tv        600        393216     2          dest
0x00000000 163845     tv        600        393216     2          dest
0x00000000 196614     tv        600        393216     2          dest
0x00000000 229383     tv        600        393216     2          dest
0x00000000 262152     tv        600        393216     2          dest
0x00000000 294921     tv        600        393216     2          dest
0x00000000 327690     tv        600        393216     2          dest
0x00000000 360459     tv        600        393216     2          dest
0x0056a4d5 491532     steve     660        488        0
0x0056a4d6 524301     steve     660        65536      0
0x00000000 557070     steve     600        393216     2          dest
0x00000000 589839     steve     600        393216     2          dest
0x00000000 622608     steve     600        393216     2          dest
0x00000000 655377     steve     600        393216     2          dest
0x00000000 688146     steve     600        393216     2          dest
0x00000000 720915     steve     600        393216     2          dest
0x00000000 753684     steve     600        393216     2          dest
0x00000000 786453     steve     600        393216     2          dest
0x00000000 819222     steve     600        393216     2          dest
0x00000000 851991     steve     600        393216     2          dest
0x00000000 884760     steve     600        393216     2          dest
0x00000000 1474585    steve     600        393216     2          dest
0x00000000 950298     steve     600        393216     2          dest
0x00000000 983067     steve     600        393216     2          dest
0x00000000 1605660    steve     600        393216     2          dest
Here's the zm.conf file

Code: Select all

steve@M:~$ more /etc/zm/zm.conf
# ==========================================================================
#
# ZoneMinder Base Configuration, $Date: 2006-11-16 09:06:30 +0000 (Thu, 16 Nov 2006) $, $Revision: 2057 $
#
# ==========================================================================
#
# This file is generated by 'configure'. Care should be taken if manually
# editing this file as an changes may be overwritten by subsequent configuration
# or installations.
#

# Current version of ZoneMinder
ZM_VERSION=1.23.3

# Path to build directory, used mostly for finding DB upgrade scripts
ZM_PATH_BUILD=/build/buildd/zoneminder-1.23.3

# Build time, used to record when to trigger various checks
ZM_TIME_BUILD=1222245607

# Path to ZoneMinder binaries
ZM_PATH_BIN=/usr/bin

# Path to ZoneMinder libraries (none at present, for future use)
ZM_PATH_LIB=/usr/lib

# Path to ZoneMinder configuration (this file only at present)
ZM_PATH_CONF=/etc/zm

# Path to ZoneMinder web files
ZM_PATH_WEB=/usr/share/zoneminder

# Path to ZoneMinder cgi files
ZM_PATH_CGI=/usr/lib/cgi-bin

# Username and group that web daemon (httpd/apache) runs as
ZM_WEB_USER=www-data
ZM_WEB_GROUP=www-data

# ZoneMinder database hostname or ip address
ZM_DB_HOST=localhost

# ZoneMinder database name
ZM_DB_NAME=zm

# ZoneMinder database user
ZM_DB_USER=zmuser

# ZoneMinder database password
ZM_DB_PASS=zmpass
Google searches tell me increasing the shared memory will fix this problem but having done that I'm still stuck!

Here's some more output that may help.

Code: Select all

steve@M:~$ zmu -d /dev/video0 -q -v
Video Capabilities
  Name: Logitech QuickCam Pro 4000
  Type: 1
    Can capture
  Video Channels: 1
  Audio Channels: 1
  Maximum Width: 640
  Maximum Height: 480
  Minimum Width: 160
  Minimum Height: 120
Window Attributes
  X Offset: 0
  Y Offset: 0
  Width: 160
  Height: 120
Picture Attributes
  Palette: 15 - YUV 4:2:0 Planar
  Colour Depth: 24
  Brightness: 32256
  Hue: 65535
  Colour :32768
  Contrast: 32768
  Whiteness: 49152
Channel 0 Attributes
  Name: Webcam
  Channel: 0
  Flags: 0
  Type: 2 - Camera
  Format: 2055 - Unknown
And a lsusb

Code: Select all

steve@M:~$ lsusb
Bus 003 Device 003: ID 046d:08b2 Logitech, Inc. QuickCam Pro 4000
Bus 003 Device 002: ID 08ff:2580 AuthenTec, Inc. AES2501 Fingerprint Sensor
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 005: ID 152d:2338 JMicron Technology Corp. / JMicron USA Technology Corp. JM20337 Hi-Speed USB to SATA & PATA Combo Bridge
Bus 001 Device 003: ID 2040:9580 Hauppauge
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Any suggestions gratefully received, I've now reached the limit of my knowledge :-(
newvisionantenna
Posts: 381
Joined: Sat Jan 17, 2009 7:49 pm
Location: Germany

Post by newvisionantenna »

I have that very same webcam and it works out of the box with the 1.24.1 install DVD. I'm using 8.04 so maybe that has something to do with it. I notice you show just about every other log file and setting, but how do you actually have it setup in Zoneminder? What resolution are you trying to get out of it? I'll reboot into Zoneminder and see if I can get you the settings that work for me.
DervMan
Posts: 23
Joined: Wed Feb 25, 2009 2:04 pm
Location: Bristol, UK

Post by DervMan »

Thanks for the reply.

I don't know where the webcam settings are stored so I'll list what displays in the setup page.

'General' Tab
name - logitech-cam
source - local
function - monitor
enabled - tick
rest are blank.

'Source' Tab
Davice path - /dev/video0
Device Channel - 0
Device format - PAL
Capture Palette - RGB24
Capture Width - 640
Capture Height - 480
rest are blank/default
newvisionantenna
Posts: 381
Joined: Sat Jan 17, 2009 7:49 pm
Location: Germany

Post by newvisionantenna »

Try and change if from PAL to AUTO or to NTSC. I don't see Pal mentioned in the zmu read out. You can also start out with 320x240 first and then go from there. It looks like you have it set for v4l, so just try and switch between PAL and what I mention and change it to 320x240 for now. The shared memory settings should allow higher, but just try those lower settings for now. I'm using Vista right now otherwise I would tell you my exact settings. I have an entire box full of usb webcam's from all the testing I've been doing :)
DervMan
Posts: 23
Joined: Wed Feb 25, 2009 2:04 pm
Location: Bristol, UK

Post by DervMan »

Tried auto here's the output (still not working)

Code: Select all

==> /tmp/zmwatch.log <==
25/02/09 16:16:14.553023 zmwatch[25976].ERR [Can't get shared memory id '7a6d0001', 1: No such file or directory]
25/02/09 16:16:14.553606 zmwatch[25976].INF [Restarting capture daemon for Logitech-cam, shared memory not valid]
25/02/09 16:16:14.929755 zmwatch[25976].INF ['zmc -d /dev/video0' starting at 09/02/25 16:16:14, pid = 26356]

newvisionantenna
Posts: 381
Joined: Sat Jan 17, 2009 7:49 pm
Location: Germany

Post by newvisionantenna »

Did you try 320x240? Also remove those memory entries you did and reboot it. I had no problem getting 320x240 so I'm not sure what's up with your setup.
DervMan
Posts: 23
Joined: Wed Feb 25, 2009 2:04 pm
Location: Bristol, UK

Post by DervMan »

Removed the shared memory settings from sysctl.conf changed the camera settings to 320 x 240 then rebooted the PC.

Still not working but the error message is slightly different now.

Code: Select all

Feb 25 17:29:49 M zmdc[6075]: INF ['zmc -d /dev/video0' starting at 09/02/25 17:29:49, pid = 7849]
Feb 25 17:29:49 M zmdc[7849]: INF ['zmc -d /dev/video0' started at 09/02/25 17:29:49]
Feb 25 17:29:49 M zmwatch[6168]: INF ['zmc -d /dev/video0' starting at 09/02/25 17:29:49, pid = 7849]
Feb 25 17:29:49 M zmc_dvideo0[7849]: INF [Debug Level = 0, Debug Log = <none>]
Feb 25 17:29:53 M zmu[7852]: WAR [Shared memory not initialised by capture daemon, some query functions may not be available or produce invalid results]
DervMan
Posts: 23
Joined: Wed Feb 25, 2009 2:04 pm
Location: Bristol, UK

Post by DervMan »

Today I tried uninstalling (purge) the repository version and build from source. It didn't go well! Ultimately it will only build if I compile ffmpeg from source and include swscale. However I don't want to do that as it may affect the mythtv frontend installed on the same PC.

So for the time being I would like to get the repository version working. Can anyone throw any light on this problem?

Thanks
DervMan
Posts: 23
Joined: Wed Feb 25, 2009 2:04 pm
Location: Bristol, UK

Post by DervMan »

I've performed a fresh install of Hardy on a different PC then installed ZoneMinder from the repositories. Unfortunately I only have the one webcam so couldn't try a different one. On this fresh install still getting the shared memory problems.

The webcam worked under cheese and camorama.

Any more suggestions out there?

Thanks
DervMan
Posts: 23
Joined: Wed Feb 25, 2009 2:04 pm
Location: Bristol, UK

Post by DervMan »

Given other people have the QuickCam 9000 working I bought one.

But still getting similar errors, so I'm assuming this is an OS related problem.

Code: Select all

==> /tmp/zmwatch.log <==
08/03/09 11:44:02.801719 zmwatch[7563].ERR [Can't get shared memory id '7a6d0001', 1: No such file or directory]
08/03/09 11:44:02.802342 zmwatch[7563].INF [Restarting capture daemon for 9000, shared memory not valid]
08/03/09 11:44:03.195994 zmwatch[7563].INF ['zmc -d /dev/video1' starting at 09/03/08 11:44:03, pid = 7605]

==> /tmp/zmdc.log <03> /tmp/zmwatch.log <==
03/08/09 11:44:10.324170 zmwatch[7549].ERR [Can't get shared memory id '7a6d0001', 1: No such file or directory]
03/08/09 11:44:10.324695 zmwatch[7549].INF [Restarting capture daemon for 9000, shared memory not valid]
03/08/09 11:44:10.719016 zmwatch[7549].INF ['zmc -d /dev/video1' starting at 09/03/08 11:44:10, pid = 7607]
08/03/09 11:44:13.198421 zmwatch[7563].ERR [Can't get shared memory id '7a6d0001', 1: No such file or directory]
08/03/09 11:44:13.199085 zmwatch[7563].INF [Restarting capture daemon for 9000, shared memory not valid]

DervMan
Posts: 23
Joined: Wed Feb 25, 2009 2:04 pm
Location: Bristol, UK

Post by DervMan »

Performed a fresh install of Jaunty :-)

But still getting same errors.....

I will get there!
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

What OS are you using, not sure what Jaunty is?
What drivers are being loaded?

I think you might have UVC drivers being loaded which is a Video 4 Linux 2 (V4L2) application and ZoneMinder <= 1.23.x can only handle V4L1. You might have to black list the UVC driver and install a V4L1 compatible driver.
belanger
Posts: 19
Joined: Wed Apr 15, 2009 10:09 am

Post by belanger »

I had the same issue. I upgrade from Ubuntu 8.10 to 9.04 and things finally work as they should and under 8.10 nothing was working. When upgrading make sure you re-edit the changes required in /etc/sysctl.conf .

NOTES:

to upgrade to 9.04 run "update-manager -d" IF update-manager is not installed, run "apt-get install update-manager"

ps: The official release date for 9.04 is April 23th but you can "force" an upgrade now ... at least, its going to make zoneminder work!
Locked