Unable to access webcam - Zoneminder 1.28.1

Forum for questions and support relating to the 1.28.x releases only.
Locked
bdmartens
Posts: 7
Joined: Thu Sep 17, 2015 12:12 am

Unable to access webcam - Zoneminder 1.28.1

Post by bdmartens »

I decided again to try zoneminder out again, after several years away. Unfortunately, I have not yet been able to get the webcam working as a monitor for zoneminder. I have been unable to find zmu error code definitions, nor troubleshooting for the zmu application to help and sort these issues out. I am able to access my webcam from Ubuntu for google hangouts, and can access the webcam from the command line with streamer, with an image or video recorded from the command line interface perfectly fine.

Webcam: Logitech C290
Zoneminder 1.28.1
Operating system Ubuntu Linux 14.04.2
Kernel and CPU Linux 3.16.0-49-generic on x86_64
Processor information Intel(R) Core(TM) i5-4690 CPU @ 3.50GHz, 4 cores

Initially, zmu only gave me "error0", despite granting group permissions of rw, and adding data-www to the video group
After granting permissions of 777 to dev/video0, I would no longer get the "error0".
Now, I just get the below abbreviated message, not at all helpful.
user@server: zmu -d /dev/video0 -V1 --query -v
Video Device: /dev/video0

to round things out:
user@server: /dev$ zmu -d /dev/video0 -V0 --query -v
Error, failed to enumerate standard 0: Success
user@server:/dev$ zmu -d /dev/video0 -V2 --query -v
Error, failed to enumerate standard 0: Success

lsusb gives
Bus 002 Device 002: ID 8087:8001 Intel Corp.
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:8009 Intel Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 003: ID 046d:c517 Logitech, Inc. LX710 Cordless Desktop Laser
Bus 003 Device 002: ID 05a4:9881 Ortek Technology, Inc. IR receiver [VRC-1100 Vista MCE Remote Control]
Bus 003 Device 005: ID 0764:0501 Cyber Power System, Inc. CP1500 AVR UPS
Bus 003 Device 004: ID 046d:0825 Logitech, Inc. Webcam C270
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Within Zoneminder, the monitor text for /dev/video- is orange, and an attempt to probe the camera yields:
Unable to probe local cameras, status is '255'

The log reads:
2015-09-16 20:29:18.306177 web_php 19690 FAT Unable to probe local cameras, status is '255' /usr/share/zoneminder/skins/classic/views/monitorprobe.php 40
2015-09-16 20:29:18.300065 zmu 19698 ERR Failed to enumerate standard 0: Inappropriate ioctl for device zm_local_camera.cpp 1287
2015-09-16 20:28:57.021250 zmdc 9126 WAR Can't find process with command of 'zma -m 3' zmdc.pl
2015-09-16 20:28:56.970950 zmdc 9126 WAR Can't find process with command of 'zmc -d /dev/video0' zmdc.pl
2015-09-16 20:28:56.919350 zmdc 9126 WAR Can't find process with command of 'zma -m 3' zmdc.pl
2015-09-16 20:26:06.183465 zmu 19574 ERR Failed to enumerate standard 0: Inappropriate ioctl for device zm_local_camera.cpp 1287
2015-09-16 20:26:01.703948 zmu 19570 ERR Failed to enumerate standard 0: Inappropriate ioctl for device zm_local_camera.cpp 1287
2015-09-16 08:39:37.675901 web_php 2287 FAT Unable to probe local cameras, status is '255' /usr/share/zoneminder/skins/classic/views/monitorprobe.php 40
2015-09-16 08:39:37.670625 zmu 9240 ERR Failed to enumerate standard 0: Inappropriate ioctl for device zm_local_camera.cpp 1287
2015-09-16 08:39:24.370950 zmdc 9126 WAR Can't find process with command of 'zma -m 3' zmdc.pl
2015-09-16 08:39:24.321360 zmdc 9126 WAR Can't find process with command of 'zmc -d /dev/video0' zmdc.pl
2015-09-16 08:39:24.269510 zmdc 9126 WAR Can't find process with command of 'zma -m 3' zmdc.pl
2015-09-16 08:38:40.142530 zmwatch 9164 INF Watchdog pausing for 30 seconds zmwatch.pl
2015-09-16 08:38:40.140560 zmwatch 9164 INF Watchdog starting zmwatch.pl
2015-09-16 08:38:40.090960 zmdc 9164 INF 'zmwatch.pl' started at 15/09/16 08:38:40 zmdc.pl

