Problems setting up my webcams

Forum for questions and support relating to the 1.24.x releases only.
Locked
henfri
Posts: 5
Joined: Fri Apr 22, 2011 5:53 pm

Problems setting up my webcams

Post by henfri »

Hello,

first of all I'd like to thank you for this interesting software.
Then I'd like to introduce myself:
We will start building our house soon, and with zoneminder I want to regularly take photos, loading them up to some webspace and later creating a timelapse of it. For this purpose, I want to use 1-2 webcams attached to it.

I have two webcams attached to my zoneminder, which is running on Debian on a Dockstar (Armel).
Below, you find the data of the webcams.

The problem I have is, that I get no output opening the monitors, see the attachment.

Could you please help me, to figure out, what settings I need for these cameras?

Thanks a lot. I've already spent a lot of time, trying around :-(

Greetings,
Hendrik

Code: Select all

Video Device: /dev/video0
Video Capabilities
  Name: Camera
  Type: 1
    Can capture
  Video Channels: 1
  Audio Channels: 0
  Maximum Width: 352
  Maximum Height: 288
  Minimum Width: 48
  Minimum Height: 32
Window Attributes
  X Offset: 0
  Y Offset: 0
  Width: 352
  Height: 288
Picture Attributes
  Palette: 0 - Unknown
  Colour Depth: 8
  Brightness: 0
  Hue: 32768
  Colour :0
  Contrast: 0
  Whiteness: 0
Channel 0 Attributes
  Name: spca561
  Channel: 0
  Flags: 0
  Type: 2 - Camera
  Format: 0 - PAL

Code: Select all

Video Device: /dev/video1
General Capabilities
  Driver: uvcvideo
  Card: UVC Camera (046d:0821)
  Bus: usb-orion-ehci.0-1.4.2
  Version: 0.1.0
  Type: 0x4000001
    Supports video capture (X)
    Does not support video output
    Does not support frame buffer overlay
    Does not support VBI capture
    Does not support VBI output
    Does not support sliced VBI capture
    Does not support sliced VBI output
    Does not support video output overlay
    Does not have tuner
    Does not have audio in and/or out
    Does not have radio
    Does not support read/write i/o (X)
    Does not support async i/o
    Supports streaming i/o (X)
    Standards:
  Formats:
    YUV 4:2:2 (YUYV) (YUYV)
    MJPEG (MJPG)
Crop Capabilities
  Bounds: 640 x 480
  Default: 640 x 480
  Current: Cropping is not supported
Inputs: 1
  Input 0
    Name: Camera 1
    Type: Camera
    Audioset: 00000000
    Standards: 0x0
    Power on  (X)
    Signal detected  (X)
    Colour Signal detected
    Horizontal Lock detected
Attachments
zoneminder.PNG
zoneminder.PNG (111.28 KiB) Viewed 3754 times
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Re: Problems setting up my webcams

Post by zoneminder »

You shoudl probably read this post and include some of the output from the log files otherwise nobody can really do anything other than guess.
Phil
henfri
Posts: 5
Joined: Fri Apr 22, 2011 5:53 pm

Re: Problems setting up my webcams

Post by henfri »

Hi Phil,

thanks for your reply.
The first log (var/log/messages) shows only:

Code: Select all

May 22 19:54:13 HomeServer zmdc[1799]: INF ['zmc -d /dev/video0' starting at 11/05/22 19:54:13, pid = 1967]
May 22 19:54:14 HomeServer zmdc[1967]: INF ['zmc -d /dev/video0' started at 11/05/22 19:54:14]
May 22 19:54:14 HomeServer zmc_dvideo0[1967]: INF [Debug Level = 0, Debug Log = <none>]
May 22 19:54:18 HomeServer zmc_dvideo0[1967]: INF [Starting Capture]
May 22 19:54:18 HomeServer zmc_dvideo0[1967]: INF [Got signal 6 (Aborted), exiting and forcing backtrace]
May 22 20:01:10 HomeServer zmdc[1799]: INF [Starting pending process, zmc -d /dev/video1]
May 22 20:01:10 HomeServer zmdc[1799]: INF ['zmc -d /dev/video1' starting at 11/05/22 20:01:10, pid = 1997]
May 22 20:01:10 HomeServer zmdc[1997]: INF ['zmc -d /dev/video1' started at 11/05/22 20:01:10]
May 22 20:01:10 HomeServer zmc_dvideo1[1997]: INF [Debug Level = 0, Debug Log = <none>]
Similarly:

Code: Select all

