USB Webcam not running in ZM but does work in Cheese. What to do?

Forum for questions and support relating to the 1.29.x releases only.
Locked
777funk
Posts: 49
Joined: Thu Mar 31, 2016 8:53 pm

USB Webcam not running in ZM but does work in Cheese. What to do?

Post by 777funk »

Cuirous how I can get this working. It does work in Cheese. The camera is showing in Red on the location at the ZM homepage. It shows to be here in the terminal search:
/dev/video0
bbunge
Posts: 2934
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: USB Webcam not running in ZM but does work in Cheese. What to do?

Post by bbunge »

Did you:

adduser www-data video

I also have the best luck with using PAL-B for USB cams. Get the resolution right... try 320x240 to begin with.
777funk
Posts: 49
Joined: Thu Mar 31, 2016 8:53 pm

Re: USB Webcam not running in ZM but does work in Cheese. What to do?

Post by 777funk »

Yes I tried that (on my regular Ubuntu terminal and no go). I hadn't tried PAL-B but did just try it and the USB cam is still showing RED in the source.
bbunge
Posts: 2934
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: USB Webcam not running in ZM but does work in Cheese. What to do?

Post by bbunge »

What errors are you getting in your log?
777funk
Posts: 49
Joined: Thu Mar 31, 2016 8:53 pm

Re: USB Webcam not running in ZM but does work in Cheese. What to do?

Post by 777funk »

Sure, here are the errors pertaining to the webcam.

Code: Select all

2016-04-06 21:15:00.199190	zmdc		4163	ERR	'zmc -d /dev/video0' exited abnormally, exit status 255	zmdc.pl	
2016-04-06 21:15:00.172443	zmc_dvideo0		15961	ERR	No monitors found	zmc.cpp
777funk
Posts: 49
Joined: Thu Mar 31, 2016 8:53 pm

Re: USB Webcam not running in ZM but does work in Cheese. What to do?

Post by 777funk »

Got it.

It either had to do with needing this:
sudo chmod 666 /dev/video0

or maybe this:
zmu -q -d /dev/video0 -U <zoneminder username here> -P <zoneminder password here>

or maybe (but probably not) this:
ServerName localhost
in apache2.conf in /etc/apache2 and restart apache the notice will disappear.

after I'd already done this:
sudo adduser www-data video
sudo a2enmod cgi

which didn't work until I did the above.

then the settings:
Capture Method: Video for Linux 2
Device Channel: 0
Pal B
Auto
24 bit
640x480
Last edited by 777funk on Fri Apr 08, 2016 2:09 pm, edited 1 time in total.
SteveGilvarry
Posts: 494
Joined: Sun Jun 29, 2014 1:12 pm
Location: Melbourne, AU

Re: USB Webcam not running in ZM but does work in Cheese. What to do?

Post by SteveGilvarry »

So 'adduser www-data video', which added apache user to video group, but then actually making sure that group has access. If you knew the permissions on on /dev/video0 before 666 then we could confirm that. Mainly just make sure that group is video and it has rw access. So you could pare back chmod 666.
Production Zoneminder 1.37.x (Living dangerously)
Random Selection of Cameras (Dahua and Hikvision)
Locked