Ubuntu 8.10, ZM 1.23.3-3 and no image --Now Bad image

Support and queries relating to all previous versions of ZoneMinder
Cartsy
Posts: 12
Joined: Wed Dec 03, 2008 11:47 pm

Ubuntu 8.10, ZM 1.23.3-3 and no image --Now Bad image

Post by Cartsy »

I'm using Ubuntu 8.10 and Zoneminder 1.23.3-3 and can't get an image out of it.

When I type:

Code: Select all

~$ zmu -d /dev/video1 -q -v 

Aborted 
But if I use sudo:

Code: Select all

~$ sudo zmu -d /dev/video1 -q -v 

Video Capabilities
Name: USB Camera (046d:08a2)
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: 39321
Channel 0 Attributes
Name: zc3xx
Channel: 0
Flags: 0
Type: 2 - Camera
Format: 0 - PAL 
I don't have rights for zmu? For example:

Code: Select all

~$ zmu -l

Aborted 

Code: Select all

~$ sudo zmu -l

Id Func State TrgState   LastImgTim RdIdx WrIdx LastEvt FrmRate
/var/log/syslog.log says:

Code: Select all

Dec 4 00:06:41 cath-laptop zmwatch[5841]: ERR [Can't get shared memory id '7a6d0001', 1: No such file or directory]
Dec 4 00:06:41 cath-laptop zmwatch[5841]: INF [Restarting capture daemon for testi, shared memory not valid]
Dec 4 00:06:42 cath-laptop zmdc[5809]: INF ['zmc -d /dev/video1' starting at 08/12/04 00:06:42, pid = 9260]
Dec 4 00:06:42 cath-laptop zmdc[9260]: INF ['zmc -d /dev/video1' started at 08/12/04 00:06:42]
Dec 4 00:06:42 cath-laptop zmwatch[5841]: INF ['zmc -d /dev/video1' starting at 08/12/04 00:06:42, pid = 9260]
Dec 4 00:06:42 cath-laptop zmc_dvideo1[9260]: INF [Debug Level = 0, Debug Log = <none>]
Dec 4 00:06:42 cath-laptop zmc_dvideo1[9260]: ERR [Can't shmget, probably not enough shared memory space free: Invalid argument]
Dec 4 00:06:42 cath-laptop zmdc[5809]: ERR ['zmc -d /dev/video1' exited abnormally, exit status 255] 
http://img254.imageshack.us/img254/9337 ... chmie6.png

http://img132.imageshack.us/img132/1614 ... estdy1.png

My webcam works fine with other programs but not with Zoneminder..

What should I do?
Last edited by Cartsy on Fri Dec 05, 2008 10:46 pm, edited 1 time in total.
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

Check that zmfix has the setuid and if not:
sudo chmod 4755 /usr/bin/zmfix
Cartsy
Posts: 12
Joined: Wed Dec 03, 2008 11:47 pm

Post by Cartsy »

Thanks, but no help. Source stays red.

Should I try an older version of ZM?

Edit: I think I have rights to /dev/video1 because "cat /dev/video1" works fine.

Edit2: I did nothing and the source seems to be yellow now. Still no picture.
User avatar
Lee Sharp
Posts: 1069
Joined: Sat Mar 31, 2007 9:18 pm
Location: Houston, TX

Post by Lee Sharp »

As a user, try 'zmfix' and tell me what it returns. After it runs, try 'ls /dev/vid* -lah' and tell me what that returns.
Cartsy
Posts: 12
Joined: Wed Dec 03, 2008 11:47 pm

Post by Cartsy »

zmfix returns nothing.

ls /dev/vid* -lah returns:
crw-rw----+ 1 root video 81, 0 2008-12-05 20:00 /dev/video0
crw-rw-rw-+ 1 root video 81, 0 2008-12-05 20:00 /dev/video1

I did that shared memory thing and now /var/log/syslog.log says:

Dec 5 20:10:26 cath-laptop zmwatch[5465]: INF [Restarting capture daemon for New, time since last capture 9 seconds (1228500626-1228500617)]
Dec 5 20:10:26 cath-laptop zmdc[5431]: INF ['zmc -d /dev/video1' starting at 08/12/05 20:10:26, pid = 7396]
Dec 5 20:10:26 cath-laptop zmdc[7396]: INF ['zmc -d /dev/video1' started at 08/12/05 20:10:26]
Dec 5 20:10:26 cath-laptop zmwatch[5465]: INF ['zmc -d /dev/video1' starting at 08/12/05 20:10:26, pid = 7396]
Dec 5 20:10:26 cath-laptop zmc_dvideo1[7396]: INF [Debug Level = 0, Debug Log = <none>]
Dec 5 20:10:26 cath-laptop zmc_dvideo1[7396]: INF [Starting Capture]
Dec 5 20:10:27 cath-laptop zmc_dvideo1[7396]: ERR [Sync failure for frame 1 buffer 2(1): Invalid argument]
Dec 5 20:10:27 cath-laptop zmdc[5431]: ERR ['zmc -d /dev/video1' exited abnormally, exit status 255]


Edit: And suddenly it starts working. I did nothing. Just few clicks with those zone things in Watch window. Sometimes source is red, sometimes it might be yellow..

This is how it "works": http://e.imagehost.org/view/0288/eiei It takes this crappy image every 10 seconds.

Edit2: Doesn't help if I change the resolution of the cam.

Edit3: My cam is Labtec webcam pro. Any suggestions of cheap cams that should work with ZM?
alexm
Posts: 1
Joined: Thu Dec 18, 2008 3:16 pm
Location: UK

Post by alexm »

Hello Cartsy,

Did you get you webcam to work in the end? I have experienced what looks like exactly the same problem except that my webcams used to work. I had Zoneminder running perfectly under openSuse but have just migrated to Ubuntu 8.10 and now I get the same error messages as you.

The cameras work when using other programs e.g. xawtv.

The cameras I have came in the "Creative - Webcam Vista Skype Dual Pack" from PC World (lsusb shows it as 041e:405f Creative Technology, Ltd).
liviab
Posts: 87
Joined: Wed Oct 15, 2008 11:54 am
Location: Brazil [MG]

Post by liviab »

We're three with the same problem. :shock:

My log file is showing the same messages that the Cartsy's is.
My camera also works fine with other programs, such as cheese and xawtv.

By the way, I'm using ZoneMinder-1.24.0 and Fedora 10.

Anyone can help us? ^^
:)
Last edited by liviab on Thu Jan 29, 2009 1:47 pm, edited 1 time in total.
wisekki
Posts: 39
Joined: Tue Feb 27, 2007 11:58 am

Post by wisekki »

I'm joining this club.. in case you didn't see my previous posts :D
liviab
Posts: 87
Joined: Wed Oct 15, 2008 11:54 am
Location: Brazil [MG]

Post by liviab »

so, we're four. heheh
:o

:?
wisekki
Posts: 39
Joined: Tue Feb 27, 2007 11:58 am

Post by wisekki »

Because I'm out of ideas i'm just going to ask what modules you are using for your cams? Could a faulty module do all this?

I tried to compile gspca from a source but it didn't work because it can't find semaphore.h for some reason.
liviab
Posts: 87
Joined: Wed Oct 15, 2008 11:54 am
Location: Brazil [MG]

Post by liviab »

The command dmesg is showing:

Linux video capture interface: v2.00
gspca: main v2.2.0 registered
gspca: probing 041e:4051
zc3xx: Sensor Tas5130 (VF0250)
gspca: probe ok
usbcore: registered new interface driver zc3xx
zc3xx: registered

So I think that it is gspca with the module zc3xx.
kylejohnson
Posts: 260
Joined: Tue Aug 21, 2007 1:42 pm
Location: Baltimore, MD

Post by kylejohnson »

Looks like a permission issue. I usually have to add the user that ZoneMinder is running as (www-data) to the video group. Have you tried this?

Code: Select all

sudo usermod -a -G video www-data
liviab
Posts: 87
Joined: Wed Oct 15, 2008 11:54 am
Location: Brazil [MG]

Post by liviab »

It doesn't work... :(

Code: Select all

[root@livia ~]# usermod -a -G video www-data
usermod: user www-data does not exist
kylejohnson
Posts: 260
Joined: Tue Aug 21, 2007 1:42 pm
Location: Baltimore, MD

Post by kylejohnson »

liviab wrote:It doesn't work... :(

Code: Select all

[root@livia ~]# usermod -a -G video www-data
usermod: user www-data does not exist
Ergh. The original poster is using Ubuntu, on which apache runs as www-data. Which distro are you using? Just substitute www-data for the user that apache (or ZoneMinder) is running as.
wisekki
Posts: 39
Joined: Tue Feb 27, 2007 11:58 am

Post by wisekki »

liviab wrote: So I think that it is gspca with the module zc3xx.
Yeah same here and the same errors as you...

Code: Select all

[32054.304018] usb 3-1: new full speed USB device using uhci_hcd and address 3
[32054.495438] usb 3-1: configuration #1 chosen from 1 choice
[32054.498216] gspca: probing 046d:08d7
[32056.148100] zc3xx: probe 2wr ov vga 0x0000
[32056.192097] zc3xx: probe sensor -> 11
[32056.192101] zc3xx: Find Sensor HV7131R(c)
[32056.198599] gspca: probe ok
[32056.198638] gspca: probing 046d:08d7
So it could have something to do with the module.. ?
Locked