05/22/11 19:18:19.011459 zmdc[1157].INF [Starting pending process, zmc -d /dev/video1]
05/22/11 19:18:19.022076 zmdc[1157].INF ['zmc -d /dev/video1' starting at 11/05/22 19:18:19, pid = 1694]
05/22/11 19:18:20.029649 zmdc[1157].ERR ['zmc -d /dev/video1' exited abnormally, exit status 255]
05/22/11 19:18:48.172338 zmdc[1157].INF [Starting pending process, zmc -d /dev/video0]
05/22/11 19:18:51.435121 zmdc[1157].INF ['zmc -d /dev/video0' starting at 11/05/22 19:18:51, pid = 1736]
05/22/11 19:18:58.348423 zmdc[1157].ERR ['zmc -d /dev/video0' exited abnormally, exit status 6]
05/22/11 19:19:25.020960 zmdc[1157].INF ['zmaudit.pl -c' stopping at 11/05/22 19:19:25]
05/22/11 19:19:25.051421 zmdc[1157].INF ['zmaudit.pl -c' exited, signal 14]
05/22/11 19:19:25.053422 zmdc[1157].INF ['zmwatch.pl ' stopping at 11/05/22 19:19:25]
05/22/11 19:19:25.059654 zmdc[1157].INF ['zmwatch.pl ' exited, signal 14]
05/22/11 19:19:25.062624 zmdc[1157].INF ['zmfilter.pl ' stopping at 11/05/22 19:19:25]
05/22/11 19:19:25.071189 zmdc[1157].INF ['zmfilter.pl ' exited, signal 14]
Also, this seems odd:

Code: Select all

