Another USB Webcam issue

Post here to ask any questions about hardware suitability, configuration in ZoneMinder, or experiences. If you just want to know if something works with ZoneMinder or not, please check the Hardware Compatibility sections in the forum, and the Wiki first. Also search this topic as well.
Post Reply
ukpbz
Posts: 12
Joined: Tue May 19, 2009 12:18 am

Another USB Webcam issue

Post by ukpbz »

Hi All,

I was having probs with a UBUNTU install so decided to go for a Debian Lenny. Install went well. However when I add my 'generic' webcam I don't get any image. If I use xawtv the image is fine.

Logs don't seem to tell me much except...

Jun 4 12:59:07 cctv2 zmc_dvideo0[6743]: INF [Starting Capture]
Jun 4 12:59:07 cctv2 kernel: [ 4899.272541] gspca: [gspca_set_isoc_ep:945] ISO EndPoint found 0x81 AlternateSet 7
Jun 4 12:59:09 cctv2 zmc_dvideo0[6743]: INF [Got signal 6 (Aborted), exiting and forcing backtrace]

Settings for monitor ( Source ) are

Device Path = /dev/video0
Capture method = Video for Linux V2
Channel = 0 ( I have tried 0 - 4 )
Format = PAL60
Pallette = RGB24

Here is output from zmu -d /dev/video0 -q -v

Video Capabilities
Name: Generic Vimicro 303b
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: 384
Height: 288
Picture Attributes
Palette: 4 - 24bit RGB
Colour Depth: 24
Brightness: 32768
Hue: 0
Colour :0
Contrast: 32768
Whiteness: 0
Whiteness: 0
Channel 0 Attributes
Name: ZC301-2
Channel: 0
Flags: 0
Type: 2 - Camera
Format: 0 - PAL

Can anyone offer any ideas please?

Thanks
User avatar
rdmelin
Posts: 863
Joined: Wed Oct 29, 2003 2:23 pm
Location: Ellensburg, WA USA

Post by rdmelin »

Would you be willing to test a ZMLarch liveCD? Here is a link to the latest svn version which has a patched zmc that uses libv4l. No need to install to test it. I think many webcams will not work without including libv4l.
http://www.isentrix.com/pub/zoneminder/ ... n_2905.iso

If you would try it and report the result I would appreciate it.
newvisionantenna
Posts: 381
Joined: Sat Jan 17, 2009 7:49 pm
Location: Germany

Post by newvisionantenna »

Was the camera working in Ubuntu? Almost every single usb camera I plug into my DVD install works. I've put extra drivers in and such and typcially find Debian to be behind Ubuntu in terms of a wide range of hardware support. I'm not familiar with Arch, nor have I ever used it. Be interesting to see what you find.

Looking on google shows many people using your exact webcam with gutsy and beyond. Is this webcam a rather new model? The only reason I ask is if it's the old version then you might need to select v4l instead ovf v4l2 as you show in your config setup.
ukpbz
Posts: 12
Joined: Tue May 19, 2009 12:18 am

Post by ukpbz »

It is an older camera....

I just tried the arch CD and it worked straight away :-/ Thanks

Let me see if I can get some other cameras working
ukpbz
Posts: 12
Joined: Tue May 19, 2009 12:18 am

Post by ukpbz »

I have managed to get an IP camera and a single USB Webcam working quite easy.

I cannot get the second webcam working -or- a port on a BT848 4 port card to work.

As I have no terminal access ( And wouldn't really know what commands to use ) I can't find out what devices channels the 2nd Webcam or the BT port use.

Any pointers?

Ideally I would like to add an additional 4 port usb card so I have 6 webcams and 4 analogue cams attached, is that going to be a pain?

Thanks
User avatar
rdmelin
Posts: 863
Joined: Wed Oct 29, 2003 2:23 pm
Location: Ellensburg, WA USA

Post by rdmelin »

You can use the "system log" utility or the command "dmesg" in a terminal to see if a webcam is recognized when you plug it in. Some webcam drivers don't support more than one camera.

If your webcam is recognized as /dev/video0 then look for the bttv card as /dev/video1. Try some of the presets. If a little trial and error doesn't do it you will need to identify the card. You may need a "option bttv card=xx" line in /etc/modprobe.conf

Really 6 webcams? Good luck with that :)
ukpbz
Posts: 12
Joined: Tue May 19, 2009 12:18 am

Post by ukpbz »

Thanks,

How do I get a terminal session going though without doing a full install?

On my screen I only have Install and My Documents??

I used /dev/video1 and that worked a treat, thanks.

But heres a strange thing............

if I add a second usb webcam and add it as /dev/vodeo0 device 1 ( first usb cam is device 0 ) it kills the first web cam..... Have you seen this?

Thanks
User avatar
kingofkya
Posts: 1110
Joined: Mon Mar 26, 2007 6:07 am
Location: Las Vegas, Nevada

