No camera picture

Forum for questions and support relating to the 1.24.x releases only.
Locked
aruzsi
Posts: 16
Joined: Sat Aug 21, 2010 4:11 pm
Location: Budapest

No camera picture

Post by aruzsi »

Hi,

SuSE 11.3, ZM from rpm.
The install was successfull.

Camera is an USB webcamera.
There is movie under Xawtv and I can take still pictures.

zmdc.log is full of this kind of lines:
zmdc[7974].INF [Starting pending process, zmc -d /dev/video0]
zmdc[7974].INF ['zmc -d /dev/video0' starting at 10/09/28 20:32:19, pid = 8490]
zmdc[7974].ERR ['zmc -d /dev/video0' exited abnormally, exit status 11]
...
zmdc[7974].INF [Starting pending process, zmc -d /dev/video]
zmdc[7974].INF ['zmc -d /dev/video' starting at 10/09/28 20:38:02, pid = 8653]
zmdc[7974].ERR ['zmc -d /dev/video' exited abnormally, exit status 6]
...
zmdc[7974].INF [Starting pending process, zmc -m 1]
zmdc[7974].INF ['zmc -m 1' starting at 10/09/28 20:43:31, pid = 8809]
zmdc[7974].INF ['zmc -m 1' crashed, signal 6]
...
zmdc[7974].INF [Starting pending process, zmc -d /dev/video0]
zmdc[7974].INF ['zmc -d /dev/video0' starting at 10/09/28 22:40:19, pid = 11168]
zmdc[7974].ERR ['zmc -d /dev/video0' exited abnormally, exit status 255]
...

zmu -d /dev/video0 -V1 --query
d:/dev/video0|N:PC Camera|T:1|nC:1|nA:0|mxW:640|mxH:480|mnW:48|mnH:32|X:0|Y:0|W:640|H:480|P:0|D:8|B:32896|h:0|Cl:0|Cn:32896|w:39321|n0:zc3xx|C0:0|Fl0:0|T0:2|F0:0

What could be the problem?

TIA,
hengst
Posts: 28
Joined: Sun Sep 26, 2010 7:15 am
Location: Netherlands

Post by hengst »

what do other logs tell ?

permissions /dev/video0 ok ?
aruzsi
Posts: 16
Joined: Sat Aug 21, 2010 4:11 pm
Location: Budapest

Post by aruzsi »

hengst wrote:what do other logs tell ?

permissions /dev/video0 ok ?
I can't see any relevant lines in other zm* logs. Which one do I have to see?

Permission:
atom:/var/log/zm # ls -la /dev/video0
crw-rw-rw- 1 root video 81, 0 szept 29 10.02 /dev/video0

zm* processes are running at wwwrun user. I think the permission is all right because others can read/write the device.

I've got no ideas what is the problem. I'm not sure it is a camera problem.
aruzsi
Posts: 16
Joined: Sat Aug 21, 2010 4:11 pm
Location: Budapest

Post by aruzsi »

I switched on debugging:

09/29/10 12:55:51.139584 zma_m1[15285].INF-zm_debug.c/292 [New Debug Level = 5,
New Debug Log = /var/log/zm/zm_debug.log.15285]
09/29/10 12:55:51.141019 zma_m1[15285].DB1-zm_monitor.cpp/2262 [Got 1 monitors]
09/29/10 12:55:51.141960 zma_m1[15285].DB1-zm_monitor.cpp/338 [monitor purpose=2
]
09/29/10 12:55:51.142042 zma_m1[15285].DB1-zm_monitor.cpp/345 [mem.size=9217192]
09/29/10 12:55:51.142231 zma_m1[15285].ERR-zm_monitor.cpp/378 [Can't shmget, pro
bably not enough shared memory space free: Invalid argument]

atom:/var/log/zm # free
total used free shared buffers cached
Mem: 1011924 451196 560728 0 16900 298380
-/+ buffers/cache: 135916 876008
Swap: 2104476 0 2104476