Following a different thread with an odd solution, I also tried ensuring my apache2 servername was properly set (it wasn't, but once set, this didn't resolve the issue).

I would appreciate any help or direction you may be able to provide.
My plan is to eventually start adding IP cameras to serve as additional monitors, but am looking for a proof of concept / trial first.

Thanks!

Edit:
I confirmed the camera settings from here:
https://major.io/tag/video/
Still no dice.
The /video/dev0 text still shows in orange

Also, FYI, I had removed my zoneminder installation from the default Ubuntu repo early on, and installed from the 'official' zoneminder repository. Other issues were fixed (being able to click on the add new monitor button...), but then I ran into this problem.

Cheers
bbunge
Posts: 2951
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Unable to access webcam - Zoneminder 1.28.1

Post by bbunge »

Make sure you have added the user: adduser www-data video

Next try PAL B for a device format.

Not sure what the resolution is on this camera but try 320x240 to start. Might want to set the frame rate to 5.

I had one of these a while back and it did work on ZM

Did you follow the instructions here: http://www.zoneminder.com/wiki/index.ph ... e_easy_way
bdmartens
Posts: 7
Joined: Thu Sep 17, 2015 12:12 am

Re: Unable to access webcam - Zoneminder 1.28.1

Post by bdmartens »

Thanks for the suggestions, I'll give it a try.

I ran a verbose lsusb, and have attached the output, should it make any difference.


edit: it appears I can't attach text files.
The verbose lsusb is at pastebin slash 5qvL9D0Y

(frustrating as a new user to not be able to paste a pastebin link, even if abbreviated to require re-typing of a link.... is there a better alternative?)

edit#2
I should probably add that this is running on a media pc - meaning there is no current gnome instance running. It is usually booted into the kodi/xbmc interface directly. I am trying to run the zoneminder from the command prompt / web browser. I'm not sure if this affects webcam accessibility - but since I can grab images from it with streamer, I don't think it would.

When I have the server running with the orange /dev/video0 text, the led on the webcam is lit up, signifying the camera is at least partially being accessed. If I change the settings to something invalid or stop zoneminder, the light goes off.
Last edited by bdmartens on Thu Sep 17, 2015 1:53 am, edited 2 times in total.
bdmartens
Posts: 7
Joined: Thu Sep 17, 2015 12:12 am

Re: Unable to access webcam - Zoneminder 1.28.1

Post by bdmartens »

I had already added the user, with a confirmation when I tried your command.
PAL B didn't help (nor NTSC)
I dropped the frame size and frame rate down, as you suggested, for now.

Going through the link, I didn't set the static IP (still didn't now)
I hadn't enabled CGI - done now
I hadn't installed all the vlc dependencies - done now
Added the sleep 15 command to the init.d/zoneminder.conf file
the symbolic link was already done for the etc/zm/apache.conf file
user www-data already added to video group
cambozola already downloaded and in the correct directory
ntpdate added to cron as directed, permissions changed

for good measure, I restarted zoneminder