Post by kingofkya »

unfortunately thats common because of crappy drivers
ukpbz
Posts: 12
Joined: Tue May 19, 2009 12:18 am

Post by ukpbz »

Oh :-(

So is it a known problem that multiple usb webcams can't be used? Are there ANY known webcams that can? The quality on the first camera is pretty cool sadly.

I know have a webcam, an IP cam and an analogue cam working. :-)
User avatar
kingofkya
Posts: 1110
Joined: Mon Mar 26, 2007 6:07 am
Location: Las Vegas, Nevada

Post by kingofkya »

you can try different ports some may be on different hubs but no guarantee fyi its an issue with shearing the usb bus

some work some dont
ukpbz
Posts: 12
Joined: Tue May 19, 2009 12:18 am

Post by ukpbz »

Hmm, I have another USB2 card in there so may try swapping 2nd cam to there.

RDMELIN - If I do a full install to hard disk, will I get terminal access and Sudo?

I am assuming this is not just a 'demo' iso?

Cheers
User avatar
rdmelin
Posts: 863
Joined: Wed Oct 29, 2003 2:23 pm
Location: Ellensburg, WA USA

Post by rdmelin »

If I do a full install to hard disk, will I get terminal access and Sudo?
Certainly. But you can also use these from the liveCD. There is a terminal icon on the bottom panel. Sudo is enabled for the default user without requiring a password. The Arch logo in the bottom left corner is also a menu with some other useful utilities. You can even add software packages while running from CD until you run out of RAM :)

You can probably make at least one webcam per usb bus work. May have to be two different models so they load different drivers.The info from "dmesg" or the syslog utility is vital to know what the system recognizes.
debuger
Posts: 1
Joined: Sat Jun 06, 2009 11:56 pm

Same issues

Post by debuger »

Hello,

I have the similar problem with this webcam :
046d:08f0 Logitech, Inc. QuickCam Messenger

zmu -d /dev/video0 -q -v
Video Capabilities
Name: QCM USB Camera
Type: 1
Can capture
Video Channels: 1
Audio Channels: 0
Maximum Width: 320
Maximum Height: 240
Minimum Width: 160
Minimum Height: 120
Window Attributes
X Offset: 0
Y Offset: 0
Width: 320
Height: 240
Picture Attributes
Palette: 4 - 24bit RGB
Colour Depth: 24
Brightness: 32768
Hue: 32768
Colour :32768
Contrast: 32768
Whiteness: 32768
Channel 0 Attributes
Name: Camera
Channel: 0
Flags: 0
Type: 2 - Camera
Format: 0 - PAL

The webcam work fine with xawtv !
But in the zoneminder web interface the device /dev/video0 is red

Log of my error :
INF [Starting pending process, zmc -d /dev/video0]
INF ['zmc -d /dev/video0' started at 09/06/07 02:03:46]
INF ['zmc -d /dev/video0' starting at 09/06/07 02:03:46, pid = 23903]
zmc_dvideo0[23903]: INF [Debug Level = 0, Debug Log = <none>]
zmu[23780]: WAR [Shared data not initialised by capture daemon, some query functions may not be available or produce invalid results]
zmc_dvideo0[23903]: INF [Starting Capture]
zmc_dvideo0[23903]: INF [Got signal 6 (Aborted), exiting and forcing backtrace]

How I can check or debug ?

Thank you
User avatar
rdmelin
Posts: 863
Joined: Wed Oct 29, 2003 2:23 pm
Location: Ellensburg, WA USA

Post by rdmelin »

You aren't giving us much info to go on. But as I said many webcams won't work without libv4l. And the error you are seeing is just what to expect.

You didn't say what distro, kernel, etc. If you can install libv4l, try the solution posted in this thread.
http://www.zoneminder.com/forums/viewtopic.php?t=13705
gspca kernel module supports many usb web cams, but sometimes it need help of libv4l2, try preload libv4l within zmdc.pl script
it works for me with my usb webcams (genius and prolink)

Code:

$ENV{PATH} = '/bin:/usr/bin';
$ENV{SHELL} = '/bin/sh' if exists $ENV{SHELL};
# preload libv4l2
$ENV{LD_PRELOAD} = '/usr/lib/libv4l/v4l2convert.so';
Make sure the path to v4l2convert.so is correct for your distro
ukpbz
Posts: 12
Joined: Tue May 19, 2009 12:18 am

Post by ukpbz »

So having pretty much success, still a niggle though.....

I have 2 x USB web cams, 1 Airlink101 IP Webcam and a single port on my BT848 card working.

The BT848 card is 4 port. I can't seem to get port 2 to work though. In fact If I add a cam as second channel, it displays the image from the first channel, Weird

RDMELIN, have you any experience of this card? Do you have any suggestions for 'cheap' 4 port cards that work easily with your distro?

Cheers for all your help

Paul
Post Reply