Page 2 of 2

Posted: Mon Nov 17, 2008 7:34 am
by blindvic
Anyone?
I would really appreciate your help.

Posted: Tue Nov 18, 2008 2:18 pm
by zoneminder
Have you done a frame grab with xawtv as that uses a different mechanism than just looking at live video?

Also, try setting ZM_DBG_PRINT=1 and ZM_DBG_LEVEL=9 in your environment prior to running zmu and see if that sheds any more light on things.

Posted: Wed Nov 19, 2008 7:28 am
by blindvic
root@victort-desktop:~# export ZM_DBG_PRINT=1
root@victort-desktop:~# export ZM_DBG_LEVEL=9
root@victort-desktop:~# zmu -d /dev/video0 -q -v
11/19/08 09:21:52.955880 zmu[6765].INF-zm_debug.c/237 [Debug Level = 9, Debug Log = <none>]
11/19/08 09:21:53.027068 zmu[6765].ERR-zm_local_camera.cpp/427 [Failed to get channel 0 attributes: Invalid argument]
Error, failed to get channel 0 attributes: Invalid argument



root@victort-desktop:~# dmesg
...
[ 162.144076] usb 1-5: new high speed USB device using ehci_hcd and address 2
[ 162.424830] usb 1-5: configuration #1 chosen from 1 choice
[ 163.949052] Linux video capture interface: v2.00
[ 164.077757] usbcore: registered new interface driver snd-usb-audio
[ 164.178028] uvcvideo: Found UVC 1.00 device <unnamed> (046d:08ce)
[ 164.201101] input: UVC Camera (046d:08ce) as /devices/pci0000:00/0000:00:02.1/usb1/1-5/1-5:1.0/input/input6
[ 164.212349] usbcore: registered new interface driver uvcvideo
[ 164.214383] USB Video Class driver (v0.1.0)
[ 482.688732] uvcvideo: Failed to query (129) UVC control 7 (unit 2) : -32 (exp. 2).
[ 504.992114] uvcvideo: Failed to query (1) UVC control 1 (unit 0) : -32 (exp. 26).



I cannot take a screenshot in xawtv (pressing j) - it freezes. Also it freezes when i just close xawtv. System Monitor shows that xawtv.bin is waiting uvc_dequeue_buffer

Thanks for helping me

Up?

Posted: Mon Nov 24, 2008 7:27 am
by blindvic
Anybody there?

Posted: Thu Nov 27, 2008 1:30 pm
by blindvic
*shooting up in vain*

Posted: Sun Jul 05, 2009 2:16 pm
by blindvic
So here i am again...
The problem still persists
I have:
Kubuntu 9.10, Zoneminder 1.24.1 from official repositories.

Code: Select all

vic@vic-desktop:~$ lsusb
...
Bus 001 Device 003: ID 046d:08ce Logitech, Inc. QuickCam Pro 5000
...
Zoneminder is installed.
VLC and XawTV get the video. XawTC takes screenshots.
And Zoneminder doesn't:
Image

Code: Select all

