can't get Philips Vesta webcam to work (with xawtv works OK)

Support and queries relating to all previous versions of ZoneMinder
Locked
mangoo
Posts: 27
Joined: Tue May 10, 2005 2:33 pm

can't get Philips Vesta webcam to work (with xawtv works OK)

Post by mangoo »

I can't get Philips Vesta webcam to work with ZoneMinder.

It works fine with xawtv or gnomemeeting (on the same machine ZoneMinder is running).

I also have a Quicktime webcam, and it works fine with ZoneMinder.

I tried different resolutions, channels, palettes etc., I tried to unplug the Quicktime webcam, but still can't get Philips Vesta USB webcam to work with ZM.

Any hints?
mangoo
Posts: 27
Joined: Tue May 10, 2005 2:33 pm

Post by mangoo »

If it's any help, here are some of the logs when I add this Philips webcam to ZM:

zmwatch.log

Can't get shared memory id '2053971974': No such file or directory
Can't get shared memory id '2053971974': No such file or directory
Can't get shared memory id '2053971974': No such file or directory
Can't get shared memory id '2053971974': No such file or directory
Can't get shared memory id '2053971974': No such file or directory
Can't get shared memory id '2053971974': No such file or directory
Can't get shared memory id '2053971974': No such file or directory


zmdc.log:

Command 'zmc -d 1' removed from pending list at 05/05/12 11:31:07
Can't find process with command of 'zma -m 6'
Can't find process with command of 'zmc -d 1'
'zmc -d 1' starting at 05/05/12 11:31:19, pid = 8060
'zmc -d 1' started at 05/05/12 11:31:19
'zmc -d 1' crashed at 05/05/12 11:31:19, exit status 255
'zmc -d 1' started at 05/05/12 11:31:19
'zmc -d 1' starting at 05/05/12 11:31:19, pid = 8065
Can't find process with command of 'zma -m 6'
'zmc -d 1' crashed at 05/05/12 11:31:19, exit status 255
Starting pending process, zmc -d 1
'zmc -d 1' started at 05/05/12 11:31:24
'zmc -d 1' starting at 05/05/12 11:31:24, pid = 8082
'zmc -d 1' crashed at 05/05/12 11:31:24, exit status 255
Starting pending process, zmc -d 1
'zmc -d 1' started at 05/05/12 11:31:34
'zmc -d 1' starting at 05/05/12 11:31:34, pid = 8093
'zmc -d 1' crashed at 05/05/12 11:31:35, exit status 255
Starting pending process, zmc -d 1
'zmc -d 1' started at 05/05/12 11:31:55
'zmc -d 1' starting at 05/05/12 11:31:55, pid = 8119
'zmc -d 1' crashed at 05/05/12 11:31:55, exit status 255
Starting pending process, zmc -d 1
'zmc -d 1' started at 05/05/12 11:32:35
'zmc -d 1' starting at 05/05/12 11:32:35, pid = 8159
'zmc -d 1' crashed at 05/05/12 11:32:35, exit status 255
mangoo
Posts: 27
Joined: Tue May 10, 2005 2:33 pm

Post by mangoo »

Some logs from the syslog:

May 12 11:51:02 zm zmc_d1[9583]: INF [Debug Level = 0, Debug Log = <none>]
May 12 11:51:02 zm kernel: pwc set_video_mode(320x240 @ 10, palette 15).
May 12 11:51:02 zm kernel: pwc decode_size = 3.
May 12 11:51:02 zm kernel: pwc Using alternate setting 3.
May 12 11:51:02 zm zmc_d1[9583]: ERR [Failed to set picture attributes: Invalid argument]
mangoo
Posts: 27
Joined: Tue May 10, 2005 2:33 pm

Post by mangoo »

I tried playing with STRICT_VIDEO_CONFIG option, but still no luck.
mangoo
Posts: 27
Joined: Tue May 10, 2005 2:33 pm

Post by mangoo »

OK, I found a solution (not that great, really).

pwc module is used to run Philip Vesta USB webcams.
These webcams support resolutions up to 640x480.

These setting will work:


Capture Palette: YUV420P
Width: 160
Height: 120

Higher resolutions won't work - at least with ZoneMinder 1.21.0 installed from the "live cd".

After you set these, make sure other setting like brightness etc. are correct:

run in console:

zmu -d1 -q -v

to see all camera values.

Then in a web browser click on camera name -> settings -> and type the values you got from "zmu -d1 -q -v".

If I find a way to run higher resolutions, I will post it.
mangoo
Posts: 27
Joined: Tue May 10, 2005 2:33 pm

Post by mangoo »

OK, here is the way to make Philips Vesta webcams with 640x480 resolution.

I assume that ZoneMinder 1.21.0 was installed from a "live cd" - so it runs on top of Mandrakelinux (now Mandrivalinux) distribution.

I don't know if it will work with all Philips Vesta models, as there are many.

You can get your USB webcam model by using "lsusb" from usbutils package.

# lsusb
Bus 004 Device 001: ID 0000:0000
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 005: ID 0471:0310 Philips PCVC730K WebCam [pwc]
Bus 001 Device 004: ID 046d:0840 Logitech, Inc. QuickCam Express
Bus 001 Device 001: ID 0000:0000

As you see, I have two webcams, one of which is Philips PCVC730K WebCam.


To make it work with 640x480 resolution, download a new kernel from Mandriva mirror.

You can get the kernel-2.6.11.6mdk-1-1mdk.i586.rpm package from here:

ftp://ftp.proxad.net/pub/Distributions_ ... edia/main/

# wget ftp://ftp.proxad.net/pub/Distributions_ ... k.i586.rpm