After all this, the same orange text for /dev/video0, with the same '255' error on probing the camera.
below is the log since the final restart:
2015-09-16 21:33:48.367210 zmwatch 23033 INF Watchdog pausing for 30 seconds zmwatch.pl
2015-09-16 21:33:48.365330 zmwatch 23033 INF Watchdog starting zmwatch.pl
2015-09-16 21:33:48.316410 zmdc 22986 INF 'zmwatch.pl' starting at 15/09/16 21:33:48, pid = 23033 zmdc.pl
2015-09-16 21:33:48.316410 zmdc 23033 INF 'zmwatch.pl' started at 15/09/16 21:33:48 zmdc.pl
2015-09-16 21:33:48.300190 zmfilter 23019 INF Scanning for events zmfilter.pl
2015-09-16 21:33:48.256490 zmdc 23026 INF 'zmaudit.pl -c' started at 15/09/16 21:33:48 zmdc.pl
2015-09-16 21:33:48.256490 zmdc 22986 INF 'zmaudit.pl -c' starting at 15/09/16 21:33:48, pid = 23026 zmdc.pl
2015-09-16 21:33:48.200600 zmdc 23019 INF 'zmfilter.pl' started at 15/09/16 21:33:48 zmdc.pl
2015-09-16 21:33:48.200590 zmdc 22986 INF 'zmfilter.pl' starting at 15/09/16 21:33:48, pid = 23019 zmdc.pl
2015-09-16 21:33:48.197833 zmc_dvideo0 23015 WAR Hue control is not supported zm_local_camera.cpp 1756
2015-09-16 21:33:48.171123 zmc_dvideo0 23015 INF Starting Capture zmc.cpp 195
2015-09-16 21:33:48.165074 zmc_dvideo0 23015 INF No direct match for the selected palette and target colorspace. Format conversion is required, performance penalty expected zm_local_camera.cpp 408
2015-09-16 21:33:48.155980 zmdc 22986 INF 'zmc -d /dev/video0' starting at 15/09/16 21:33:48, pid = 23015 zmdc.pl
2015-09-16 21:33:48.155980 zmdc 23015 INF 'zmc -d /dev/video0' started at 15/09/16 21:33:48 zmdc.pl
2015-09-16 21:33:48.154250 zmdc 22986 INF Starting pending process, zmc -d /dev/video0 zmdc.pl
2015-09-16 21:33:48.152610 zmdc 22986 ERR 'zmc -d /dev/video0' exited abnormally, exit status 255 zmdc.pl
2015-09-16 21:33:48.149934 zmc_dvideo0 23011 INF No direct match for the selected palette and target colorspace. Format conversion is required, performance penalty expected zm_local_camera.cpp 408
2015-09-16 21:33:48.139600 zmdc 23011 INF 'zmc -d /dev/video0' started at 15/09/16 21:33:48 zmdc.pl
2015-09-16 21:33:48.139600 zmdc 22986 INF 'zmc -d /dev/video0' starting at 15/09/16 21:33:48, pid = 23011 zmdc.pl
2015-09-16 21:33:45.013840 zmdc 22986 INF Server starting at 15/09/16 21:33:45 zmdc.pl
2015-09-16 21:33:44.876110 zmpkg 22970 INF Command: start zmpkg.pl
2015-09-16 21:33:29.726600 zmdc 21773 INF Server shutdown at 15/09/16 21:33:29 zmdc.pl
2015-09-16 21:33:19.604740 zmdc 21773 INF 'zmfilter.pl ' exited, signal 14 zmdc.pl
2015-09-16 21:33:19.603200 zmdc 21773 INF 'zmfilter.pl ' stopping at 15/09/16 21:33:19 zmdc.pl
2015-09-16 21:33:19.602340 zmdc 21773 INF 'zmaudit.pl -c' exited, signal 14 zmdc.pl
2015-09-16 21:33:19.599910 zmdc 21773 INF 'zmaudit.pl -c' stopping at 15/09/16 21:33:19 zmdc.pl
2015-09-16 21:33:19.598960 zmdc 21773 INF 'zmc -d /dev/video0' exited normally zmdc.pl
2015-09-16 21:33:19.596142 zmc_dvideo0 21802 INF Terminating Logger zm_logger.cpp 235
2015-09-16 21:33:19.593403 zmc_dvideo0 21802 INF Got signal 15 (Terminated), exiting zm_signal.cpp 40
2015-09-16 21:33:19.591800 zmdc 21773 INF 'zmc -d /dev/video0' stopping at 15/09/16 21:33:19 zmdc.pl
2015-09-16 21:33:19.590090 zmdc 21773 INF 'zmwatch.pl ' exited, signal 14 zmdc.pl
2015-09-16 21:33:19.586180 zmdc 21773 INF 'zmwatch.pl ' stopping at 15/09/16 21:33:19 zmdc.pl
2015-09-16 21:33:19.475190 zmpkg 22926 INF Command: stop zmpkg.pl
2015-09-16 21:33:19.366570 zmpkg 22915 INF Command: status zmpkg.pl
bbunge
Posts: 2951
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Unable to access webcam - Zoneminder 1.28.1

Post by bbunge »

Your camera resolution is 1920 x 1080. Use that or multiples such as 320 x 180 or 640 x 320

If you do not get the resolution right it will not work. Also try PAL B again.

bb
bdmartens
Posts: 7
Joined: Thu Sep 17, 2015 12:12 am

Re: Unable to access webcam - Zoneminder 1.28.1

Post by bdmartens »

It's now working.
Not sure what did it.
The /dev/video0 text is still orange and a probe still Guinness a 255 error, but I can see the video when I click on monitor.
I had only been intermittently clicking on monitor in the past, assuming that the 255 error, orange text, and zmu errors/minimal output meant things weren't working.

Thanks everyone for your help!
Locked