/temp/zmdc.log
...
07/05/09 16:43:33.088819 zmdc[3248].INF [Command 'zmc -d /dev/video0' removed from pending list at 09/07/05 16:43:33]
07/05/09 16:43:33.260833 zmdc[3248].INF ['zmc -d /dev/video0' starting at 09/07/05 16:43:33, pid = 6398]
07/05/09 16:43:33.294068 zmdc[3248].ERR ['zmc -d /dev/video0' exited abnormally, exit status 255]
07/05/09 16:43:33.294410 zmdc[3248].INF [Starting pending process, zmc -d /dev/video0]
07/05/09 16:43:33.314147 zmdc[3248].INF [Can't find child with pid of '6400']
07/05/09 16:43:33.314663 zmdc[3248].INF ['zmc -d /dev/video0' starting at 09/07/05 16:43:33, pid = 6400]
07/05/09 16:43:33.460676 zmdc[3248].WAR [Can't find process with command of 'zma -m 1']
My settings:
Image
Image

Code: Select all

vic@vic-desktop:~$ export ZM_DBG_PRINT=1
vic@vic-desktop:~$ export ZM_DBG_LEVEL=9
vic@vic-desktop:~$ zmu -d /dev/video0 -q -v
07/05/09 17:02:03.378474 zmu[-1].INF-zm_debug.c/224 [Debug Level = 9, Debug Log = <none>]
07/05/09 17:02:03.446908 zmu[-1].ERR-zm_local_camera.cpp/866 [Failed to get channel 0 attributes: Invalid argument]
Error, failed to get channel 0 attributes: Invalid argument
Please, someone help me

Posted: Mon Jul 06, 2009 11:29 pm
by cordel
Have you checked to make sure the permissions are correct for your Distro?
Did you follow the README.deb that came with the package?
If I recall the README instructs to add the apache service to the video group, has this been done?
What happens if you chmod 777 /dev/video0 ?

Posted: Tue Jul 07, 2009 6:02 pm
by blindvic
'/usr/share/doc/zoneminder/README' file just says:
All documentation for ZoneMinder is now online at
http://www.zoneminder.com/wiki/index.php/Documentation
README.Debian:
zoneminder for Debian
---------------------

There is one manual step to get the web interface working.
You need to link /etc/zm/apache.conf to /etc/apache2/conf.d/zoneminder.conf,
then reload the apache config (i.e. /etc/init.d/apache2 reload)

-- Peter Howard <pjh>, Wed, 10 Jan 2007 16:35:51 +1100
What happens if you chmod 777 /dev/video0
Already did this before. Anyway XawTV is working under regular user.
www-data is in video group.

I tried another 2 webcams (creative and labtec). xawtv works perfectly, but i cannot see any image in http://localhost/zm/index.php?view=watch&mid=1
labtec:

Code: Select all

vic@vic-desktop:~$ export ZM_DBG_PRINT=1
vic@vic-desktop:~$ export ZM_DBG_LEVEL=9
vic@vic-desktop:~$ zmu -d /dev/video0 -q -v                                                                   
07/07/09 20:58:45.489794 zmu[-1].INF-zm_debug.c/224 [Debug Level = 9, Debug Log = <none>]                     
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
vic@vic-desktop:~$ zmc --device /dev/video0
07/07/09 21:00:03.543811 zmc_dvideo0[-1].INF-zm_debug.c/224 [Debug Level = 9, Debug Log = <none>]
07/07/09 21:00:03.553406 zmc_dvideo0[-1].DB1-zm_monitor.cpp/1708 [Got 1 monitors]
07/07/09 21:00:03.553592 zmc_dvideo0[-1].DB2-zm_local_camera.cpp/287 [V4L2 support enabled, using V4L2 api]
07/07/09 21:00:03.555487 zmc_dvideo0[-1].DB1-zm_monitor.cpp/338 [monitor purpose=1]
07/07/09 21:00:03.555590 zmc_dvideo0[-1].DB1-zm_monitor.cpp/345 [mem.size=12166644]
07/07/09 21:00:03.555669 zmc_dvideo0[-1].ERR-zm_monitor.cpp/378 [Can't shmget, probably not enough shared memory space free: Invalid argument]
creative:

Code: Select all

mu -d /dev/video0 -q -v                                                                   
07/07/09 20:47:08.461281 zmu[-1].INF-zm_debug.c/224 [Debug Level = 9, Debug Log = <none>]                     
Video Capabilities                                                                                            
  Name: USB Camera (041e:4051)
  Type: 1
    Can capture
  Video Channels: 1
  Audio Channels: 0
  Maximum Width: 640
  Maximum Height: 480
  Minimum Width: 48
  Minimum Height: 32
Window Attributes
  X Offset: 0
  Y Offset: 0
  Width: 640
  Height: 480
Picture Attributes
  Palette: 0 - Unknown
  Colour Depth: 8
  Brightness: 32896
  Hue: 0
  Colour :0
  Contrast: 32768
  Whiteness: 26214
Channel 0 Attributes
  Name: zc3xx
  Channel: 0
  Flags: 0
  Type: 2 - Camera
  Format: 0 - PAL
vic@vic-desktop:~$ zmc --device /dev/video0
07/07/09 20:56:39.401197 zmc_dvideo0[-1].INF-zm_debug.c/224 [Debug Level = 9, Debug Log = <none>]
07/07/09 20:56:39.412000 zmc_dvideo0[-1].DB1-zm_monitor.cpp/1708 [Got 1 monitors]
07/07/09 20:56:39.412180 zmc_dvideo0[-1].DB2-zm_local_camera.cpp/287 [V4L2 support enabled, using V4L1 api]
07/07/09 20:56:39.412854 zmc_dvideo0[-1].DB1-zm_monitor.cpp/338 [monitor purpose=1]
07/07/09 20:56:39.412912 zmc_dvideo0[-1].DB1-zm_monitor.cpp/345 [mem.size=3073524]
07/07/09 20:56:39.412993 zmc_dvideo0[-1].ERR-zm_monitor.cpp/378 [Can't shmget, probably not enough shared memory space free: Permission denied]
vic@vic-desktop:~$
Tried different combination of settings - shows either a black screen either nothing.
It looks like the problem is in program settings, but i have no idea where else to look.
Maybe it is somehow related to the fact, that all of these cameras are v4l2?

Posted: Tue Jul 07, 2009 6:40 pm
by cordel
blindvic wrote: 07/07/09 20:56:39.412993 zmc_dvideo0[-1].ERR-zm_monitor.cpp/378 [Can't shmget, probably not enough shared memory space free: Permission denied]
[/code]
Hmm, well this error needs to be dealt with. You will not be able to see any video if ZM can not write to it's buffer space. run ipcs with ZM stopped and make sure there are no left shared memory segments for ZM, and all the segments for ZM should be owned by the apache user. If there are left segments, either remove them manually or reboot.

After you figure out why you can't access the shared memory (permission denied) and have that sorted then you can try increasing your shared memory by following the procedure in the FAQ to calculate how much shared space you need if you continue to receive the "Can't shmget, probably not enough shared memory space" error.

Posted: Sat Jul 11, 2009 7:43 am
by blindvic
cordel wrote:run ipcs with ZM stopped and make sure there are no left shared memory segments for ZM, and all the segments for ZM should be owned by the apache user. If there are left segments, either remove them manually or reboot.

Code: Select all

vic@vic-desktop:~$ sudo ipcs

------ Shared Memory Segments --------
key        shmid      owner      perms      bytes      nattch     status
0x7a6d0001 0          www-data   700        12166644   0

------ Semaphore Arrays --------
key        semid      owner      perms      nsems
0x00000000 0          www-data   600        1

------ Message Queues --------
key        msqid      owner      perms      used-bytes   messages
i am not a geek, so i don't know what do these mean. You told me to run this command when ZM is stopped, so exited browser.
It's strange. Should i try another distro (current one has most recent kernel - maybe problem is in it?) or compile ZM from source?

Posted: Fri Jul 17, 2009 8:54 pm
by cordel
blindvic wrote:
cordel wrote:run ipcs with ZM stopped and make sure there are no left shared memory segments for ZM, and all the segments for ZM should be owned by the apache user. If there are left segments, either remove them manually or reboot.

Code: Select all

vic@vic-desktop:~$ sudo ipcs

------ Shared Memory Segments --------
key        shmid      owner      perms      bytes      nattch     status
0x7a6d0001 0          www-data   700        12166644   0

------ Semaphore Arrays --------
key        semid      owner      perms      nsems
0x00000000 0          www-data   600        1

------ Message Queues --------
key        msqid      owner      perms      used-bytes   messages
i am not a geek, so i don't know what do these mean. You told me to run this command when ZM is stopped, so exited browser.
It's strange. Should i try another distro (current one has most recent kernel - maybe problem is in it?) or compile ZM from source?
If you do in fact have ZM stopped, the segment with the key 0x7a6d0001 is left over from ZM and it should not be, if ZM was running then this is okay. Exiting the browser does not stop ZM.
This is where all the images are placed for your first monitor for processing.

I see that you have resolved the original error though, so there is a step in the right direction. What did you find to fix the zmu error?

Are there any other errors in your log or are you getting the same errors, if the errors change or are the same we need to know so we are not guessing.