[Almost Solved] v1.24.2 on Ubuntu Server 10.10 with PV-155

Forum for questions and support relating to the 1.24.x releases only.
keyboardgnome
Posts: 60
Joined: Sat Apr 08, 2006 10:18 pm

[Almost Solved] v1.24.2 on Ubuntu Server 10.10 with PV-155

Post by keyboardgnome » Thu Nov 04, 2010 2:58 am

Okie dokie-

I've been a long time happy zoneminder user for quite some time now. I've decided to update the box, but keep my capture card.

I've done an Ubuntu Server 10.10 install with apt-get install zoneminder. Thus far, the only substantial change that I've made is adding www-data to the "video" group.

Here's the biggest problem.
When I go with
/etc/modprobe.d/options.conf
#options bttv gbuffers=16 card=77,77,77,77

Any kind of video I get is either interlaced (no matter the resolution) or is only yellow.

If I do go with having
/etc/modprobe.d/options.conf
options bttv gbuffers=16 card=77,77,77,77

I get *no* video in either v4l or v4l2.

I'm stumped. I haven't had this much trouble with ZM or v4l in the past; it's always worked right out of the box with very little hassle.

In addition, there is an error that keeps cropping up with any of the videoX's:
Can't chmod /dev/video0 to 20666: Operation not permitted

I'm modifying the startup script for ZM to chmod 777 /dev/video*

Ultimately, I'd like to get this working again with the newer (and faster) system.

Any shortcuts and pointers as to where I should prod would be great.

=========

I just needed some sleep. Here's the working result:

In:
/etc/init.d/zoneminder
In the Start function, these are the first few lines:
sleep 15
chmod 777 /dev/video*
zmfix -a


In:
/etc/sysctl.conf

kernel.shmmax = 268435456
kernel.shmall = 268435456

I removed the /etc/modprobe.d/options.conf file. It wasnt needed.

Currently, with only 6 cam's the frame rate is 1.5 with disabling V4L_MULTI_BUFFER. Enabling it, of course, shows many interlace issues, but the frame rate jumps to 15fps which is what I'm after. To completely solve this, I'm after a higher frame rate- any options?

keyboardgnome
Posts: 60
Joined: Sat Apr 08, 2006 10:18 pm

Post by keyboardgnome » Fri Nov 05, 2010 12:25 am

Okay,

update. I'm not able to get more than 1.5 fps for 6 camera's that are on this card. I've load balanced them out across three of the encoders (video0/video1/video2). I also cannot have more than one zone, otherwise capture stops for the cameras on that one chip. The resolution is 320x240, and there is still interlacing with other video channels (sometimes the picture from it, other times blue). Finally, video channels on the same channel seem to randomly go dark.

Practical question. Since I'm no longer getting anywhere near the desired frame rate, should I just purchase two PV-149's?

PatMcLJr
Posts: 28
Joined: Sun Sep 07, 2008 5:56 pm
Location: earth
Contact:

Post by PatMcLJr » Sat Nov 06, 2010 3:54 pm

did you give the LiveCD a shot? I think it uses Arch.

extra frame captures to "settle" the capture image?

pretty much, I dunno but I have similar issues PV-149 but the one I have supposedly does 8 cameras. When I have 2 cameras on a channel the frame rates goes in half.

I might dittel with the memory settings shxxxx and try mmap if I can figure out to to turn it on.

Good Luck,
Pat Jr.
----
evil doers beware, someone is watching you,
hopefully me!

martymoose
Posts: 128
Joined: Tue Jul 12, 2005 9:59 am
Location: australia

Post by martymoose » Mon Nov 08, 2010 9:32 am

mate i think its a 10.10 problem
i setup a new box with 10.10 and also tried 10.04
but bugger me i have 4 cards and all of them are interlaced
then reading this thread i wonder

anyway how did you go
I donated have YOU?

keyboardgnome
Posts: 60
Joined: Sat Apr 08, 2006 10:18 pm

Post by keyboardgnome » Mon Nov 08, 2010 3:55 pm

I'm starting to wonder if it is 10.10 as well with this new info. I've messed with the memory settings, and frame rate adjustments.

It's still interlacing randomly. I'm going to disable some stuff to try to rule out IRQ.

timcraig
Posts: 195
Joined: Mon Dec 10, 2007 5:53 pm
Location: San Jose, CA
Contact:

Post by timcraig » Mon Nov 08, 2010 10:52 pm

I have a PV-155 attached to 9 cameras.

With V4L_MULTI_BUFFER off and CAPTURES_PER_FRAME set to 2, I get ~2.5 fps on cameras that are sharing a capture chip with another camera and ~1.6fps on cameras sharing a capture chip with 2 other cameras. This is without the random interlacing issue.

