storing defaults ?

Support and queries relating to all previous versions of ZoneMinder
Locked
pdc124
Posts: 15
Joined: Fri Feb 02, 2007 9:53 am

storing defaults ?

Post by pdc124 »

ive got ZM working with a labtec ( logitech) camera.

Code: Select all

tmp/portage/spca5xx-20060301/work/spca5xx-20060301/drivers/usb/spca5xx.c: driver spca5xx deregistered
Linux video capture interface: v1.00
/var/tmp/portage/spca5xx-20060301/work/spca5xx-20060301/drivers/usb/spca5xx.c: USB SPCA5XX camera found. Labtec for Notebooks
/var/tmp/portage/spca5xx-20060301/work/spca5xx-20060301/drivers/usb/spca5xx.c: [spca5xx_probe:8251] Camera type JPEG
/var/tmp/portage/spca5xx-20060301/work/spca5xx-20060301/drivers/usb/zc3xx.h: [zc3xx_config:505] Find Sensor PAS202BCB
/var/tmp/portage/spca5xx-20060301/work/spca5xx-20060301/drivers/usb/spca5xx.c: [spca5xx_getcapability:2188] maxw 640 maxh 480 minw 176 minh 144
usbcore: registered new driver spca5xx
/var/tmp/portage/spca5xx-20060301/work/spca5xx-20060301/drivers/usb/spca5xx.c: spca5xx driver 00.57.10 registered
Problems
1. I need to chmod 777 /dev/video0 before i get pictures

