ffmpeg Installation Woes - How I fixed them

Support and queries relating to all previous versions of ZoneMinder
Locked
Geo99M6Z
Posts: 10
Joined: Fri May 13, 2005 12:33 pm

ffmpeg Installation Woes - How I fixed them

Post by Geo99M6Z »

Talk about a long weekend trying to figure out what was going on with my installation.

I've got FC3, customized apache dirs, php, etc. (not loaded from RPM)

I have seen many postings for errors regarding FFMPEG and the version that people are using. I tried all versions this past weekend and no luck, until this morning when I had time to sleep on it.

I downloaded the ffmpeg-0.4.9-pre1 source. I knew that I must have been doing something wrong, but not sure.

I wasn't doing anything wrong with the compile or install. I found out that FFMPEG wasn't installing everything like it should have been.

First the configure:

Code: Select all

./configure --enable-shared --enable-mp3lame
make
make install
What the make install leaves out are the libavcodec.a and libavformat.a lib files. At least that is what my experience was with recompiling and re-installing MANY times.

To fix this, I just copied them to the appropriate directory. While still in the ffmpeg source directory type:

Code: Select all

cp libavcodec/libavcodec.a /usr/local/lib
cp libavformat/libavformat.a /usr/local/lib
I use /usr/local/lib because by default FFMPEG gets installed there.

Make sure that you DO NOT have the libavcodec.a and libavformat.a files in the /usr/lib directory, or your Zoneminder compile will fail.

My /etc/ld.so.conf file looks like the following:

Code: Select all

include ld.so.conf.d/*.conf
/usr/local/lib
/opt/mysql/lib/mysql
/opt/php/lib/php

/usr/X11R6/lib/nvidia-graphics-1.0-4496
/lib/security
type:

Code: Select all

ldconfig
Now configure Zoneminder, make, make install. Don't forget to follow the upgrade procedure as outlined in the documentation.

My configure string for Zoneminder

Code: Select all

 ./configure --with-mysql=/opt/mysql \
--with-webdir=/path/to/webdir \
--with-cgidir=/path/to/cgi-dir \
--with-webuser=nobody --with-webgroup=nobody \
--with-ffmpeg=/usr/local/include/ffmpeg --with-lame=/usr/include/lame
After I copied those lib files to /usr/local/lib and ldconfig'd, my zoneminder compiled with ease. I was expecting an error this morning, but it went smooth.

Hopefully this helps you.

-Geo
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

You have to da a make installlib to get the library files installed or ./configure --enable-shared by default they are not installed.
These are also noted in these threads:
http://www.zoneminder.com/forums/viewto ... installlib
http://www.zoneminder.com/forums/viewto ... ableshared
http://www.zoneminder.com/forums/viewto ... ableshared
http://www.zoneminder.com/forums/viewto ... ableshared

Regards,
Cordel
jonatha
Posts: 21
Joined: Sun Jul 10, 2005 9:27 pm

I thought zm and ffmpeg 0.4.9 were incompatible

Post by jonatha »

I get a compile error in zm when I try that combination, and was under the impression an updated version of zm would be available in the near future?
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

The -enable-shared part of ffmpeg has been broken for some time and only fixed recently. You have to do the make installlibs then run ldconfig so that zm can find them. The latest ffmpeg CVS still has some kinks to work out so that zm can use it. All I can say is that it is on my list to-do. A recent change at my work (laid off 5 people) now has me working any where from 12 to 20 hours a day and traveling over 250 sq miles so I only see home at best once a week. So I don't get much time do work on ZM right at the moment. (this will change as I'm looking for a new job).
Regards,
Cordel
Locked