Page 1 of 2
How to Configure ZoneMinder for Logitech Quickcam Orbit MP?
Posted: Mon Jul 30, 2007 4:41 am
by JerMe
Browsing the forum here, I see that some individuals managed to get the Orbit working in ZoneMinder. I however, can't get a picture.
I'm running Ubuntu 64-bit, and can view video using the Linux UVC drivers (I followed their iinstructions
here).
I verified that the webcam was working in luvcview and ekiga before attempting to install ZoneMinder.
I installed the ZoneMinder AMD64 zoneminder_1.22.3-6_amd64.deb from the Debian repository
here.
I
think ZoneMinder is working properly, since I can access it via
http://localhost/zm/index.php in firefox. I then tried adding a new monitor in "monitor" mode, as local, with the device path as /dev/video0, channel 0, NTSC, RGB24, 640x480. The /dev/video0 (0)" source was red. If I click on the camera name, I do not see a picture.
I changed the resolution to 320x240, still red, no picture.
I tried setting the permissions of /dev/video0 to 666, but it didn't help. I tried 777 as well; no go. I tried setting the permission of /usr/bin/zmfix to 4755. No help.
I tried patching ZoneMinder with the two patches found in a thread somewhere on the forums here, those didn't help me either.
For those who got their Logitech Quickcam Orbit MPs working... how did you do it?
Posted: Fri Aug 03, 2007 11:11 pm
by cordel
Did you check and make sure the web cam is still intailized?
What do you get from zmu -d /dev/video0 -q -v
Did you make sure you didn't still have anouther program using the cam?
What do you have in your logs (messages, zmdc.log, dmesg)?
Posted: Fri Aug 03, 2007 11:41 pm
by JerMe
Yes, the cam is still initialized, and working via luvcview.
$ sudo zmu -d /dev/video0 -q -v
Code: Select all
Error, failed to get channel 0 attributes: Invalid argument
Yes, I fairly sure that no other programs are accessing the camera.
After reading further, it appears that I have a shared memory issue. I tried the usual suspects from the logs but I'm still getting errors.
/var/log/messages:
Code: Select all
Aug 3 16:28:15 jerme zmwatch[5552]: INF ['zmc -d /dev/video0' starting at 07/08/03 16:28:15, pid = 6626]
Aug 3 16:28:25 jerme zmwatch[5552]: INF [Restarting capture daemon for orbit, shared memory not valid]
Aug 3 16:28:25 jerme zmdc[6632]: INF ['zmc -d /dev/video0' started at 07/08/03 16:28:25]
Aug 3 16:28:25 jerme zmdc[5463]: INF ['zmc -d /dev/video0' starting at 07/08/03 16:28:25, pid = 6632]
Aug 3 16:28:25 jerme zmc_dvideo0[6632]: INF [Debug Level = 0, Debug Log = <none>]
Aug 3 16:28:25 jerme zmc_dvideo0[6632]: INF [New Debug Level = 0, New Debug Log = /tmp/zm_debug.log.06632]
Aug 3 16:28:25 jerme zmwatch[5552]: INF ['zmc -d /dev/video0' starting at 07/08/03 16:28:25, pid = 6632]
Aug 3 16:28:35 jerme zmwatch[5552]: INF [Restarting capture daemon for orbit, shared memory not valid]
Aug 3 16:28:35 jerme zmdc[5463]: INF ['zmc -d /dev/video0' starting at 07/08/03 16:28:35, pid = 6639]
Aug 3 16:28:35 jerme zmdc[6639]: INF ['zmc -d /dev/video0' started at 07/08/03 16:28:35]
Aug 3 16:28:35 jerme zmc_dvideo0[6639]: INF [Debug Level = 0, Debug Log = <none>]
Aug 3 16:28:35 jerme zmc_dvideo0[6639]: INF [New Debug Level = 0, New Debug Log = /tmp/zm_debug.log.06639]
Aug 3 16:28:35 jerme zmwatch[5552]: INF ['zmc -d /dev/video0' starting at 07/08/03 16:28:35, pid = 6639]
Aug 3 16:28:45 jerme zmwatch[5552]: INF [Restarting capture daemon for orbit, shared memory not valid]
zmdc.log:
Code: Select all
08/03/07 16:15:33.983353 zmdc[5463].INF [Server starting at 07/08/03 16:15:33]
08/03/07 16:15:37.737577 zmdc[5463].INF ['zmc -d /dev/video0' starting at 07/08/03 16:15:37, pid = 5515]
08/03/07 16:15:37.956985 zmdc[5463].INF ['zmfilter.pl' starting at 07/08/03 16:15:37, pid = 5517]
08/03/07 16:15:38.507913 zmdc[5463].INF ['zmaudit.pl -c' starting at 07/08/03 16:15:38, pid = 5539]
08/03/07 16:15:38.572461 zmdc[5463].ERR ['zmc -d /dev/video0' exited abnormally, exit status 255]
08/03/07 16:15:38.572938 zmdc[5463].INF [Starting pending process, zmc -d /dev/video0]
08/03/07 16:15:38.580621 zmdc[5463].INF ['zmc -d /dev/video0' starting at 07/08/03 16:15:38, pid = 5551]
08/03/07 16:15:38.688168 zmdc[5463].ERR ['zmc -d /dev/video0' exited abnormally, exit status 255]
08/03/07 16:15:38.809029 zmdc[5463].INF ['zmwatch.pl' starting at 07/08/03 16:15:38, pid = 5552]
08/03/07 16:15:43.017221 zmdc[5463].INF [Starting pending process, zmc -d /dev/video0]
08/03/07 16:15:43.025373 zmdc[5463].INF ['zmc -d /dev/video0' starting at 07/08/03 16:15:43, pid = 5664]
08/03/07 16:15:43.192126 zmdc[5463].ERR ['zmc -d /dev/video0' exited abnormally, exit status 255]
08/03/07 16:15:53.013711 zmdc[5463].INF [Starting pending process, zmc -d /dev/video0]
08/03/07 16:15:53.021822 zmdc[5463].INF ['zmc -d /dev/video0' starting at 07/08/03 16:15:53, pid = 6045]
08/03/07 16:15:53.161388 zmdc[5463].ERR ['zmc -d /dev/video0' exited abnormally, exit status 255]
08/03/07 16:16:08.370078 zmdc[5463].INF ['zmc -d /dev/video0' starting at 07/08/03 16:16:08, pid = 6139]
08/03/07 16:16:08.479851 zmdc[5463].ERR ['zmc -d /dev/video0' exited abnormally, exit status 255]
08/03/07 16:16:18.569136 zmdc[5463].INF ['zmc -d /dev/video0' starting at 07/08/03 16:16:18, pid = 6147]
08/03/07 16:16:18.674192 zmdc[5463].ERR ['zmc -d /dev/video0' exited abnormally, exit status 255]
dmesg gives no errors, this is what it says when I plug in the camera:
Code: Select all
[ 1140.660000] usb 4-1: new high speed USB device using ehci_hcd and address 3
[ 1141.084000] usb 4-1: configuration #1 chosen from 1 choice
[ 1141.084000] uvcvideo: Found UVC 1.00 device <unnamed> (046d:08cc)
one of the zm_debug.log.* files:
Code: Select all
$ cat zm_debug.log.07177
08/03/07 16:38:48.097929 zmc_dvideo0[7177].INF-zm_debug.c/304 [New Debug Level = 0, New Debug Log = /tmp/zm_debug.log.07177]
08/03/07 16:38:48.197059 zmc_dvideo0[7177].ERR-zm_local_camera.cpp/162 [Failed to setup memory: Invalid argument]
/etc/sysctl.conf:
Code: Select all
#
# /etc/sysctl.conf - Configuration file for setting system variables
# See sysctl.conf (5) for information.
#
#kernel.domainname = example.com
#net/ipv4/icmp_echo_ignore_broadcasts=1
# the following stops low-level messages on console
kernel.printk = 4 4 1 7
##############################################################3
# Functions previously found in netbase
#
# Uncomment the next line to enable Spoof protection (reverse-path filter)
#net.ipv4.conf.default.rp_filter=1
# Uncomment the next line to enable TCP/IP SYN cookies
#net.ipv4.tcp_syncookies=1
# Uncomment the next line to enable packet forwarding for IPv4
#net.ipv4.conf.default.forwarding=1
# Uncomment the next line to enable packet forwarding for IPv6
#net.ipv6.conf.default.forwarding=1
kernel.shmall = 134217728
kernel.shmmax = 134217728
Please help... I feel like I'm close to getting this working but something is misconfigured somewhere...
Posted: Fri Aug 03, 2007 11:54 pm
by cordel
If you have tvtime, or xawtv, can you see an image through either one of them?
Does /dev/video0 actualy exist since I see no mention of it from dmesg?
Beyond that, I'd have to stumble my way through, I don't work with usb cams normaly.
Posted: Sat Aug 04, 2007 12:02 am
by JerMe
xawtv doesn't really work with the linux-uvc drivers:
http://openfacts.berlios.de/index-en.ph ... =Linux+UVC
but the camera works through luvcview, as well as ekiga v2.03.
/dev/video0 does exist:
Any thoughts?
Posted: Sat Aug 04, 2007 4:34 am
by cordel
I know if you can get it to work in xawtv it will work in ZM. Beyond that, you'll have to wait for someone who has setup this type of usb cam. I have personally never worked with those drivers, and have only helped setup two other usb cams so I would not be the best adviser.
Posted: Sun Aug 05, 2007 7:56 pm
by JerMe
Are there any other V4L2 devices that work with ZoneMinder? I know the older versions of the Logitech Quickcam Orbit/Sphere MP can use the PWC driver. I unfortunately have a newer version of the Orbit, one that can be driven by the V4L2 Linux UVC driver but not the PWC driver.
Also, here's some information regarding incompatibilies between XawTV and the Linux UVC driver (
link):
Xawtv is known not to work with the Linux UVC driver. It doesn't support V4L2 properly. The latest mplayer version should work, as I sent a patch to fix a few small problems. You could also try luvcview and ekiga.
Here's a section from the V4L Wiki (
link):
Do you have USB 2.0 controllers on your notebook and desktop? If so, you could benefit from higher resolutions with the Logitech Quickam for Notebooks Pro, Quickcam Fusion and Quickcam Orbit MP. All those webcams are 1.3MP devices and are supported by the linux-uvc driver. Note that the Quickcam for Notebooks Deluxe doesn't fall in that category; it's supported by the spca5xx driver.
Those 3 webcams also work in USB 1.1 mode, but are then limited to 640x480. In that case, you could go for the Quickcam Pro 5000, which is a 640x480 device supported by the linux-uvc driver.
UVC webcams are well supported, but you must be aware of a few issues.
* The linux-uvc driver is V4L2-only. This means applications which support V4L1 only will not work. V4L1 is officially deprecated, and have been removed from the kernel recently, so most drivers have or will switch to V4L2 anyway.
* The 4 webcams mentioned above compress images in MJPEG for resolutions up to 960x720. This means that applications must be able to decompress MJPEG streams to use the webcam at lower resolutions. Ekiga supports MJPEG compression.
I've also tried the camera on an AMD x86 system and an Intel x86 system, with no luck. I fear that ZoneMinder uses the depreciated V4L1 and hasn't moved to V4L2 yet.
Posted: Tue Aug 07, 2007 6:58 am
by JerMe
The group working on the
Motion project have managed to get working UVC and V4L2 working with their application. With v3.2.8, I'm able to get motion detection and tracking up and running with my 046d:08cc Orbit webcam.
I still wish I could use this webcam with ZoneMinder since I am very impressed with ZM's interface and plethora of options. If any of the developers are reading this, it'd be nice to get ZM support up and running for UVC and V4L2 devices. Perhaps some of the code from the Motion project can be utilized in ZoneMinder? If I knew more about programming I'd help out...
Got mine working with uvc video drivers
Posted: Sat Sep 08, 2007 10:20 pm
by dedmeet
Hi, just got my Orbit sphere working
Bit of a work-around, but it works
Mini Howto:
Install the uvcvideo (
http://linux-uvc.berlios.de/) kernel drivers.
Now install the uvc streamer software uvc_streamer
(
http://www.naaa.de/uvc_streamer.htm)
start uvc streamer like this : uvc_stream -f 1 -r 320x240 -b (you can use other ports etc - just check the uvc_streamer help) default stream is on port 8080
Check if your stream works. I used firefox and browse to http://<hostip>:8080
If all is well, you will get a stream of the camera.
Now enter zoneminder control panel and define the camera with the following settings:
Under 'General' tab:
Source type: remote
Under 'Source' tab:
Remote host Name: <ip of host with camera> or if on same host than zoneminder use localhost
Remote host port: 8080 (or if you used another port with uvc_stream put it in here)
Remote Host path: ANYTHING - i just used /file.jpg
Capture witdth: 320
Captire height: 240
click save, and now you can use it
Good enough of a workaround until the developers get the uvc stuff sorted. Also allows you to use the camera on a remote host. I got mine running from a small 133mhz pc104 module
I have not yet defined any zones, but I think it will work.
ATTENTION: small edit done, found this only works if the uvc_stream is set to 320x240 resolution. Might this be a limitation of my limited pc104 hardware ?
Let me know how this worked for you.
Update:
I used the method above, and defined zones, filters etc, and it all works fine.
I have created a wiki page with this information
http://www.zoneminder.com/wiki/index.php/Uvc
Posted: Wed Oct 24, 2007 5:42 am
by RoundSparrow
I got the "Logitech USB Silver QuickCam Ultra Vision" to work using uvc_streamer too. Thanks.
P.S. The Wiki didn't seem to want me to create a new account, so I couldn't update page myself.
Posted: Wed Oct 24, 2007 7:42 am
by dedmeet
RoundSparrow wrote:I got the "Logitech USB Silver QuickCam Ultra Vision" to work using uvc_streamer too. Thanks.
P.S. The Wiki didn't seem to want me to create a new account, so I couldn't update page myself.
Hi,
You have to ask on irc (or was that for another wiki, can't remember now)
I will add the cam to the list for you, can you please give some more info..
Ouput from lsusb (cam device id etc from the output)
Did you have to deviate at all from the method given? or did it all work as described ?
Regards
Lucas
Posted: Wed Oct 31, 2007 9:02 pm
by RoundSparrow
dedmeet wrote:RoundSparrow wrote:I got the "Logitech USB Silver QuickCam Ultra Vision" to work using uvc_streamer too. Thanks.
P.S. The Wiki didn't seem to want me to create a new account, so I couldn't update page myself.
I will add the cam to the list for you, can you please give some more info..
Ouput from lsusb (cam device id etc from the output)
Did you have to deviate at all from the method given? or did it all work as described ?
Bus 005 Device 003: ID 046d:08c9 Logitech, Inc.
I believe it worked as described.
I do have issues with total black frames coming... but I'm trying to do 640x480 at like 8 FPS. Need to play with it... but seems the web service built into UVC_streamer returns broken jpegs if you push it too hard.
OH YHA, one thing. Was it documented what to put in for Host Path? I put in "/?action=snapshot"
Posted: Wed Oct 31, 2007 11:28 pm
by dedmeet
Bus 005 Device 003: ID 046d:08c9 Logitech, Inc.
I believe it worked as described.
I do have issues with total black frames coming... but I'm trying to do 640x480 at like 8 FPS. Need to play with it... but seems the web service built into UVC_streamer returns broken jpegs if you push it too hard.
OH YHA, one thing. Was it documented what to put in for Host Path? I put in "/?action=snapshot"
Have you tried version 2 of uvc_stream ? It is still under heavy development, but Tom has made some improvements.
As for the host path, I just put anything. From Tom's usage notes (and looking at the code) any mention of 'snapshot' in the url will not produce a stream, but a still jpg snapshot.
Posted: Thu Nov 01, 2007 3:36 pm
by RoundSparrow
without the action=snapshot, it just returns:
501: Not Implemented!
no www-folder configured
In other words, it doesn't work if you just request the root webpage (/). Maybe I have a newer version than you have? We got the latest from Subversion.
AH, thanks for the lead on 2.0. Looks like name was changed. Reading the changelog:
http://mjpg-streamer.svn.sourceforge.ne ... iew=markup
The name uvc-streamer becomes false now if more then just on input plugin is available. So the name was changed to MJPG-streamer.
Posted: Thu Nov 01, 2007 3:47 pm
by dedmeet
RoundSparrow wrote:without the action=snapshot, it just returns:
501: Not Implemented!
no www-folder configured
In other words, it doesn't work if you just request the root webpage (/). Maybe I have a newer version than you have?
Does sound like you are using the newer version, however it will compile to a file called 'mjpg_streamer'
As far as I know, having the word 'snapshot' in the calling url will only give a still snapshot in version 1 (called uvc_stream), anything else whould give the stream.
Interesting that you get a stream, even with the word snapshot (maybe that was fixed/removed in a later version of version 1)
In zoneminder I just use /file.jpg (so as not to just call the root) as anything (apart from snapshot) produces a stream.
Just mentioning all this, as it may be the reason you get blanks....they are actually snapshots, not a blank stream
I am still using version 1.3, as it works, and I see no reason to update for now.