The issue you are having sounds like you don't have your camera's evenly distributed across capture chips and have 3 cameras on one capture chip and 3 cameras on another capture chip.

for example, with the following setup you should get:

camera1 -> video0 ch0 = 2.5 fps
camera2 -> video0 ch1 = 2.5 fps
camera3 -> video1 ch0 = 2.5 fps
camera4 -> video1 ch0 = 2.5 fps
camera5 -> video2 ch0 = 30 fps
camera6 -> video3 ch0 = 30 fps

another alternative setup would be:

camera1 -> video0 ch0 = 1.6 fps
camera2 -> video0 ch1 = 1.6 fps
camera3 -> video0 ch2 = 1.6 fps
camera4 -> video1 ch0 = 30 fps
camera5 -> video2 ch0 = 30 fps
camera6 -> video3 ch0 = 30 fps

martymoose
Posts: 128
Joined: Tue Jul 12, 2005 9:59 am
Location: australia

Post by martymoose » Tue Nov 09, 2010 9:34 am

yea i tried that
i followed the wiki to the t
so i installed server 9.10 and used the identical wiki howto
and bam to works now
I donated have YOU?

keyboardgnome
Posts: 60
Joined: Sat Apr 08, 2006 10:18 pm

Post by keyboardgnome » Tue Nov 09, 2010 6:20 pm

I've balanced it out as well. Each chip is supporting two camera's.

I'll give ubuntu 9.10 a shot in the next day or so.

I've learned about a bunch of changes that have gone into 10.10 from new applications that manage security on the platform that weren't there in the 9 series. Before I reinstall, I'm going to try disabling all of them :)

timcraig
Posts: 195
Joined: Mon Dec 10, 2007 5:53 pm
Location: San Jose, CA
Contact:

Post by timcraig » Tue Nov 09, 2010 7:20 pm

Then it certainly sounds like an issue with Ubuntu 10.10.

Hopefully this is an Ubuntu thing and not a mainline Linux issue that will eventually creep into other distributions.

keyboardgnome
Posts: 60
Joined: Sat Apr 08, 2006 10:18 pm

Post by keyboardgnome » Tue Nov 23, 2010 4:23 am

Okay,

downgraded to 9.10. Followed the wiki here: http://www.zoneminder.com/wiki/index.ph ... 10_Desktop

Yeah- zoneminder doesnt work anymore. at all.

here's some additional info:

sysctl -p
kernel.shmall = 1073741824
kernel.shmmax = 1073741824

Some logs:
11/22/10 23:14:05.831834 zmdc[1990].INF [Server starting at 10/11/22 23:14:05]
11/22/10 23:14:09.232159 zmdc[1990].INF ['zmc -d /dev/video0' starting at 10/11/22 23:14:09, pid = 2013]
11/22/10 23:14:09.686323 zmdc[1990].INF ['zmfilter.pl' starting at 10/11/22 23:14:09, pid = 2015]
11/22/10 23:14:09.939095 zmdc[1990].ERR ['zmc -d /dev/video0' exited abnormally, exit status 255]
11/22/10 23:14:09.939981 zmdc[1990].INF [Starting pending process, zmc -d /dev/video0]
11/22/10 23:14:09.952223 zmdc[1990].INF ['zmc -d /dev/video0' starting at 10/11/22 23:14:09, pid = 2017]
11/22/10 23:14:10.102145 zmdc[1990].INF ['zmaudit.pl -c' starting at 10/11/22 23:14:10, pid = 2018]
11/22/10 23:14:10.627886 zmdc[1990].INF ['zmwatch.pl' starting at 10/11/22 23:14:10, pid = 2020]
11/22/10 23:14:10.658726 zmdc[1990].ERR ['zmc -d /dev/video0' exited abnormally, exit status 255]
11/22/10 23:14:15.061887 zmdc[1990].INF [Starting pending process, zmc -d /dev/video0]
11/22/10 23:14:15.064073 zmdc[1990].INF ['zmc -d /dev/video0' starting at 10/11/22 23:14:15, pid = 2032]
11/22/10 23:14:15.694886 zmdc[1990].ERR ['zmc -d /dev/video0' exited abnormally, exit status 255]
11/22/10 23:14:25.009624 zmdc[1990].INF [Starting pending process, zmc -d /dev/video0]
11/22/10 23:14:25.011419 zmdc[1990].INF ['zmc -d /dev/video0' starting at 10/11/22 23:14:25, pid = 2033]



