Page 1 of 3

My problems compiling with ffmpeg support on FC10

Posted: Sun Feb 22, 2009 9:02 am
by Blazer
I can see that configure is not finding the ffmpeg libs:

Code: Select all

checking libavutil/avutil.h usability... no
checking libavutil/avutil.h presence... no
checking for libavutil/avutil.h... no
checking ffmpeg/avutil.h usability... no
checking ffmpeg/avutil.h presence... no
checking for ffmpeg/avutil.h... no
checking libavcodec/avcodec.h usability... no
checking libavcodec/avcodec.h presence... no
checking for libavcodec/avcodec.h... no
checking ffmpeg/avcodec.h usability... no
checking ffmpeg/avcodec.h presence... no
checking for ffmpeg/avcodec.h... no
checking libavformat/avformat.h usability... no
checking libavformat/avformat.h presence... no
checking for libavformat/avformat.h... no
checking ffmpeg/avformat.h usability... no
checking ffmpeg/avformat.h presence... no
checking for ffmpeg/avformat.h... no
checking libswscale/swscale.h usability... no
checking libswscale/swscale.h presence... no
checking for libswscale/swscale.h... no
checking ffmpeg/swscale.h usability... no
checking ffmpeg/swscale.h presence... no
checking for ffmpeg/swscale.h... no
Here is where my libs are actually located:

Code: Select all

# rpm -ql ffmpeg-devel
/usr/include/ffmpeg
/usr/include/ffmpeg/libavcodec
/usr/include/ffmpeg/libavcodec/avcodec.h
/usr/include/ffmpeg/libavcodec/opt.h
/usr/include/ffmpeg/libavdevice
/usr/include/ffmpeg/libavdevice/avdevice.h
/usr/include/ffmpeg/libavfilter
/usr/include/ffmpeg/libavfilter/avfilter.h
/usr/include/ffmpeg/libavformat
/usr/include/ffmpeg/libavformat/avformat.h
/usr/include/ffmpeg/libavformat/avio.h
/usr/include/ffmpeg/libavformat/rtsp.h
/usr/include/ffmpeg/libavformat/rtspcodes.h
/usr/include/ffmpeg/libavutil
/usr/include/ffmpeg/libavutil/adler32.h
/usr/include/ffmpeg/libavutil/avstring.h
/usr/include/ffmpeg/libavutil/avutil.h
/usr/include/ffmpeg/libavutil/base64.h
/usr/include/ffmpeg/libavutil/common.h
/usr/include/ffmpeg/libavutil/crc.h
/usr/include/ffmpeg/libavutil/fifo.h
/usr/include/ffmpeg/libavutil/intfloat_readwrite.h
/usr/include/ffmpeg/libavutil/log.h
/usr/include/ffmpeg/libavutil/lzo.h
/usr/include/ffmpeg/libavutil/mathematics.h
/usr/include/ffmpeg/libavutil/md5.h
/usr/include/ffmpeg/libavutil/mem.h
/usr/include/ffmpeg/libavutil/random.h
/usr/include/ffmpeg/libavutil/rational.h
/usr/include/ffmpeg/libavutil/sha1.h
/usr/include/ffmpeg/libpostproc
/usr/include/ffmpeg/libpostproc/postprocess.h
/usr/include/ffmpeg/libswscale
/usr/include/ffmpeg/libswscale/rgb2rgb.h
/usr/include/ffmpeg/libswscale/swscale.h
/usr/lib/libavcodec.so
/usr/lib/libavdevice.so
/usr/lib/libavfilter.so
/usr/lib/libavformat.so
/usr/lib/libavutil.so
/usr/lib/libpostproc.so
/usr/lib/libswscale.so
/usr/lib/pkgconfig/libavcodec.pc
/usr/lib/pkgconfig/libavdevice.pc
/usr/lib/pkgconfig/libavfilter.pc
/usr/lib/pkgconfig/libavformat.pc
/usr/lib/pkgconfig/libavutil.pc
/usr/lib/pkgconfig/libpostproc.pc
/usr/lib/pkgconfig/libswscale.pc
/usr/lib/sse2/libavcodec.so
/usr/lib/sse2/libavdevice.so
/usr/lib/sse2/libavfilter.so
/usr/lib/sse2/libavformat.so
/usr/lib/sse2/libavutil.so
/usr/lib/sse2/libpostproc.so
/usr/lib/sse2/libswscale.so
Here is a sample of the errors I get when I try to run make:

Code: Select all

# make
make  all-recursive
make[1]: Entering directory `/tmp/ZoneMinder-1.24.0'
Making all in src
make[2]: Entering directory `/tmp/ZoneMinder-1.24.0/src'
g++ -DHAVE_CONFIG_H -I. -I..  -I/usr/lib/mysql/include -I/usr/include -Wall -Wno-sign-compare -fno-inline -I/usr/include  -frepo -g -O2 -MT zmc.o -MD -MP -MF .deps/zmc.Tpo -c -o zmc.o zmc.cpp
In file included from zm_mpeg.h:23,
                 from zm_stream.h:27,
                 from zm_event.h:39,
                 from zm_zone.h:27,
                 from zm_monitor.h:28,
                 from zmc.cpp:28:
