David Gessel

sick kitty

Saturday, August 25, 2007 

This cat showed up in the yard yesterday. Pregnant. Eeew.. But very friendly, though terrified of Stella, so perhaps the missing flesh was consumed by a dog…

DSCN5377.JPG
Posted at 13:35:31 GMT-0700

Category: photoUncategorized

ZoneMinder on FC7

Saturday, August 25, 2007 

26828649.jpg

Overview
Zone Minder Config ZoneMinder 1.22.3 on Fedora Core 7

There are useful instructions at this URL

Do a basic install of FC7.

  • KDE seems to work better than gnome.
  • Remove unnecessary SW to speed install (desktop stuff)
  • Add Server and Development to get the right tools
  • Add https://www.systutorials.com/additional-repositories-for-fedora-linux/ as an RPM source
  • Make sure the necessary holes are in the firewall at 80

Add necessary bits
yum install mysql-server mysql-devel php-mysql pcre-devel \
perl-DateManip perl-libwww-perl perl-Device-SerialPort \
perl-MIME-Lite perl-Archive-Zip

updating perl (some will be installed already)
perl -MCPAN -e shell
install Bundle::CPAN
reload CPAN
install Archive::Tar
install Archive::Zip
install MIME::Lite
install MIME::Tools
install DateTime
install Date::Manip
install Bundle::libnet
install Device::SerialPort
install Astro::SunTime
install X10
quit

FFMPEG install

Note that getting the FFMPEG libraries installed so they work is a nightmare. I followed these instructions and they seemed to work:

First add the x264 libraries and devel from livna via software manager

If the database hangs try
rm /var/lib/rpm/__db*
rpm --rebuilddb
yum clean all

svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
cd ffmpeg/

./configure --enable-shared --enable-pp \
--enable-libx264 --cpu=pentium3 --enable-gpl

make
make install
nano /etc/ld.so.conf

add the line “/usr/local/lib”
ldconfig

System demons

chkconfig --add mysqld
chkconfig --level 345 mysqld on
chkconfig --level 345 httpd on
service mysqld start
service httpd start

add to /etc/sysctl.conf to increase shared memory limit
kernel.shmall = 134217728
kernel.shmmax = 134217728

Zoneminder Install

Check the latest version of zoneminder at https://web.archive.org/web/20110310142847/http://www.zoneminder.com:80/downloads.html

wget https://zoneminder.com/downloads/
tar xvfz ZoneMinder-1.22.3.tar.gz
cd ZoneMinder-1.22.3

patch it

https://web.archive.org/web/20110501001851/http://www.zoneminder.com:80/wiki/index.php/1.22.3_Patches

The configure command I used is:
./configure --with-webdir=/var/www/html/zm \
--with-cgidir=/var/www/cgi-bin ZM_DB_HOST=localhost\
ZM_DB_NAME=zm ZM_DB_USER=zmuser ZM_DB_PASS=zmpass \
CFLAGS="-g -O3 -march=pentium3" CXXFLAGS="-g -O3 \
-march=pentium3" --with-ffmpeg=/usr/bin \
--with-webuser=apache --with-webgroup=apache

putting a reasonable user name for “zmuser” and password for “zmpass”

make
make install