11/22/10 23:14:09.427783 zmc_dvideo0[-1].DB1-zm_monitor.cpp/1810 [Loaded monitor 1(1), 1 zones]
11/22/10 23:14:09.427817 zmc_dvideo0[-1].INF-zmc.cpp/186 [Starting Capture]
11/22/10 23:14:09.427953 zmc_dvideo0[-1].DB3-zm_local_camera.cpp/350 [Opening video device /dev/video0]
11/22/10 23:14:09.428046 zmc_dvideo0[-1].DB2-zm_local_camera.cpp/356 [V4L2 support enabled, using V4L2 api]
11/22/10 23:14:09.428070 zmc_dvideo0[-1].DB3-zm_local_camera.cpp/361 [Checking video device capabilities]
11/22/10 23:14:09.428109 zmc_dvideo0[-1].DB3-zm_local_camera.cpp/371 [Setting up video format]
11/22/10 23:14:09.428143 zmc_dvideo0[-1].DB3-zm_local_camera.cpp/400 [Setting up request buffers]
11/22/10 23:14:09.428175 zmc_dvideo0[-1].DB3-zm_local_camera.cpp/428 [Setting up 8 data buffers]
11/22/10 23:14:09.428271 zmc_dvideo0[-1].DB3-zm_local_camera.cpp/466 [Configuring video source]
11/22/10 23:14:09.428325 zmc_dvideo0[-1].DB3-zm_local_camera.cpp/650 [Setting up static colour tables]
11/22/10 23:14:09.428382 zmc_dvideo0[-1].DB2-zm_local_camera.cpp/1140 [Priming capture]
11/22/10 23:14:09.428402 zmc_dvideo0[-1].DB3-zm_local_camera.cpp/1144 [Queueing buffers]
11/22/10 23:14:09.429608 zmc_dvideo0[-1].DB3-zm_local_camera.cpp/1160 [Starting video stream]
11/22/10 23:14:09.429748 zmc_dvideo0[-1].DB2-zm_local_camera.cpp/1186 [Pre-capturing]
11/22/10 23:14:09.429783 zmc_dvideo0[-1].DB3-zm_local_camera.cpp/1192 [Capturing]
11/22/10 23:14:09.429804 zmc_dvideo0[-1].DB3-zm_local_camera.cpp/1215 [Capturing 1 frames]
11/22/10 23:14:09.933059 zmc_dvideo0[-1].WAR-zm_local_camera.cpp/1221 [Capture failure, possible signal loss?: Input/output error]
11/22/10 23:14:09.933186 zmc_dvideo0[-1].ERR-zmc.cpp/258 [Failed to capture image from monitor 1 (0/1)]
11/22/10 23:14:09.933361 zmc_dvideo0[-1].DB3-zm_local_camera.cpp/694 [Terminating video stream]
11/22/10 23:14:09.933495 zmc_dvideo0[-1].DB3-zm_local_camera.cpp/700 [Unmapping video buffers]