zm_ffmpeg.h:33:2: error: #error "No location for avutils.h found"
zm_ffmpeg.h:40:2: error: #error "No location for avcodec.h found"
zm_ffmpeg.h:47:2: error: #error "No location for avformat.h found"
zm_ffmpeg.h:55:2: error: #error "No location for swscale.h found"
This is the configure option I am currently using:

Code: Select all

# ./configure --with-mysql=/usr/lib/mysql --with-ffmpeg=/usr/lib --with-extralibs="-lmp3lame -L/usr/lib/mysql" --with-webdir=/var/www/html --with-cgidir=/var/www/cgi-bin
Any suggestions are much appreciated.

Re: My problems compiling with ffmpeg support on FC10

Posted: Sun Feb 22, 2009 9:20 am
by nuck
Blazer wrote:This is the configure option I am currently using:

Code: Select all

# ./configure --with-mysql=/usr/lib/mysql --with-ffmpeg=/usr/lib --with-extralibs="-lmp3lame -L/usr/lib/mysql" --with-webdir=/var/www/html --with-cgidir=/var/www/cgi-bin
Any suggestions are much appreciated.
Try

Code: Select all

./configure --with-webdir=/var/www/html --with-cgidir=/var/www/cgi-bin 
and see where that gets you. People insist on providing options to configure that are redundant (or just plain wrong).. Give configure a chance to figure things out on it's own and go from there.

Re: My problems compiling with ffmpeg support on FC10

Posted: Sun Feb 22, 2009 12:28 pm
by maciekc
Blazer wrote: This is the configure option I am currently using:

Code: Select all

# ./configure --with-mysql=/usr/lib/mysql --with-ffmpeg=/usr/lib --with-extralibs="-lmp3lame -L/usr/lib/mysql" --with-webdir=/var/www/html --with-cgidir=/var/www/cgi-bin
It should be: --with-ffmpeg=/usr

Code: Select all

# ./configure --with-mysql=/usr/lib/mysql --with-ffmpeg=/usr --with-extralibs="-lmp3lame -L/usr/lib/mysql" --with-webdir=/var/www/html --with-cgidir=/var/www/cgi-bin

Posted: Sun Feb 22, 2009 7:25 pm
by zoneminder
Unless ffmpeg is somewhere other than in the usual places under /usr/ or /usr/local then don't bother with the with-ffmpeg option as it should find it.

hmmm...

Posted: Sun Feb 22, 2009 7:32 pm
by mklein
Doesn't this contradict another manual reference which says to use "/usr/bin" for ffmpeg? (or whatever dir parent is).

I think I used "/usr/local" at first (for handbuilt ffmpeg) and later when I used "/usr/local/bin" the cfg script did seem to pick up more ffmpeg in output.


mike

Re: My problems compiling with ffmpeg support on FC10

Posted: Sun Feb 22, 2009 7:34 pm
by Blazer
nuck wrote:
Blazer wrote:This is the configure option I am currently using:

Code: Select all

# ./configure --with-mysql=/usr/lib/mysql --with-ffmpeg=/usr/lib --with-extralibs="-lmp3lame -L/usr/lib/mysql" --with-webdir=/var/www/html --with-cgidir=/var/www/cgi-bin
Any suggestions are much appreciated.
Try

Code: Select all

./configure --with-webdir=/var/www/html --with-cgidir=/var/www/cgi-bin 
and see where that gets you. People insist on providing options to configure that are redundant (or just plain wrong).. Give configure a chance to figure things out on it's own and go from there.
The webdir options have nothing to do with finding the ffmpeg libraries? I gave it a whirl anyway, still same errors.

Re: My problems compiling with ffmpeg support on FC10

Posted: Sun Feb 22, 2009 7:35 pm
by Blazer
maciekc wrote:
Blazer wrote: This is the configure option I am currently using:

Code: Select all

# ./configure --with-mysql=/usr/lib/mysql --with-ffmpeg=/usr/lib --with-extralibs="-lmp3lame -L/usr/lib/mysql" --with-webdir=/var/www/html --with-cgidir=/var/www/cgi-bin
It should be: --with-ffmpeg=/usr

Code: Select all

# ./configure --with-mysql=/usr/lib/mysql --with-ffmpeg=/usr --with-extralibs="-lmp3lame -L/usr/lib/mysql" --with-webdir=/var/www/html --with-cgidir=/var/www/cgi-bin
I tried that and still same errors:

Code: Select all

./configure --with-webdir=/var/www/html --with-cgidir=/var/www/cgi-bin --with-mysql=/usr/lib/mysql --with-ffmpeg=/usr --with-extralibs="-lmp3lame -L/usr/lib/mysql" --with-webdir=/var/www/html --with-cgidir=/var/www/cgi-bin