# rpm -ivh kernel-2.6.11.6mdk-1-1mdk.i586.rpm

You will have to change your /etc/lilo.conf to match:

boot=/dev/hda
map=/boot/map
default="linux"
keytable=/boot/livecd.klt
prompt
nowarn
timeout=100
message=/boot/message
menu-scheme=wb:bw:wb:bw
image=/boot/vmlinuz-2.6.7-2.tmb.6mdk
label="zm"
root=/dev/hda1
initrd=/boot/initrd-2.6.7-2.tmb.6mdk.img
append="devfs=nomount acpi=ht nomce splash=silent"
vga=791
read-only

image=/boot/vmlinuz-2.6.11-8mdk
label="linux"
root=/dev/hda1
append="devfs=nomount acpi=ht nomce splash=silent"
vga=791
read-only

I assume your system was installed on /dev/hda1.

After editing /etc/lilo.conf, run lilo to apply changes:

# lilo
Added zm
Added linux *


Reboot the ZoneMinder machine, go to your Philips Vesta settings, and change the resolution to 640 x 480!

This is zmu run to detect all values for this camera (you may have to use -d0 instead of -d1 - it corresponds to /dev/video1, while -d0 corresponds to /dev/video0).

# zmu -d1 -q -v
Video Capabilities
Name: Philips 730 webcam
Type: 1
Can capture
Video Channels: 1
Audio Channels: 0
Maximum Width: 640
Maximum Height: 480
Minimum Width: 160
Minimum Height: 120
Window Attributes
X Offset: 0
Y Offset: 0
Width: 640
Height: 480
Picture Attributes
Palette: 15 - YUV 4:2:0 Planar
Colour Depth: 24
Brightness: 32768
Hue: 65535
Colour :32768
Contrast: 64512
Whiteness: 63488
Channel 0 Attributes
Name: Webcam
Channel: 0
Flags: 0
Type: 2 - Camera
Format: 0 - PAL


Note that zmu will fail if your camera is in use (either by xawtv, by ZoneMinder, or any other program).
You can see if your camera is in use by using lsof:

# lsof -n | grep /dev/video
zmc 7084 apache mem CHR 81,0 14935 /dev/video0
zmc 7084 apache 6u CHR 81,0 14935 /dev/video0
zmc 8315 apache mem CHR 81,1 14987 /dev/video1
zmc 8315 apache 6u CHR 81,1 14987 /dev/video1
wlloydda
Posts: 3
Joined: Wed May 18, 2005 3:28 am

Logitech QuickCam 3000 Pro

Post by wlloydda »

I have a Logitech QuickCam 3000 Pro, which I understand uses the Philips Vesta chip. It works at 160 X 120 X YUV420P.

I followed your instructions (Thanks) to upgrade to 2.6.11 which seems to be OK. uname -r gives me 2.6.11-6mdk.

Possible typo on the line:
image=/boot/vmlinuz-2.6.11-8mdk
I could only find vmlinuz-2.6.11-6mdk in /boot so I used that. Should it really be 8mdk?

But the camera only works on 160 X 120 X YUV420P.

Is there anything else I can try? I've already cycled through all of the Capture Width, Capture Height and Capture Palette settings.

My camera settings are the same ones that work with the 160 X 120 resolution, Brightness=28672, Contrast=55296, Hue=65535, and Colour=65468.
wlloydda
Posts: 3
Joined: Wed May 18, 2005 3:28 am

More on the Philips/Logitech cameras

Post by wlloydda »

Poking around with Google, I found this site

http://www.lavarnd.org/developer/pwc730.html

which has the following command,

/sbin/modprobe pwc size=vga fps=15 leds=250,750 fbufs=2 mbufs=1 compression=0

which does initialize the camera correctly for both 320 X 240 and 640 X 480 YUV420P. I ran it while ZoneMinder was running, then changed the Capture Width and Height. Now that it is working, I have to figure out what each of those parameters are, which are really needed, and what are the best settings.
mangoo
Posts: 27
Joined: Tue May 10, 2005 2:33 pm

Post by mangoo »

I just noticed that the image from my Philips / pwc camera is mirrored!

Is it the same for you?

I tried playing with camera orientation, but it doesn't help.
wlloydda
Posts: 3
Joined: Wed May 18, 2005 3:28 am

Re: Mirrored Image

Post by wlloydda »

No, my image is OK.
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

1.21.1 will allow you to unmirror images if you can't fix it any other way.

Phil
User avatar
Mr.Ed
Posts: 9
Joined: Fri May 13, 2005 9:12 am

Post by Mr.Ed »

Thanks guys,

I couldn't get my Philips PCVC840K/20 to work, untill somebody mentioned the YUV420P setting with 160x120 format.

To my surprise it worked immediately, so i tried a bigger size, and now it works great at 320x240!

UPDATE 1: In my situation, it does not work for 640x480. Will keep on trying with that size.
UPDATE 2: I got 640 x 480 to work when lowering Image buffer size (frames) from 40 to 20!

Thanks again, :wink:

Ed.
A Horse is a Horse, of course of course...
Hw:P4SDX(P4/2.4GHz)+1Gb RAM+160Mb SATA Hdd+4xHaupp.WinTV-Radio (BT878)+1xPV153+1xPCVC840K (All PAL)
Sw: FC3 (2.6.9-1.667) + KDE + ZM-1.20.1 (Yum) + Mozilla Firefox
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

I think you will probably find you can increase your buffer size again if you (a) do a full ZM restart after making the changes and/or (b) check /var/log/messages for shared memory errors and if present follow the instructions in the FAQ to increase the amount available.

Phil
Locked