05/22/11 19:17:21.031412 zmwatch[1205].INF [Watchdog starting]
05/22/11 19:17:21.033459 zmwatch[1205].INF [Watchdog pausing for 30 seconds]
05/22/11 19:17:51.255658 zmwatch[1205].ERR [Can't get shared memory id '7a6d0002', 2: No such file or directory]
05/22/11 19:18:01.723487 zmwatch[1205].ERR [Can't get shared memory id '7a6d0002', 2: No such file or directory]
05/22/11 19:18:11.729617 zmwatch[1205].ERR [Can't get shared memory id '7a6d0002', 2: No such file or directory]
05/22/11 19:18:22.624914 zmwatch[1205].ERR [Can't get shared memory id '7a6d0002', 2: No such file or directory]
05/22/11 19:18:34.707105 zmwatch[1205].ERR [Can't get shared memory id '7a6d0002', 2: No such file or directory]
05/22/11 19:18:45.400646 zmwatch[1205].ERR [Can't get shared memory id '7a6d0002', 2: No such file or directory]
05/22/11 19:18:55.411183 zmwatch[1205].ERR [Can't get shared memory id '7a6d0002', 2: No such file or directory]
05/22/11 19:19:07.322299 zmwatch[1205].ERR [Can't get shared memory id '7a6d0002', 2: No such file or directory]
05/22/11 19:19:17.345611 zmwatch[1205].ERR [Can't get shared memory id '7a6d0002', 2: No such file or directory]
I am using ZoneMinder 1.24.2-8 on Debian squeeze (armel). (packet zoneminder_1.24.2-8_armel.deb)

Unfortunately, the FAQs show only entries for monitors with timestamp. But I don't even have the timestamp (see Screenshot above).

Greetings,
Hendrik
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Re: Problems setting up my webcams

Post by zoneminder »

There are a few other logs to check, see http://www.zoneminder.com/wiki/index.ph ... e_Shooting but also it may be that it would be worth running in debug mode and capturing a debug log.
Phil
henfri
Posts: 5
Joined: Fri Apr 22, 2011 5:53 pm

Re: Problems setting up my webcams

Post by henfri »

Hello Phil,
There are three scopes of debug available. Leaving this option blank means that all components will use extra debug (not recommended). Setting this option to '_<component>', e.g. _zmc, will limit extra debug to that component only. Setting this option to '_<component>_<identity>', e.g. '_zmc_m1' will limit extra debug to that instance of the component only. This is ordinarily what you probably want to do.
Can you hint me, what component I should limit the extra debug to?

Besides this: Do you think from the screenshot and information about my camera above, that my settings are correct?

Regards,
Hendrik
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Re: Problems setting up my webcams

Post by zoneminder »

If you only have the two monitors and they are both causing trouble then just specifying 'zmc' will create a file for each zmc process, suffixed by pid. Otherwise the syntax is zmc_ddevvideo0 (avoiding '/' etc). I would suggest using level 5 to start with,
Phil
henfri
Posts: 5
Joined: Fri Apr 22, 2011 5:53 pm

Re: Problems setting up my webcams

Post by henfri »

Hello,

I have used these settings:
EXTRA_DEBUG checked
EXTRA_DEBUG_TARGET zmc or zmc_ddevvideo0
EXTRA_DEBUG_LEVEL 5
EXTRA_DEBUG_LOG /tmp/zm_debug.log+

I have saved these settings.

The result is not, what I expected:

Code: Select all

ls /tmp/z*
/tmp/zmaudit.log  /tmp/zmdc.log  /tmp/zmdc.sock  /tmp/zmfilter.log  /tmp/zmpkg.log  /tmp/zmwatch.log

/tmp/zmswap-m3:
Do you have a hint?

Regards,
Hendrik
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Re: Problems setting up my webcams

Post by zoneminder »

That should be enough, but I would do a full ZM restart if you haven't already. Failing that we will have to run it from the command line and see what you get.

Do

Code: Select all

export ZM_DBG_PRINT=1
export ZM_DBG_LEVEL=5
/path/to/zmc -d /dev/video0
in a shell and see what that squirts out.
Phil
henfri
Posts: 5
Joined: Fri Apr 22, 2011 5:53 pm

Re: Problems setting up my webcams

Post by henfri »

Thanks.
Here we go:

Code: Select all

/usr/bin/zmc -d /dev/video0
05/23/11 22:28:18.927679 zmc_dvideo0[7387].INF-zm_debug.c/224 [Debug Level = 5, Debug Log = <none>]
05/23/11 22:28:18.951126 zmc_dvideo0[7387].DB1-zm_monitor.cpp/1712 [Got 1 monitors]
05/23/11 22:28:18.951581 zmc_dvideo0[7387].DB2-zm_local_camera.cpp/286 [V4L2 support enabled, using V4L1 api]
05/23/11 22:28:18.953995 zmc_dvideo0[7387].DB1-zm_monitor.cpp/338 [monitor purpose=1]
05/23/11 22:28:18.954165 zmc_dvideo0[7387].DB1-zm_monitor.cpp/345 [mem.size=12166312]
05/23/11 22:28:25.392532 zmc_dvideo0[7387].DB1-zm_zone.cpp/50 [Initialised zone 0/All - 1 - 352x288 - 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]
05/23/11 22:28:25.421079 zmc_dvideo0[7387].DB1-zm_monitor.cpp/458 [Monitor spca has function 2]
05/23/11 22:28:25.421274 zmc_dvideo0[7387].DB1-zm_monitor.cpp/459 [Monitor spca LBF = '%N - %y/%m/%d %H:%M:%S', LBX = 0, LBY = 0]
05/23/11 22:28:25.421428 zmc_dvideo0[7387].DB1-zm_monitor.cpp/460 [Monitor spca IBC = 40, WUC = 25, pEC = 10, PEC = 10, EAF = 1, FRI = 1000, RBP = 7, FM = 0]
05/23/11 22:28:25.422095 zmc_dvideo0[7387].DB1-zm_zone.cpp/889 [Got 1 zones for monitor spca]
05/23/11 22:28:25.422556 zmc_dvideo0[7387].DB5-zm_zone.cpp/918 [Parsing polygon 0,0 351,0 351,287 0,287]
05/23/11 22:28:25.423067 zmc_dvideo0[7387].DB3-zm_zone.cpp/758 [Parsing polygon string '0,0 351,0 351,287 0,287']
05/23/11 22:28:25.423242 zmc_dvideo0[7387].DB3-zm_zone.cpp/796 [Got coordinate 0,0 from polygon string]
05/23/11 22:28:25.423392 zmc_dvideo0[7387].DB3-zm_zone.cpp/796 [Got coordinate 351,0 from polygon string]
05/23/11 22:28:25.423538 zmc_dvideo0[7387].DB3-zm_zone.cpp/796 [Got coordinate 351,287 from polygon string]
05/23/11 22:28:25.423684 zmc_dvideo0[7387].DB3-zm_zone.cpp/796 [Got coordinate 0,287 from polygon string]
05/23/11 22:28:25.423853 zmc_dvideo0[7387].DB3-zm_zone.cpp/816 [Successfully parsed polygon string]
05/23/11 22:28:25.424258 zmc_dvideo0[7387].DB1-zm_zone.cpp/50 [Initialised zone 3/All - 1 - 352x288 - Rgb:ff0000, CM:3, MnAT:25, MxAT:0, MnAP:3041, MxAP:76032, FB:3x3, MnFP:3041, MxFP:76032, MnBS:2027, MxBS:0, MnB:1, MxB:0, OF: 0]
05/23/11 22:28:25.454507 zmc_dvideo0[7387].DB1-zm_monitor.cpp/1814 [Loaded monitor 3(spca), 1 zones]
05/23/11 22:28:25.454707 zmc_dvideo0[7387].INF-zmc.cpp/188 [Starting Capture]
05/23/11 22:28:25.455888 zmc_dvideo0[7387].DB3-zm_local_camera.cpp/349 [Opening video device /dev/video0]
05/23/11 22:28:25.456132 zmc_dvideo0[7387].DB2-zm_local_camera.cpp/355 [V4L2 support enabled, using V4L1 api]
05/23/11 22:28:25.456291 zmc_dvideo0[7387].DB3-zm_local_camera.cpp/502 [Configuring picture attributes]
05/23/11 22:28:25.456480 zmc_dvideo0[7387].DB4-zm_local_camera.cpp/509 [Old P:0]
05/23/11 22:28:25.456629 zmc_dvideo0[7387].DB4-zm_local_camera.cpp/510 [Old D:8]
05/23/11 22:28:25.456819 zmc_dvideo0[7387].DB4-zm_local_camera.cpp/511 [Old B:0]
05/23/11 22:28:25.456963 zmc_dvideo0[7387].DB4-zm_local_camera.cpp/512 [Old h:32768]
05/23/11 22:28:25.457726 zmc_dvideo0[7387].DB4-zm_local_camera.cpp/513 [Old Cl:0]
05/23/11 22:28:25.457890 zmc_dvideo0[7387].DB4-zm_local_camera.cpp/514 [Old Cn:0]
05/23/11 22:28:25.458060 zmc_dvideo0[7387].DB3-zm_local_camera.cpp/551 [Configuring window attributes]
05/23/11 22:28:25.458218 zmc_dvideo0[7387].DB4-zm_local_camera.cpp/560 [Old X:0]
05/23/11 22:28:25.458364 zmc_dvideo0[7387].DB4-zm_local_camera.cpp/561 [Old Y:0]
05/23/11 22:28:25.458510 zmc_dvideo0[7387].DB4-zm_local_camera.cpp/562 [Old W:352]
05/23/11 22:28:25.458654 zmc_dvideo0[7387].DB4-zm_local_camera.cpp/563 [Old H:288]
05/23/11 22:28:25.458823 zmc_dvideo0[7387].DB3-zm_local_camera.cpp/578 [Setting up request buffers]
05/23/11 22:28:25.459111 zmc_dvideo0[7387].DB4-zm_local_camera.cpp/584 [vmb.frames = 4]
05/23/11 22:28:25.459265 zmc_dvideo0[7387].DB4-zm_local_camera.cpp/585 [vmb.size = 212992]
05/23/11 22:28:25.459634 zmc_dvideo0[7387].DB3-zm_local_camera.cpp/587 [Setting up 4 frame buffers]
05/23/11 22:28:25.460074 zmc_dvideo0[7387].DB3-zm_local_camera.cpp/612 [Configuring video source]
05/23/11 22:28:25.460248 zmc_dvideo0[7387].DB4-zm_local_camera.cpp/620 [Old C:0]
05/23/11 22:28:25.460399 zmc_dvideo0[7387].DB4-zm_local_camera.cpp/621 [Old F:0]
05/23/11 22:28:25.460581 zmc_dvideo0[7387].DB4-zm_local_camera.cpp/622 [Old Fl:0]
05/23/11 22:28:25.461758 zmc_dvideo0[7387].DB4-zm_local_camera.cpp/623 [Old T:2]
05/23/11 22:28:25.462042 zmc_dvideo0[7387].ERR-zm_local_camera.cpp/630 [Failed to set camera source 0: Invalid argument]
The last line seems to be it?!

The other cam:

Code: Select all

/usr/bin/zmc -d /dev/video1
05/23/11 22:29:21.062013 zmc_dvideo1[7390].INF-zm_debug.c/224 [Debug Level = 5, Debug Log = <none>]
05/23/11 22:29:21.157393 zmc_dvideo1[7390].DB1-zm_monitor.cpp/1712 [Got 1 monitors]
05/23/11 22:29:21.157898 zmc_dvideo1[7390].DB2-zm_local_camera.cpp/286 [V4L2 support enabled, using V4L2 api]
05/23/11 22:29:21.164603 zmc_dvideo1[7390].DB1-zm_monitor.cpp/338 [monitor purpose=1]
05/23/11 22:29:21.164786 zmc_dvideo1[7390].DB1-zm_monitor.cpp/345 [mem.size=36865192]
05/23/11 22:29:21.165072 zmc_dvideo1[7390].ERR-zm_monitor.cpp/378 [Can't shmget, probably not enough shared memory space free: Invalid argument]
Greetings,
Hendrik
mastertheknife
Posts: 678
Joined: Wed Dec 16, 2009 4:32 pm
Location: Israel

Re: Problems setting up my webcams

Post by mastertheknife »

Hi,

Try using the V4L2 API instead, it has much better support for USB video devices.

mastertheknife
Kfir Itzhak.
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Re: Problems setting up my webcams

Post by zoneminder »

Also try with a smaller image size (to start with) for the second one or read this if you want to do a proper adjustment.
Phil
Locked