Posted: Sun Feb 22, 2009 7:48 pm
by Blazer
zoneminder wrote:Unless ffmpeg is somewhere other than in the usual places under /usr/ or /usr/local then don't bother with the with-ffmpeg option as it should find it.
Okay now tried leaving out --with-ffmpeg option, still same errors. At this point Im suspecting it is some oddity with the version of ffmpeg that I am using, although it worked fine with 1.23.x

Posted: Sun Feb 22, 2009 8:12 pm
by mklein
Have you rebuilt ffmpeg? What version of zm/ffmpeg are you using?

Trying to compile zm against pre-buit ffmpeg will fail usually I think.

You will have to grab ffmpeg, make edit to single line in rtsp cpp file, rebuild, then build zm.

These steps worked for me on ubuntu 8.10.

Re: hmmm...

Posted: Sun Feb 22, 2009 8:12 pm
by zoneminder
mklein wrote:Doesn't this contradict another manual reference which says to use "/usr/bin" for ffmpeg? (or whatever dir parent is).

I think I used "/usr/local" at first (for handbuilt ffmpeg) and later when I used "/usr/local/bin" the cfg script did seem to pick up more ffmpeg in output.
There are two separate things here. Configure locates the ffmpeg libraries and headers for building. There is also an option to locate the ffmpeg binary which is used to generate videos. It is likely that the second could be derived from the first I guess.

Re: hmmm...

Posted: Sun Feb 22, 2009 8:14 pm
by Blazer
zoneminder wrote:
mklein wrote:Doesn't this contradict another manual reference which says to use "/usr/bin" for ffmpeg? (or whatever dir parent is).

I think I used "/usr/local" at first (for handbuilt ffmpeg) and later when I used "/usr/local/bin" the cfg script did seem to pick up more ffmpeg in output.
There are two separate things here. Configure locates the ffmpeg libraries and headers for building. There is also an option to locate the ffmpeg binary which is used to generate videos. It is likely that the second could be derived from the first I guess.
Exactly...in my case it is locating the ffmpeg libs and headers that is failing.

Posted: Sun Feb 22, 2009 8:14 pm
by zoneminder
Why are you using these options?
--with-extralibs="-lmp3lame -L/usr/lib/mysql"
Neither should be necessary. If you look in config.log you might find that the errors to do with the ffmpeg headers are actually failures related to this.

my configuration to build ffmpeg/zm

Posted: Sun Feb 22, 2009 8:18 pm
by mklein
For building zm I apparently used the following (configure.mdk...my custom config):

./configure --with-webdir=/var/www/zm --with-cgidir=/usr/lib/cgi-bin ZM_DB_PASS=<dontyouwish> --with-libarch --with-webuser=www-data --with-webgroup=www-data --with-ffmpeg=/usr/local/bin
--enable-debug=yes ZM_SSL_LIB=openssl

The with-libarch params is cause I'm on 64-bit...not sure if necessary.

I used the following to build ffmpeg:

mklein@father:/usr/local/src/zm$ cat ../ffmpeg/configure.mdk
#!/bin/bash
./configure --enable-gpl --enable-swscale --enable-shared --enable-pthreads

I may have screwed up -with-ffmpeg param in zm build....but to my recollection configure found ffmpeg in ALL cases during config.

At least I get a workable build.

Posted: Sun Feb 22, 2009 8:28 pm
by Blazer
zoneminder wrote:Why are you using these options?
--with-extralibs="-lmp3lame -L/usr/lib/mysql"
Neither should be necessary. If you look in config.log you might find that the errors to do with the ffmpeg headers are actually failures related to this.
If I do not use that extralibs option, I get this error:

Code: Select all

checking for mysql_init in -lmysqlclient... no
configure: error: zm requires libmysqlclient.a
So thats why Im using those options. I will take a closer look at the config.log to see if it reveals anything

Posted: Sun Feb 22, 2009 8:33 pm
by mklein
On my box libmysqlclient.a is in /usr/lib and NOT /usr/lib/mysql.

Code: Select all

mklein@father:/usr$ ls /usr/lib/*mysql*
/usr/lib/libmysqlclient.a    /usr/lib/libmysqlclient_r.la     /usr/lib/libmysqlclient_r.so.15.0.0  /usr/lib/libmysqlclient.so.15.0.0
/usr/lib/libmysqlclient.la   /usr/lib/libmysqlclient_r.so     /usr/lib/libmysqlclient.so
/usr/lib/libmysqlclient_r.a  /usr/lib/libmysqlclient_r.so.15  /usr/lib/libmysqlclient.so.15

/usr/lib/mysql:
libdbug.a  libmyisam.a     libmysqld.a     libmysys.a      libndbclient.la  libndbclient.so.2      libvio.a
libheap.a  libmyisammrg.a  libmystrings.a  libndbclient.a  libndbclient.so  libndbclient.so.2.0.0
mklein@father:/usr$