Hi everyone,
I have Logitech Quickcam Orbit/Sphere 1.3MP and installed ZoneMinder 1.24 build 2679 (ZoneMinder-1.24.0-rc1-2679.tar.gz) on CentOS 5.2.
After overcoming all compile problems (ZoneMinder did not want to compile because of missing ffmpeg packages since default ffmpeg installation did not add them - solved by looking at those forums) - I experience the same problem as described in the above post (the image from V4L2 camera is wrong palette). In addition, the CPU load while I monitor this webcam jumps considerably - a process called "nph-zms" consumes up to 50-70% of the CPU.
Has anyone been able to solve this wrong palette problem? The high CPU load is also an issue for me since I try to build a surveillance system based on a small PC with performance close to thin client. I need to use it with 3 cameras and if this is what happens with one camera, the load for 3 cameras will be probably at 100%. I doubt that I am doing everything correctly, since I heard of people who were able to run ZoneMinder on OpenWRT-based routers, which can offer about 1/2 or 1/3 of the performance of my small PC.
So after this long explanation, here are my specifications:
Hardware
Computer - Fit-PC Slim
http://www.fit-pc.com. CPU: AMD Geode LX 800 - 500 MHz. RAM - 512MB. Hard disk - 2.5" SSD IDE Transcend MLC (TS32GSSD25-M)
Camera - Logitech Quickcam Orbit/Sphere 1.3MP (2006 version)
Software
OS - CentOS 5.2 text-only support (no GUI). It was a bit tricky to install CentOS 5.2 on this PC since it does not install there on itself. Anaconda (CentOS installer) thinks that this CPU is not able to execute i686 instructions, so it crashes during installation. On the other hand, there is a workaround by plugging the hard disk of this PC into a PIII laptop, installing CentOS 5.2 there, and then moving the hard disk back to Fit-PC. This also worked for me. The reason I chose CentOS is because I am most familiar with RedHat Enterprise Linux, and CentOS is the free version of RedHat. In addition, ZoneMinder itself was written under CentOS as I understood, so I tried to make the system as similar as possible to the original, to make my life easier with problems solution.
CentOS 4.7 installation is working perfect without any workaround to move the hard disk, but unfortunately Linux-UVC drivers do not compile and do not work under it (at least for me).
Drivers - the linux-uvc driver from CentOS "Atrpms" repository. I tried to compile the linux-uvc driver from their Subversion repository, but did not succeed, so I had to use this RPM.
ZoneMinder - as written above, ZoneMinder-1.24.0-rc1-2679.tar.gz
I also installed a few other UVC streaming helpers like luvcview, mjpeg_streamer etc., to test the camera there, since at the beginning I did not manage to get any output from ZoneMinder at all (not even wrong palette one).
So the outputs from various commands:
Code: Select all
[root@localhost tmp]# cat /proc/cpuinfo
processor : 0
vendor_id : AuthenticAMD
cpu family : 5
model : 10
model name : Geode(TM) Integrated Processor by AMD PCS
stepping : 2
cpu MHz : 499.923
cache size : 128 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 1
wp : yes
flags : fpu de pse tsc msr cx8 pge cmov clflush mmx mmxext 3dnowext 3dnow up
bogomips : 1000.94
Code: Select all
[root@localhost tmp]# cat /proc/meminfo
MemTotal: 495124 kB
MemFree: 15636 kB
Buffers: 118504 kB
Cached: 190352 kB
SwapCached: 0 kB
Active: 229084 kB
Inactive: 205004 kB
HighTotal: 0 kB
HighFree: 0 kB
LowTotal: 495124 kB
LowFree: 15636 kB
SwapTotal: 1048568 kB
SwapFree: 1048568 kB
Dirty: 64 kB
Writeback: 0 kB
AnonPages: 125228 kB
Mapped: 15240 kB
Slab: 33096 kB
PageTables: 8380 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
CommitLimit: 1296128 kB
Committed_AS: 824416 kB
VmallocTotal: 524280 kB
VmallocUsed: 3092 kB
VmallocChunk: 520864 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
Hugepagesize: 4096 kB
Code: Select all
[root@localhost tmp]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
28G 2.6G 24G 10% /
/dev/hda1 97M 18M 74M 20% /boot
tmpfs 242M 0 242M 0% /dev/shm
Code: Select all
[root@localhost tmp]# lspci
00:01.0 Host bridge: Advanced Micro Devices [AMD] CS5536 [Geode companion] Host Bridge (rev 33)
00:01.1 VGA compatible controller: Advanced Micro Devices [AMD] Geode LX Video
00:01.2 Entertainment encryption device: Advanced Micro Devices [AMD] Geode LX AES Security Block
00:0d.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)
00:0f.0 ISA bridge: Advanced Micro Devices [AMD] CS5536 [Geode companion] ISA (rev 03)
00:0f.2 IDE interface: Advanced Micro Devices [AMD] CS5536 [Geode companion] IDE (rev 01)
00:0f.3 Multimedia audio controller: Advanced Micro Devices [AMD] CS5536 [Geode companion] Audio (rev 01)
00:0f.4 USB Controller: Advanced Micro Devices [AMD] CS5536 [Geode companion] OHC (rev 02)
00:0f.5 USB Controller: Advanced Micro Devices [AMD] CS5536 [Geode companion] EHC (rev 02)
Code: Select all
[root@localhost tmp]# lsusb
Bus 001 Device 004: ID 046d:08cc Logitech, Inc. Mic (PTZ)
Bus 001 Device 001: ID 0000:0000
Bus 001 Device 003: ID 18e8:6238 Qcom
Bus 002 Device 001: ID 0000:0000
Code: Select all
[root@localhost tmp]# v4l-info
### v4l2 device info [/dev/video0] ###
general info
VIDIOC_QUERYCAP
driver : "uvcvideo"
card : LйLйбKхTю/хTю"
bus_info : "0000:00:0f.5"
version : 0.1.0
capabilities : 0x4000001 [VIDEO_CAPTURE,STREAMING]
standards
inputs
VIDIOC_ENUMINPUT(0)
index : 0
name : "Camera 1"
type : CAMERA
audioset : 0
tuner : 0
std : 0x0 []
status : 0x0 []
video capture
VIDIOC_ENUM_FMT(0,VIDEO_CAPTURE)
index : 0
type : VIDEO_CAPTURE
flags : 1
description : "MJPEG"
pixelformat : 0x47504a4d [MJPG]
VIDIOC_ENUM_FMT(1,VIDEO_CAPTURE)
index : 1
type : VIDEO_CAPTURE
flags : 0
description : "YUV 4:2:2 (YUYV)"
pixelformat : 0x56595559 [YUYV]
VIDIOC_G_FMT(VIDEO_CAPTURE)
type : VIDEO_CAPTURE
fmt.pix.width : 320
fmt.pix.height : 240
fmt.pix.pixelformat : 0x47504a4d [MJPG]
fmt.pix.field : NONE
fmt.pix.bytesperline : 0
fmt.pix.sizeimage : 102400
fmt.pix.colorspace : SRGB
fmt.pix.priv : 0
controls
VIDIOC_QUERYCTRL(BASE+0)
id : 9963776
type : INTEGER
name : "Brightness"
minimum : 0
maximum : 255
step : 1
default_value : 127
flags : 0
VIDIOC_QUERYCTRL(BASE+1)
id : 9963777
type : INTEGER
name : "Contrast"
minimum : 0
maximum : 255
step : 1
default_value : 32
flags : 0
VIDIOC_QUERYCTRL(BASE+2)
id : 9963778
type : INTEGER
name : "Saturation"
minimum : 0
maximum : 255
step : 1
default_value : 28
flags : 0
### video4linux device info [/dev/video0] ###
general info
VIDIOCGCAP
name : LйLйбKхTю/хTю"
type : 0x1 [CAPTURE]
channels : 1
audios : 0
maxwidth : 960
maxheight : 720
minwidth : 48
minheight : 32
channels
ioctl VIDIOCGCHAN: Invalid argument
tuner
ioctl VIDIOCGTUNER: Invalid argument
audio
ioctl VIDIOCGAUDIO: Invalid argument
picture
VIDIOCGPICT
brightness : 32639
hue : 0
colour : 7196
contrast : 8224
whiteness : 0
depth : 0
palette : unknown
buffer
ioctl VIDIOCGFBUF: Invalid argument
window
VIDIOCGWIN
x : 0
y : 0
width : 320
height : 240
chromakey : 0
flags : 0
Output of "top" with ZoneMinder service up but camera not connected:
Code: Select all
top - 16:08:25 up 1 day, 17:34, 1 user, load average: 0.34, 0.16, 0.05
Tasks: 211 total, 1 running, 210 sleeping, 0 stopped, 0 zombie
Cpu(s): 1.6%us, 1.3%sy, 0.0%ni, 95.8%id, 1.3%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 495124k total, 470632k used, 24492k free, 114580k buffers
Swap: 1048568k total, 0k used, 1048568k free, 190004k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
11917 root 15 0 2324 1080 796 R 1.6 0.2 0:00.15 top
11913 root 15 0 8628 2600 2096 S 0.7 0.5 0:00.22 sshd
1777 root 16 0 1720 568 476 S 0.3 0.1 0:02.20 syslogd
2023 mysql 15 0 138m 20m 4636 S 0.3 4.2 4:01.60 mysqld
1 root 15 0 2064 620 532 S 0.0 0.1 0:02.12 init
2 root RT -5 0 0 0 S 0.0 0.0 0:00.00 migration/0
3 root 38 19 0 0 0 S 0.0 0.0 0:00.00 ksoftirqd/0
4 root RT -5 0 0 0 S 0.0 0.0 0:00.00 watchdog/0
5 root 10 -5 0 0 0 S 0.0 0.0 0:00.01 events/0
6 root 17 -5 0 0 0 S 0.0 0.0 0:00.00 khelper
7 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 kthread
10 root 10 -5 0 0 0 S 0.0 0.0 0:00.13 kblockd/0
11 root 20 -5 0 0 0 S 0.0 0.0 0:00.00 kacpid
55 root 20 -5 0 0 0 S 0.0 0.0 0:00.00 cqueue/0
58 root 10 -5 0 0 0 S 0.0 0.0 0:00.01 khubd
60 root 17 -5 0 0 0 S 0.0 0.0 0:00.05 kseriod
122 root 25 0 0 0 0 S 0.0 0.0 0:00.00 pdflush
Output of "top" with camera connected and set to 15fps:
Code: Select all
top - 16:38:56 up 1 day, 18:04, 1 user, load average: 1.90, 0.90, 0.42
Tasks: 226 total, 5 running, 221 sleeping, 0 stopped, 0 zombie
Cpu(s): 91.9%us, 2.3%sy, 0.0%ni, 2.3%id, 0.7%wa, 2.9%hi, 0.0%si, 0.0%st
Mem: 495124k total, 487892k used, 7232k free, 115980k buffers
Swap: 1048568k total, 0k used, 1048568k free, 131472k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
12865 apache 16 0 149m 18m 11m R 32.3 3.8 0:09.90 nph-zms
12873 apache 15 0 149m 18m 11m S 31.4 3.8 0:07.90 nph-zms
12833 apache 16 0 144m 13m 12m R 16.2 2.8 0:12.09 zmc
12880 root 15 0 8632 2604 2096 S 5.3 0.5 0:00.24 sshd
12671 root 15 0 2324 1092 796 R 1.8 0.2 0:04.78 top
320 root 10 -5 0 0 0 S 0.3 0.0 0:07.16 kjournald
12722 apache 15 0 23360 7240 2792 S 0.3 1.5 0:00.55 httpd
1 root 15 0 2064 620 532 S 0.0 0.1 0:02.15 init
2 root RT -5 0 0 0 S 0.0 0.0 0:00.00 migration/0
3 root 34 19 0 0 0 S 0.0 0.0 0:00.00 ksoftirqd/0
4 root RT -5 0 0 0 S 0.0 0.0 0:00.00 watchdog/0
5 root 10 -5 0 0 0 S 0.0 0.0 0:00.01 events/0
6 root 17 -5 0 0 0 S 0.0 0.0 0:00.00 khelper
7 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 kthread
10 root 10 -5 0 0 0 S 0.0 0.0 0:00.15 kblockd/0
11 root 20 -5 0 0 0 S 0.0 0.0 0:00.00 kacpid
55 root 20 -5 0 0 0 S 0.0 0.0 0:00.00 cqueue/0