If make barfs with
/usr/local/src/ZoneMinder-1.22.3/src/zm_mpeg.cpp:284: undefined reference to `av_free(void*)'
try
”in src/zm_mpeg.h starting on line 26, add the lines with the + (removing the + of course) The other lines are just for reference and should be already in the file.” from this reference (lost to the void, alas).

nano src/zm_mpeg.h

#define ZM_MPEG_H
+extern "C" {
+#define __STDC_CONSTANT_MACROS
#include <ffmpeg/avformat.h>
+}
#if FFMPEG_VERSION_INT == 0x000408

Install scripts
install scripts/zm /etc/init.d/
chkconfig --add zm

Create and configure the ZoneMinder database
mysql mysql < db/zm_create.sql
mysql mysql

at the mysql prompt:
grant select,insert,update,delete on zm.* to \
'zmuser'@localhost identified by 'zmpass';
quit

mysqladmin reload

GO!
service zm start

you should get a nice green [OK].

http://127.0.0.1/zm

Black Screen? Go Faster?
No php?
If you have issues make sure you have installed apache php and perl modules.

IJG SIMD jpeg should double performance.
http://cetus.sakura.ne.jp/softlab/jpeg-x86simd/jpegsimd.html#source
* requires nasm which wasn’t installed. Use package manager.
wget http://cetus.sakura.ne.jp/softlab/jpeg-x86simd/sources/jpegsrc-6b-x86simd-1.02.tar.gz
tar xvfz jpegsrc-6b-x86simd-1.02.tar.gz
cd jpeg-6bx
./configure --enable-shared --enable-static
nano Makefile

* Change the CFLAGS from O2 to O3 and add
-funroll-loops -march=pentium3 -fomit-frame-pointer

make
make test
make install

identify the libraries to the system
ldconfig

I also copied the installed files from /usr/local/bin to /usr/bin:
cp /usr/local/bin/cjpeg /usr/bin/cjpeg
cp /usr/local/bin/cjpeg /usr/bin/cjpeg
cp /usr/local/bin/cjpeg /usr/bin/cjpeg
cp /usr/local/bin/cjpeg /usr/bin/cjpeg
cp /usr/local/bin/cjpeg /usr/bin/cjpeg

/etc/init.d/zm restart

NetPBM resizes the JPEGS and faster is better: compile and install
cd /usr/src
svn checkout https://netpbm.sourceforge.net/ netpbm
cd netpbm
/usr/src/netpbm/configure

Answer the questions (GNU and then defaults – I didn’t have TIFF or VGA libs, so “none”)
vi Makefile.config
I added -march=pentium3 to the CFLAGS at the end of the file
make
make package
/usr/src/netpbm/installnetpbm

accept defaults

cabozola install

* package add Ant (it needs ant, but it wasn’t installed by default)
cd /usr/src
wget https://web.archive.org/web/20220526174548/http://www.charliemouse.com/code/cambozola/cambozola-latest.tar.gz
tar xvfz cambozola-latest.tar.gz
cp /usr/src/cambozola-0.68/dist/cambozola.jar /var/www/html/zm
chmod 775 /var/www/html/zm/cambozola.jar

Posted at 01:44:34 GMT-0700

Category: LinuxTechnology

Gatorland video

Tuesday, August 21, 2007 

Back in January of 2007, Carolyn and I visited the premiere 1/2 day attraction in Florida, the amazing Gatorland, home of the gator jump. Unfortunately, in January, the water is a bit cold for Gators and they don’t jump as enthusiastically as they apparently do in warmer months.
{vidavee id=”1842″ w=”320″ }

Posted at 23:53:20 GMT-0700

Category: PlacesTravelvideo

1U Fill-in Panel

Monday, August 20, 2007 

Home-made 1U fill in panel – all salvaged fasteners.
Magnet tape holds it to the rack, so it is easy to move. Clear so you can see inside. A few more U to make…

DSCN5367.JPG
Posted at 00:20:25 GMT-0700

Category: HowTophotoTechnology

The third accident this weekend…

Sunday, August 19, 2007 

Why are these kids so reluctant to chat with the police after an accident? Hmmm… The only time these accidents aren’t hit and run, is when the kids are hurt enough they can’t run. Unfortunately, modern cars are way too safe.

IMG00073.jpg

I offered to help my neighbor, Bila, change the tire in the morning. This morning at 9:00, when he was done baking, he rang my bell and we changed the tire. From the glass on the street, it looked like the perps’ car was far worse off. Bila’s axle might have been a bit tweaked though.

Posted at 02:05:15 GMT-0700

Category: Eventsphoto

Don’t park on the street

Saturday, August 18, 2007 

The second major accident I’ve seen in as many days…

IMG00072.jpg

Both green, late model sporty cars. The last wrapped the front end around a tree on an exit ramp and apparently made it only about 100 yards before collapsing, I think, into someone’s driveway. They were being tended to by paramedics when I came by.

This time the driver apparently tried to pass, lost control, hit some parked cars and endoed the car. The driver and passenger got out and walked away. Probably not their car, probably on something or other. Not likely to be found again, unless the next thing they hit is a lot harder. Airbags cheat evolution.

Oh well, at least it provided amusement for the neighbors.

Posted at 19:45:15 GMT-0700

Category: photoUncategorized

Carolyn’s Orchids

Friday, August 17, 2007 

DSCN5366.JPG
Posted at 15:15:24 GMT-0700

Category: photoUncategorized

Go dick go

Wednesday, August 15, 2007 

Huh… go figure, he sounds sane here….

https://www.youtube.com/watch?v=YENbElb5-xY

Posted at 16:55:37 GMT-0700

Category: Politicsvideo

Linux 342

Wednesday, August 15, 2007 

An IBM 342 with a ServeRAID 4lx is a fine machine, but getting Linux to install is less the effortless. Emacs!

2d238159.jpg

I’m trying to get zoneminder to work on this very nice IBM 342 with a serve raid card and some good drives and 3 video capture cards. The thing should be able to capture 12 streams of video simultaneously, or 6 at full 30FPS. But getting Linux variants to properly recognize the serveraid card is a challenge.

The Mandrake LiveCD install works great on IDE systems, no problem at all. But it doesn’t see the serveraid, so that one was out. Gentoo saw the serveraid card, and since video capture and real time analysis is one of those things that would be good to do fast, the gentoo optimization scheme seemed promising, but it wasn’t. Just a miserable series of failed compiles and fixes that went on endlessly.

So from there to Debian, which is very nice and since it is the parent of Ubuntu and there’s an Ubuntu package and Carolyn loves Ubuntu, that seemed worth a shot. It does see the Serveraid, but there seems to be a bug in the IPS.o driver which reared it’s irritating head during package installs causing hangs, even after I updated the firmware to 7.12.12.

So that was out. On to a distro officially supported by IBM: Suse. That installed great, easy no problem, detected all the ADCs on the capture cards and everything. Very easy to install, but there are some weird bugs with ffmpeg that hung the compile of Zoneminder. It descended into another endless series of patch and edit and retry effort to get through the compile….

Then I saw that Fedora 7 has an RPM in the main distro for ZoneMinder. It is officially supported by IBM and seems rock solid. So far the network install has gone well – the install CD is only 7.71 MB (!) and it seems tentatively promising… it’s on the “Starting install process” screen, which is supposed to take several minutes. As it may need a few GB of data, I’ll give it some time. Unfortunately Fedora doesn’t support CD installs and the 342 has a laptop style CD-ROM drive, so doing a DVD install is out of the question. Network installs are efficient if you only have to do them once, but the retry is all penalty download.

Posted at 15:05:15 GMT-0700

Category: Linux

Big fires

Tuesday, August 14, 2007 

IMG00071.jpg

Big fires north of LA.

Posted at 16:35:19 GMT-0700

Category: photoPlanes