Page 1 of 1
Logitech C260 UVC in ZoneMinder - Almost Works, Need Help
Posted: Sun May 08, 2011 2:38 am
by brycenesbitt
For this camera
guvcview works perfectly.
xawtv comes up immediately showing video. The device shows as supported over at the UVC support page at "ideasonboard".
With ZoneMinder I get a red device name and (at best) a black video square.
I'm running
Ubuntu 10.04 LTS, set up via the Ubuntu page on the ZoneMinder wiki. Some basic info is:
Code: Select all
# lsusb -v
Device ID:
Bus 001 Device 004: ID 046d:081a Logitech, Inc. (C260 - USB Video Class)
bDeviceClass 239 Miscellaneous Device
bFunctionClass 14 Video
# lsmod | grep uvc
uvcvideo 57310 0
videodev 34361 1 uvcvideo
v4l1 compat 13251 2 uvcvideo , videodev
# zmu -v -q
Error, failed to query crop /dev/video0: Invalid argument
# zmu -v -q -V1
Video Device: /dev/video0
Video Capabilities
Name: UVC Camera (046d:081a)
Type: 1
Can capture
Video Channels: 1
Audio Channels: 0
Maximum Width: 1280
Maximum Height: 960
Minimum Width: 48
Minimum Height: 32
Window Attributes
X Offset: 0
Y Offset: 0
Width: 352
Height: 288
Picture Attributes
Palette: 8 - YUYV
Colour Depth: 16
Brightness: 33924
Hue: 0
Colour :8224
Contrast: 8224
Whiteness: 0
Channel 0 Attributes
Name: Camera 1
Channel: 0
Flags: 0
Type: 2 - Camera
Format: 0 - PAL
In the ZoneMinder web GUI
Add new monitor probe results in "
Unable to probe network cameras, status is '127'".
I'm following the Wiki documentation, but left unclear on how to set the
Device Format and
Capture Palette options: the
zum output only hints at how settings should transfer (e.g. YUYV means YUYV422P?). The
-V1 option was something I found in the forums but is not documented on the
zum wiki page. Perhaps we should start there: how do I determine the proper values?
Using
xawtv it works fine until the J or O key are pressed, then xawtv loops with error:
libv4l2: error setting pixformat: Input/output error
ioctl: VIDIOC_S_FMT(type=VIDEO_CAPTURE;fmt.pix.width=352;fmt.pix.height=288;fmt.pix.pixelformat=0x32315559 [YU12];fmt.pix.field=NONE;fmt.pix.bytesperline=352;fmt.pix.sizeimage=152064;fmt.pix.colorspace=SRGB;fmt.pix.priv=0): Input/output error
I can run additional tests and post them here. I will even offer to purchase a Logitech C260 for a person with the interest and ability to get it working well.
Re: Logitech C260 UVC in ZoneMinder - Almost Works, Need Hel
Posted: Sun May 08, 2011 6:41 am
by mastertheknife
Create a new monitor:
Method: V4L2
Capture format: PAL
Capture palette: YUYV
Width: 320 (just for testing)
Height: 240 (just for testing)
You should get a picture with these settings. otherwise something is wrong.
mastertheknife.
Re: Logitech C260 UVC in ZoneMinder - Almost Works, Need Hel
Posted: Sun May 08, 2011 6:56 am
by brycenesbitt
With those settings I get a black square.
The camera was purchased in the USA, but NTSC does the same.
Re: Logitech C260 UVC in ZoneMinder - Almost Works, Need Hel
Posted: Sun May 08, 2011 10:42 am
by mastertheknife
With the settings i gave you, what errors do you get in the system log?
Please paste it here using the code tags to keep things clean or to
http://www.pastebin.com and link me.
mastertheknife.
Re: Logitech C260 UVC in ZoneMinder - Almost Works, Need Hel
Posted: Sun May 08, 2011 1:53 pm
by bb99
Re: Logitech C260 UVC in ZoneMinder - Almost Works, Need Hel
Posted: Sun May 08, 2011 3:33 pm
by brycenesbitt
I've seen that, but it also implies ZM should be able to get UVC cameras working directly:
NOTE: As of July 21 2008 support for V4L2 drivers has been incorporated into Zoneminder 1.24.0 [1], rendering this method not required for most uvcvideo enabled cams.
Re: Logitech C260 UVC in ZoneMinder - Almost Works, Need Hel
Posted: Sun May 08, 2011 3:45 pm
by brycenesbitt
With the above settings and the C260 camera, /var/log/zm is empty. But /var/log/messages has:
May 8 08:36:26 bnesbitt-desktop zma_m6[17621]: last message repeated 17 times
May 8 08:36:26 bnesbitt-desktop zmdc[2899]: INF [Starting pending process, zmc -d /dev/video0]
May 8 08:36:26 bnesbitt-desktop zmdc[2899]: INF ['zmc -d /dev/video0' starting at 11/05/08 08:36:26, pid = 17874]
May 8 08:36:26 bnesbitt-desktop zmdc[17874]: INF ['zmc -d /dev/video0' started at 11/05/08 08:36:26]
May 8 08:36:26 bnesbitt-desktop zma_m6[17621]: WAR [Waiting for capture daemon]
May 8 08:36:27 bnesbitt-desktop zmc_dvideo0[17874]: INF [Debug Level = 0, Debug Log = <none>]
May 8 08:36:27 bnesbitt-desktop zmc_dvideo0[17874]: INF [Starting Capture]
May 8 08:36:27 bnesbitt-desktop zmc_dvideo0[17874]: INF [Got signal 6 (Aborted), exiting and forcing backtrace]
May 8 08:36:27 bnesbitt-desktop zma_m6[17621]: WAR [Waiting for capture daemon]
May 8 08:37:28 bnesbitt-desktop zma_m6[17621]: last message repeated 61 times
May 8 08:38:29 bnesbitt-desktop zma_m6[17621]: last message repeated 61 times
May 8 08:39:30 bnesbitt-desktop zma_m6[17621]: last message repeated 61 times
May 8 08:40:31 bnesbitt-desktop zma_m6[17621]: last message repeated 61 times
Re: Logitech C260 UVC in ZoneMinder - Almost Works, Need Hel
Posted: Mon May 09, 2011 2:40 am
by bb99
Sorry, my post was intended to get you researching. So is this one:
http://www.ideasonboard.org/uvc/. Sometimes the old way is the only way; don't forget about Vlc and it's streaming capabilities.
Re: Logitech C260 UVC in ZoneMinder - Almost Works, Need Hel
Posted: Mon May 09, 2011 5:07 am
by brycenesbitt
I'd rather get it fixed and fully supported, as opposed to hacking it out or working around it. I will donate hardware.
Re: Logitech C260 UVC in ZoneMinder - Almost Works, Need Hel
Posted: Mon May 09, 2011 5:17 am
by mastertheknife
brycenesbitt wrote:I'd rather get it fixed and fully supported, as opposed to hacking it out or working around it. I will donate hardware.
I love that thinking!
OK. Enable debugging level 9 with the settings i gave you, start zoneminder and debugging logs should be created in /var/log/zm. Please upload the one for zmc to
http://www.pastebin.com and link me.
mastertheknife.
Re: Logitech C260 UVC in ZoneMinder - Almost Works, Need Hel
Posted: Mon May 09, 2011 5:42 am
by brycenesbitt
Enabling "Options->Debug" EXTRA_DEBUG at level 9 results in no files in /var/log/zm, and lot of files in /tmp
/tmp/zmdc.log has nothing useful:
Code: Select all
05/08/2011 22:35:14.086924 zmdc[3067].INF [Starting pending process, zmc -d /dev/video0]
05/08/2011 22:35:14.088415 zmdc[3067].INF ['zmc -d /dev/video0' starting at 11/05/08 22:35:14, pid = 3159]
05/08/2011 22:35:14.211598 zmdc[3067].ERR ['zmc -d /dev/video0' exited abnormally, exit status 6]
05/08/2011 22:35:54.076189 zmdc[3067].INF [Starting pending process, zmc -d /dev/video0]
05/08/2011 22:35:54.077676 zmdc[3067].INF ['zmc -d /dev/video0' starting at 11/05/08 22:35:54, pid = 3231]
05/08/2011 22:35:54.277375 zmdc[3067].ERR ['zmc -d /dev/video0' exited abnormally, exit status 6]
Zm creates approximately 20 new debug files in /tmp every minute. Though perhaps there is something of interest here:
05/08/11 22:34:33.174488 zmc_dvideo0[3054].DB1-zm_monitor.cpp/1814 [Loaded monitor 6(Monitor-6), 1 zones]
05/08/11 22:34:33.174513 zmc_dvideo0[3054].INF-zmc.cpp/188 [Starting Capture]
05/08/11 22:34:33.174811 zmc_dvideo0[3054].DB3-zm_local_camera.cpp/349 [Opening video device /dev/video0]
05/08/11 22:34:33.174881 zmc_dvideo0[3054].FAT-zm_local_camera.cpp/352 [Failed to open video device /dev/video0: Permission denied]
05/08/11 22:34:33.175067 zmc_dvideo0[3054].INF-zm_signal.cpp/64 [Got signal 6 (Aborted), exiting and forcing backtrace]
$ ls -la /dev/video0
crw-rw----+ 1 root video 81, 0 2011-05-08 20:34 /dev/video0
A bugfix (no features, just refinements) release to ZoneMinder would be great. If zm is smooth to set up, the userbase will grow quickly.
Re: Logitech C260 UVC in ZoneMinder - Almost Works, Need Hel
Posted: Mon May 09, 2011 5:44 am
by brycenesbitt
Curiously:
# zmc -d /dev/video0
Results in video, right in the same browser window that had black before! It captures about 1fps, or maybe a little less (half a frame per second). Though, the events look pretty messed up
Id Name Time Secs Frames Score
13 New Event 1969-12-31 16:00:00 16429971.74 2000/0 0/0 X
12 Event-12 1969-12-31 16:00:00 16429835.10 13/0 0/0 X
11 Event-11 1969-12-31 16:00:00 16429835.12 14/0 0/0 X
10 Event-10 2011-05-08 22:45:15 108.40 1409/0 0/0 X
9 Event-9 2011-05-08 22:45:15 108.40 1375/0 0/0 X
Re: Logitech C260 UVC in ZoneMinder - Almost Works, Need Hel
Posted: Mon May 09, 2011 6:02 am
by mastertheknife
Your problem is a permission problem that zmfix is supposed to workaround but it doesn't so don't rely on it.
Choose one of the following:
1) Add your apache user (www-data on debian\ubuntu) to the video group, like this:
gpasswd -a <user> video
You may need to relogin\restart apache before it takes effect
2) chmod a=rw /dev/video0
This one might not stick between restarts though.
Regarding the low fps, try disabling the extra debugging, it takes a lot of CPU and we already found the problem
mastertheknife.
Re: Logitech C260 UVC in ZoneMinder - Almost Works, Need Hel
Posted: Mon May 09, 2011 7:09 am
by brycenesbitt
Wow, that was a lot of trouble for a simple problem.
Remember the part about making it better? I see I'm not the first with a similar issue:
http://www.zoneminder.com/forums/viewto ... =8&t=12089
I did edit the wiki to address the topic over at:
http://www.zoneminder.com/wiki/index.ph ... n#Tutorial
Is there any other simple thing I can do to help?
My next challenge is my browser shows "Plug In Missing" when playing an event. But does not define
which plugin is missing.
------------------------------------------------------------
And all that said, after all that trouble, I'm wondering if ZoneMinder is the right package for my need. I'd like:
- Stamping of video with date/time/camera name
Real-time montage of all cameras
24/7 recording of video into a fixed size partition (e.g. 10Gib per camera)
Playback by time search (e.g. 2pm on May 3rd).
Jog/shuttle controls on playback.
Export by time range (e.g. May 3rd 2pm-3pm).
Non-video triggers would be good too (e.g. panic button, or perimeter sensor fires even if there is not yet anything apparent on the video). Pretty much nothing else matters.