atom:/var/log/zm # df
Fájlrendszer 1K-blokk Foglalt Szabad Fo.% Csatl. pont
/dev/sda10 49232744 3136048 43595780 7% /
devtmpfs 505748 284 505464 1% /dev
tmpfs 505960 4 505956 1% /dev/shm
hengst
Posts: 28
Joined: Sun Sep 26, 2010 7:15 am
Location: Netherlands

Post by hengst »

show us zmwatch.log ( peace of it )

also , maybe
http://www.zoneminder.com/wiki/index.php/Ubuntu_7.04
might be helpful.
hengst
Posts: 28
Joined: Sun Sep 26, 2010 7:15 am
Location: Netherlands

Post by hengst »

crossed your post ,

regarding shared mem try:

# To increase the shared memory on a live system to test,you have to be root !
so that would be :

sudo -i
echo 134217728 >/proc/sys/kernel/shmall
echo 134217728 >/proc/sys/kernel/shmmax
aruzsi
Posts: 16
Joined: Sat Aug 21, 2010 4:11 pm
Location: Budapest

Post by aruzsi »

hengst wrote:show us zmwatch.log ( peace of it )
zmwatch[8007].INF [Watchdog starting]
zmwatch[8007].INF [Watchdog pausing for 30 seconds]
zmwatch[8007].ERR [Can't get shared memory id '7a6d0001', 1: No such file or dir
zmwatch[8007].ERR [Can't get shared memory id '7a6d0001', 1: No such file or dir
zmwatch[8007].FAT [Can't execute: MySQL server has gone away]
zmwatch[5759].INF [Watchdog starting]
zmwatch[5759].INF [Watchdog pausing for 30 seconds]
zmwatch[14598].INF [Watchdog starting]
zmwatch[14598].INF [Watchdog pausing for 30 seconds]
zmwatch[14787].INF [Watchdog starting]
zmwatch[14787].INF [Watchdog pausing for 30 seconds]
zmwatch[14963].INF [Watchdog starting]
zmwatch[14963].INF [Watchdog pausing for 30 seconds]
aruzsi
Posts: 16
Joined: Sat Aug 21, 2010 4:11 pm
Location: Budapest

Post by aruzsi »

hengst wrote: echo 134217728 >/proc/sys/kernel/shmall
echo 134217728 >/proc/sys/kernel/shmmax
Without any modification my values are:

shmmax: 4294967295
shmall: 268435200

I think my values are higher. Do you agree?
aruzsi
Posts: 16
Joined: Sat Aug 21, 2010 4:11 pm
Location: Budapest

Post by aruzsi »

aruzsi wrote:
hengst wrote: shmmax: 4294967295
shmall: 268435200
Something is not clear for me:

atom:/proc/sys/kernel # ipcs

------- Osztott memóriaszegmensek --------
kulcs o.m.-az tulajdonos jogok bájt csat.szám állapot
0x00000000 0 lxdm 600 393216 2 cél
0x00000000 32769 lxdm 600 393216 2 cél
0x00000000 98306 root 600 67108864 11 cél
0x7a6d0001 229379 wwwrun 700 3073192 0
aruzsi
Posts: 16
Joined: Sat Aug 21, 2010 4:11 pm
Location: Budapest

Post by aruzsi »

Bigger log: (I think went further without I modified shmem but modified permission video0 to 777)

zmc_dvideo0[15655].INF-zm_debug.c/292 [New Debug Level = 9, New Debug Log = /var/log/zm/zm_debug.log.15655]
zmc_dvideo0[15655].DB1-zm_monitor.cpp/1712 [Got 1 monitors]
zmc_dvideo0[15655].DB2-zm_local_camera.cpp/286 [V4L2 support enabled, using V4L2 api]
zmc_dvideo0[15655].DB1-zm_monitor.cpp/338 [monitor purpose=1]
zmc_dvideo0[15655].DB1-zm_monitor.cpp/345 [mem.size=9217192]
zmc_dvideo0[15655].DB1-zm_zone.cpp/50 [Initialised zone 0/All - 1 - 320x240 - Rgb:ff0000, CM:3, MnAT:15, MxAT:0, MnAP:50, MxAP:75000, FB:3x3, MnFP:50, MxFP:50000, MnBS:10, MxBS:0, MnB:0, MxB:0, OF: 0]
zmc_dvideo0[15655].DB9-zm_image.cpp/1355 [x1:0,y1:239 x2:0,y2:0]
zmc_dvideo0[15655].DB9-zm_image.cpp/1355 [x1:0,y1:0 x2:319,y2:0]
zmc_dvideo0[15655].DB9-zm_image.cpp/1355 [x1:319,y1:0 x2:319,y2:239]
zmc_dvideo0[15655].DB9-zm_image.cpp/1355 [x1:319,y1:239 x2:0,y2:239]
zmc_dvideo0[15655].DB9-zm_image.cpp/1375 [0: min_y: 0, max_y:239, min_x:0.00, 1/m:-0.00]
zmc_dvideo0[15655].DB9-zm_image.cpp/1375 [1: min_y: 0, max_y:239, min_x:319.00, 1/m:0.00]
zmc_dvideo0[15655].DB9-zm_image.cpp/1389 [Moving global edge]
zmc_dvideo0[15655].DB9-zm_image.cpp/1389 [Moving global edge]
zmc_dvideo0[15655].DB9-zm_image.cpp/1410 [0 - 0: min_y: 0, max_y:239, min_x:0.00, 1/m:-0.00]
...
zmc_dvideo0[15655].DB9-zm_image.cpp/1317 [x:2, y:239.00]
zmc_dvideo0[15655].DB9-zm_image.cpp/1317 [x:1, y:239.00]
zmc_dvideo0[15655].DB1-zm_monitor.cpp/1814 [Loaded monitor 1(Monitor-1), 1 zones]
zmc_dvideo0[15655].INF-zmc.cpp/188 [Starting Capture]
zmc_dvideo0[15655].DB3-zm_local_camera.cpp/349 [Opening video device /dev/video0]
zmc_dvideo0[15655].DB2-zm_local_camera.cpp/355 [V4L2 support enabled, using V4L2 api]
zmc_dvideo0[15655].DB3-zm_local_camera.cpp/360 [Checking video device capabilities]
zmc_dvideo0[15655].DB3-zm_local_camera.cpp/370 [Setting up video format]
zmc_dvideo0[15655].DB3-zm_local_camera.cpp/399 [Setting up request buffers]
zmc_dvideo0[15655].DB3-zm_local_camera.cpp/427 [Setting up 8 data buffers]
zmc_dvideo0[15655].DB3-zm_local_camera.cpp/465 [Configuring video source]
zmc_dvideo0[15655].WAR-zm_local_camera.cpp/1279 [Hue control is not suppported]
zmc_dvideo0[15655].WAR-zm_local_camera.cpp/1336 [Saturation control is not suppported]
zmc_dvideo0[15655].DB3-zm_local_camera.cpp/654 [Setting up static colour tables]
zmc_dvideo0[15655].DB2-zm_local_camera.cpp/1439 [Priming capture]
zmc_dvideo0[15655].DB3-zm_local_camera.cpp/1443 [Queueing buffers]
zmc_dvideo0[15655].DB3-zm_local_camera.cpp/1459 [Starting video stream]
zmc_dvideo0[15655].DB2-zm_local_camera.cpp/1485 [Pre-capturing]
zmc_dvideo0[15655].DB3-zm_local_camera.cpp/1491 [Capturing]
zmc_dvideo0[15655].DB3-zm_local_camera.cpp/1514 [Capturing 1 frames]
zmc_dvideo0[15655].DB3-zm_local_camera.cpp/1538 [Captured frame 0/1 from channel 0]
zmc_dvideo0[15655].DB3-zm_local_camera.cpp/1572 [Doing format conversion]
zmc_dvideo0[15655].DB3-zm_local_camera.cpp/1878 [Assigning image]
zmc_dvideo0[15655].INF-zm_signal.cpp/72 [Got signal 11 (Segmentation fault), crashing]
zmc_dvideo0[15655].ERR-zm_signal.cpp/84 [Signal address is 0xb78ce000, from 0xb72a83f6]
zmc_dvideo0[15655].ERR-zm_signal.cpp/122 [Backtrace: /lib/libc.so.6(memcpy+0x46) [0xb72a83f6]]
zmc_dvideo0[15655].ERR-zm_signal.cpp/122 [Backtrace: /lib/libc.so.6(memcpy+0x46) [0xb72a83f6]]
zmc_dvideo0[15655].ERR-zm_signal.cpp/122 [Backtrace: /usr/bin/zmc() [0xbfc4804]]
zmc_dvideo0[15655].ERR-zm_signal.cpp/122 [Backtrace: /usr/bin/zmc() [0x806e604]]
zmc_dvideo0[15655].ERR-zm_signal.cpp/122 [Backtrace: /usr/bin/zmc() [0x804c5f4]]
zmc_dvideo0[15655].ERR-zm_signal.cpp/122 [Backtrace: /lib/libc.so.6(__libc_start_main+0xfe) [0xb7246c0e]]
zmc_dvideo0[15655].INF-zm_signal.cpp/125 [Backtrace complete, please execute the following command for more information]
zmc_dvideo0[15655].INF-zm_signal.cpp/126 [addr2line -e /lib/libc.so.6(__libc_start_main+0xfe) 0xb72a83f6 0xb72a83f6 0xbfc4804 0x806e604 0x804c5f4 0xb7246c0e]
hengst
Posts: 28
Joined: Sun Sep 26, 2010 7:15 am
Location: Netherlands

Post by hengst »

still looks like problem i had with crashing streams. and couldnt read the problem in the log files.

from my own post :
when googling fr the answer about the error :
[Can't get shared memory id '7a6d0002', 2: No such file or directory]
i always did get lot of searchresults about setting the shared memory thing

could change that settings but the error wouldnt get away and i still did get lockups in the montage view.

till i found that setting the "Maximum FPS" to something like "5" solved my problem regarding lockups.

so i think letting this option to default , ( wich is nothing ) it eats up all its memory or something and then crashes the source.

also Maximum FPS set to 5 did get rid of those [Can't get shared memory id '7a6d0002', 2: No such file or directory] errors in the zmwatch.log[/code]
do you have set the Max FPS ? , would you try it setting it to 5 or so to test ?
aruzsi
Posts: 16
Joined: Sat Aug 21, 2010 4:11 pm
Location: Budapest

Post by aruzsi »

Max. FPS was 5. :-(
aruzsi
Posts: 16
Joined: Sat Aug 21, 2010 4:11 pm
Location: Budapest

Post by aruzsi »

BTW:
Do you think is this a camera problem?

I asked my colleagues to give me an other webcam for a test... in some days I'll get them.

At home, on my notebook (DELL E6400 with 4GB RAM) there is a built in webcam. OS is Ubuntu 10.04 64 bit and ZM doesn't work, either. :-(
The situation is almost the same. Tonight I'm going to setup higher debug level and I'm going to test.

This other test machine is a small Atom PC with 1GB RAM and external USB webcam.
hengst
Posts: 28
Joined: Sun Sep 26, 2010 7:15 am
Location: Netherlands

Post by hengst »

your other software can use the USB cam, so think zm should be able too.

iḿ strugling long time now with Panasonic IP cams and yesterday i found those issues with shared mem and Max FPS settings where causing my cams crashing random.

logs where telling me always shared memory problems. with a refresh all was running again for a short while.
so did me thinking about too much data to be stored in available shared mem , thats wy i increased shmall but still after a while crashes on my cams.
so second thought was to limit data from cams by setting Max FPS to 5.
and problems where solved.

looking at your deeper logs, i would say cam is initalized fine , but when getting pictures ( [Assigning image]) things are going wrong.

only thing i can help with from here is to point you to some other post
; http://www.zoneminder.com/forums/viewtopic.php?p=53728
aruzsi
Posts: 16
Joined: Sat Aug 21, 2010 4:11 pm
Location: Budapest

Post by aruzsi »

I think I did everything what the mentioned topic wrote.
I read your problem which is related to mine a little bit.

Thanks for your help.
I think ZM is not my sw, yet.
Locked