2. If i go into the console to rotate the image it goes black ( ie the same results before i change the permissions on /dev/video0

ive tried changing the image dimensions , but havent got the picture back .

Where do i delete any changes so that I can get back to a working system ?
What do i need to save as a default config so when it goes t***s up I can recover the situation
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

What Distro and Release are you using?
What user owns the processes?
pdc124
Posts: 15
Joined: Fri Feb 02, 2007 9:53 am

Post by pdc124 »

Ive got this in a right mess.
Resetting stuff to the defaults ( as I remember them ) hasnt got an image back and rebooting the machine doesnt do it
camera

Code: Select all

chickcam htdocs # zmu
Video Capabilities
  Name: Labtec Webcam
  Type: 1
    Can capture
  Video Channels: 1
  Audio Channels: 0
  Maximum Width: 640
  Maximum Height: 480
  Minimum Width: 176
  Minimum Height: 144
Window Attributes
  X Offset: 0
  Y Offset: 0
  Width: 320
  Height: 240
Picture Attributes
  Palette: 4 - 24bit
  Colour Depth: 24
  Brightness: 32768
  Hue: 0
  Colour :0
  Contrast: 32768
  Whiteness: 0
Channel 0 Attributes
  Name: ZC301-2
  Channel: 0
  Flags: 0
  Type: 2 - Camera
  Format: 0 - PAL
chickcam htdocs #
Ive set the image orientation to normal and width/height to the max/max and min/min and 352/288 ( i think this is what it was at )

Code: Select all

chickcam htdocs # ls -la /dev/video0
lrwxrwxrwx 1 root root 10 Feb 11 20:34 /dev/video0 -> v4l/video0
chickcam htdocs #     
having chmodded it manually
OS =gentoo linux
ZM version = 1.22.3
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

Okay so what user owns the processes?
It should be your web user.
pdc124
Posts: 15
Joined: Fri Feb 02, 2007 9:53 am

Post by pdc124 »

not sure of the best way of showing this

apache webserver = user apache group apache
eg

Code: Select all

zmdc.pl   6081 apache  cwd       DIR        3,3     4096          2 /
zmdc.pl   6081 apache  rtd       DIR        3,3     4096          2 /
zmdc.pl   6081 apache  txt       REG        3,3   998884     124452 /usr/bin/perl5.8.8
zmdc.pl   6081 apache  mem       REG        0,0                   0 [heap] (stat: No such file or directory)
zmdc.pl   6081 apache  mem       REG        3,3    90521      32736 /lib/ld-2.3.5.so
zmdc.pl   6081 apache  mem       REG        3,3    20132     125246 /usr/lib/perl5/5.8.8/i586-linux/auto/List/Util/Util.so
zmdc.pl   6081 apache  mem       REG        3,3    89880      32832 /lib/libpthread-0.10.so
zmdc.pl   6081 apache  mem       REG        3,3    67112      32804 /lib/libnsl-2.3.5.so
zmdc.pl   6081 apache  mem       REG        3,3    10484      32711 /lib/libdl-2.3.5.so
zmdc.pl   6081 apache  mem       REG        3,3   158168      32735 /lib/libm-2.3.5.so
zmdc.pl   6081 apache  mem       REG        3,3    22456      32907 /lib/libcrypt-2.3.5.so
zmfilter. 6110 apache  cwd       DIR        3,3     4096          2 /
zmfilter. 6110 apache  rtd       DIR        3,3     4096          2 /
zmfilter. 6110 apache  txt       REG        3,3   998884     124452 /usr/bin/perl5.8.8
zmfilter. 6110 apache  mem       REG        0,0                   0 [heap] (stat: No such file or directory)
zmfilter. 6110 apache  mem       REG        3,3    90521      32736 /lib/ld-2.3.5.so
zmfilter. 6110 apache  mem       REG        3,3    20132     125246 /usr/lib/perl5/5.8.8/i586-linux/auto/List/Util/Util.so
zmfilter. 6110 apache  mem       REG        3,3    89880      32832 /lib/libpthread-0.10.so
zmfilter. 6110 apache  mem       REG        3,3    67112      32804 /lib/libnsl-2.3.5.so
zmaudit.p 6115 apache  cwd       DIR        3,3     4096          2 /
zmaudit.p 6115 apache  rtd       DIR        3,3     4096          2 /
zmaudit.p 6115 apache  txt       REG        3,3   998884     124452 /usr/bin/perl5.8.8
zmaudit.p 6115 apache  mem       REG        0,0                   0 [heap] (stat: No such file or directory)
zmaudit.p 6115 apache  mem       REG        3,3    90521      32736 /lib/ld-2.3.5.so
zmaudit.p 6115 apache  mem       REG        3,3    20132     125246 /usr/lib/perl5/5.8.8/i586-linux/auto/List/Util/Util.so
zmaudit.p 6115 apache  mem       REG        3,3    89880      32832 /lib/libpthread-0.10.so
zmaudit.p 6115 apache  mem       R

pdc124
Posts: 15
Joined: Fri Feb 02, 2007 9:53 am

Post by pdc124 »

so ive tried unmerging and then re-emerging zoneminder ( keeping the original /etc/zm.conf with the database settings )
and i still have no picture.

I cant shange any of the camera setting ( console->webcam->settings). When i enter a number in there it is blanked out - so where is this information stored , as the web process ( apache) cant write to the file ( well I think thats the problem )

log files

Code: Select all

chickcam ~ # tail -n 5 /var/log/zoneminder/zmdc.log
02/13/07 17:25:22.180217 zmdc[7358].ERR ['zmc -d /dev/video0' exited abnormally, exit status 255]
02/13/07 17:25:33.175270 zmdc[7358].INF ['zmc -d /dev/video0' starting at 07/02/13 17:25:33, pid = 7894]
02/13/07 17:25:33.337220 zmdc[7358].ERR ['zmc -d /dev/video0' exited abnormally, exit status 255]
02/13/07 17:25:44.428014 zmdc[7358].INF ['zmc -d /dev/video0' starting at 07/02/13 17:25:44, pid = 7899]
02/13/07 17:25:44.612209 zmdc[7358].ERR ['zmc -d /dev/video0' exited abnormally, exit status 255]
chickcam ~ # tail -n 5 /var/log/zoneminder/zmwatch.log
02/13/07 17:26:18.145326 zmwatch[7399].INF ['zmc -d /dev/video0' starting at 07/02/13 17:26:18, pid = 7912]
02/13/07 17:26:28.153059 zmwatch[7399].INF [Restarting capture daemon for webcam, shared memory not valid]
02/13/07 17:26:29.317717 zmwatch[7399].INF ['zmc -d /dev/video0' starting at 07/02/13 17:26:29, pid = 7916]
02/13/07 17:26:39.325909 zmwatch[7399].INF [Restarting capture daemon for webcam, shared memory not valid]
02/13/07 17:26:40.572511 zmwatch[7399].INF ['zmc -d /dev/video0' starting at 07/02/13 17:26:40, pid = 7921]
chickcam ~ #                                                                                                                      
hickcam ~ # tail -n 5 /var/log/zoneminder/zmaudit.log
02/13/07 16:54:05.252184 zmaudit[5836].DBG [Got 0 events]
02/13/07 17:06:40.512649 zmaudit[6743].DBG [Found database monitor '1']
02/13/07 17:06:40.515030 zmaudit[6743].DBG [Got 0 events]
02/13/07 17:20:24.486085 zmaudit[7392].DBG [Found database monitor '1']
02/13/07 17:20:24.488533 zmaudit[7392].DBG [Got 0 events]
chickcam ~ #                        
( camsource gives me a picture and it streams )
pdc124
Posts: 15
Joined: Fri Feb 02, 2007 9:53 am

Post by pdc124 »

ive manually added user apache to the video group and my picture has come back !
Must be a gentoo thing - theres a similar problem and solution with gentoo on this forum.

The problem now is that if i rotate to L or R then then the image disappears.

Code: Select all

02/14/07 19:03:30.059449 zmdc[6336].INF [Starting pending process, zmc -d /dev/video0]
02/14/07 19:03:30.070110 zmdc[6336].INF ['zmc -d /dev/video0' starting at 07/02/14 19:03:30, pid = 6844]
02/14/07 19:03:31.353409 zmdc[6336].INF ['zmc -d /dev/video0' stopping at 07/02/14 19:03:31]
02/14/07 19:03:31.841067 zmdc[6336].INF ['zmc -d /dev/video0' crashed, signal 14]
02/14/07 19:03:42.935363 zmdc[6336].INF ['zmc -d /dev/video0' starting at 07/02/14 19:03:42, pid = 6856]
02/14/07 19:03:45.656050 zmdc[6336].ERR ['zmc -d /dev/video0' exited abnormally, exit status 255]
02/14/07 19:03:54.249766 zmdc[6336].INF ['zmc -d /dev/video0' starting at 07/02/14 19:03:54, pid = 6866]
02/14/07 19:03:56.986587 zmdc[6336].ERR ['zmc -d /dev/video0' exited abnormally, exit status 255]
02/14/07 19:04:05.510889 zmdc[6336].INF ['zmc -d /dev/video0' starting at 07/02/14 19:04:05, pid = 6875]
02/14/07 19:04:08.371976 zmdc[6336].ERR ['zmc -d /dev/video0' exited abnormally, exit status 255]
other manipulations ( invert/flip) are OK .
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

You will probably if you search your logs find an attribute error which is the result of rotating your image as documented in the README:
Orientation – If your camera is mounted upside down or at right angles you can use this field to specify a rotation that is applied to the image as it is captured. This incurs an additional processing overhead so if possible it is better to mount your camera the right way round if you can. If you choose one of the rotation options remember to switch the height and width fields so that they apply, e.g. if your camera captures at 352x288 and you choose ‘Rotate Right’ here then set the height to be 352 and width to be 288. You can also choose to ‘flip’ the image if your camera provides mirrored input.
pdc124
Posts: 15
Joined: Fri Feb 02, 2007 9:53 am

Post by pdc124 »

thanks for the help - ive added what i had to do to the wiki
Locked