11/22/10 23:16:41.075271 zmwatch[2020].ERR [Can't get shared memory id '7a6d0001', 1: No such file or directory]
11/22/10 23:16:51.076581 zmwatch[2020].ERR [Can't get shared memory id '7a6d0001', 1: No such file or directory]
11/22/10 23:17:01.077886 zmwatch[2020].ERR [Can't get shared memory id '7a6d0001', 1: No such file or directory]
11/22/10 23:17:11.079158 zmwatch[2020].ERR [Can't get shared memory id '7a6d0001', 1: No such file or directory]
11/22/10 23:17:21.080421 zmwatch[2020].ERR [Can't get shared memory id '7a6d0001', 1: No such file or directory]
11/22/10 23:17:31.082315 zmwatch[2020].ERR [Can't get shared memory id '7a6d0001', 1: No such file or directory]
11/22/10 23:17:51.085046 zmwatch[2020].ERR [Can't get shared memory id '7a6d0001', 1: No such file or directory]



I know the "cant get shared memory" is a shared memory issue, but I've allocated 1GB!

Currently running 1.24.1 from apt-get install zoneminder

bb99
Posts: 943
Joined: Wed Apr 02, 2008 12:04 am

Post by bb99 » Tue Nov 23, 2010 11:57 am

Check the value of the Shm_key in the options, if it's not = 7a6d0001 try changing it to this value (saw this in an unrelated post and fix, it did clear up the memory issue in that case).

keyboardgnome
Posts: 60
Joined: Sat Apr 08, 2006 10:18 pm

Post by keyboardgnome » Tue Nov 23, 2010 12:44 pm

Thanks!

A combination of that and adding irqpoll to grub took care of that.

All image streams are coming in *faster* than what I've had before on the previous hardware.

One last bit of goofyness:

they're all reporting random and odd fps, like -3744131936485390524185011246081821665100925998966105412907634927417968350828279424352256 fps

keyboardgnome
Posts: 60
Joined: Sat Apr 08, 2006 10:18 pm

Re: [Almost Solved] v1.24.2 on Ubuntu Server 10.10 with PV-1

Post by keyboardgnome » Wed Jun 29, 2011 3:03 pm

Okay- so after many months of happy run time, and reboots as well, it has finally decided to stop working again. As I recalled from my note taking thread... it had to do with the shared memory key. I tried changing the values around, but it doesnt work at all.

The key is currently set to: 0x7a6d0001

zmwatch.log:06/29/2011 10:35:50.188338 zmwatch[2047].ERR [Can't get shared memory id '7a6d0001', 1: No such file or directory]
zmwatch.log:06/29/2011 10:35:50.188894 zmwatch[2047].ERR [Can't get shared memory id '7a6d0001', 1: No such file or directory]
zmwatch.log:06/29/2011 10:35:50.189657 zmwatch[2047].ERR [Can't get shared memory id '7a6d0002', 2: No such file or directory]
zmwatch.log:06/29/2011 10:35:50.190130 zmwatch[2047].ERR [Can't get shared memory id '7a6d0002', 2: No such file or directory]
zmwatch.log:06/29/2011 10:35:50.190846 zmwatch[2047].ERR [Can't get shared memory id '7a6d0003', 3: No such file or directory]
zmwatch.log:06/29/2011 10:35:50.191313 zmwatch[2047].ERR [Can't get shared memory id '7a6d0003', 3: No such file or directory]
zmwatch.log:06/29/2011 10:35:50.192018 zmwatch[2047].ERR [Can't get shared memory id '7a6d0004', 4: No such file or directory]
zmwatch.log:06/29/2011 10:35:50.192483 zmwatch[2047].ERR [Can't get shared memory id '7a6d0004', 4: No such file or directory]
zmwatch.log:06/29/2011 10:35:50.193192 zmwatch[2047].ERR [Can't get shared memory id '7a6d0005', 5: No such file or directory]
zmwatch.log:06/29/2011 10:35:50.193655 zmwatch[2047].ERR [Can't get shared memory id '7a6d0005', 5: No such file or directory]
zmwatch.log:06/29/2011 10:35:50.194379 zmwatch[2047].ERR [Can't get shared memory id '7a6d0006', 6: No such file or directory]
zmwatch.log:06/29/2011 10:35:50.194847 zmwatch[2047].ERR [Can't get shared memory id '7a6d0006', 6: No such file or directory]

User avatar
zoneminder
Site Admin
Posts: 5220
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Re: [Almost Solved] v1.24.2 on Ubuntu Server 10.10 with PV-1

Post by zoneminder » Wed Jun 29, 2011 9:10 pm

If all you are getting is complaints from zmwatch that doesn't necessary mean disaster. If you type 'ipcs -m' do you see the shared memory segments listed? Do the permissions look ok?
Phil

keyboardgnome
Posts: 60
Joined: Sat Apr 08, 2006 10:18 pm

Re: [Almost Solved] v1.24.2 on Ubuntu Server 10.10 with PV-1

Post by keyboardgnome » Wed Jun 29, 2011 9:20 pm

------ Shared Memory Segments --------
key shmid owner perms bytes nattch status
0x07a60001 1933312 www-data 700 44238324 1
0x07a60002 1966081 www-data 700 44238324 1
0x07a60003 1998850 www-data 700 44238324 1
0x07a60004 2031619 www-data 700 44238324 1
0x07a60005 2064388 www-data 700 44238324 1
0x07a60006 2097157 www-data 700 44238324 1


www-data 27343 0.3 0.4 225964 8736 pts/1 S 17:16 0:00 /usr/bin/zma -m 1
www-data 27346 0.2 0.4 225964 8740 pts/1 S 17:16 0:00 /usr/bin/zma -m 2
www-data 27351 0.2 0.4 225964 8736 pts/1 S 17:16 0:00 /usr/bin/zma -m 3
www-data 27354 0.2 0.4 225964 8736 pts/1 S 17:16 0:00 /usr/bin/zma -m 4
www-data 27359 0.3 0.4 225964 8740 pts/1 S 17:16 0:00 /usr/bin/zma -m 5
www-data 27363 0.2 0.3 225964 7660 pts/1 S 17:16 0:00 /usr/bin/zma -m 6


Yeah- the owner is www-data for the processes and the memory space. I dont know why it's 700


When I let it run, I'll get one frame, the screen will go black, and then maybe one frame comes back 15 or so seconds later, goes black, rinse repeat.
Last edited by keyboardgnome on Wed Jun 29, 2011 9:35 pm, edited 1 time in total.

Post Reply

Who is online

Users browsing this forum: No registered users and 12 guests