Page 1 of 1

compile with ffmpeg option error: ffmpeg/avformat.h: No such

Posted: Wed Feb 27, 2008 3:45 pm
by Ternitzer
Hi there.
I have been using ZoneMinder for some time now and I really want to get the ffmpeg part working.
After reading all the forum posts here is what i have done so far:

Installed ffmpeg from source:

svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
cd ffmpeg
./configure --enable-gpl --enable-swscaler --prefix=/usr/local --enable-shared
make
make install

that works and I end up with the binaries under /usr/local/bin and the libraries under /usr/local/lib

Then I go into my ZM source folder:
cd /usr/local/src/ZoneMinder-1.23.1
./configure --with-webdir=/var/www --with-cgidir=/usr/lib/cgi-bin --with-webuser=www-data --with-webgroup=www-data --with-ffmpeg=/usr/local/lib

And I get all OK. But when I run make install or make && make install I get the following errors:

Making install in src
make[1]: Entering directory `/usr/local/src/ZoneMinder-1.23.1/src'
g++ -DHAVE_CONFIG_H -I. -I.. -I/usr/include -I/usr/local/lib/include -g -O2 -MT zmc.o -MD -MP -MF .deps/zmc.Tpo -c -o zmc.o zmc.cpp
In file included from zm_stream.h:27,
from zm_event.h:36,
from zm_zone.h:27,
from zm_monitor.h:29,
from zmc.cpp:27:
zm_mpeg.h:29:29: error: ffmpeg/avformat.h: No such file or directory
zm_mpeg.h:63: error: use of enum ‘PixelFormat’ without previous declaration
zm_mpeg.h:64: error: ISO C++ forbids declaration of ‘AVOutputFormat’ with no type
zm_mpeg.h:64: error: expected ‘;’ before ‘*’ token
zm_mpeg.h:65: error: ISO C++ forbids declaration of ‘AVFormatContext’ with no type
zm_mpeg.h:65: error: expected ‘;’ before ‘*’ token
zm_mpeg.h:66: error: ISO C++ forbids declaration of ‘AVStream’ with no type
zm_mpeg.h:66: error: expected ‘;’ before ‘*’ token
zm_mpeg.h:67: error: ISO C++ forbids declaration of ‘AVFrame’ with no type
zm_mpeg.h:67: error: expected ‘;’ before ‘*’ token
zm_mpeg.h:68: error: ISO C++ forbids declaration of ‘AVFrame’ with no type
zm_mpeg.h:68: error: expected ‘;’ before ‘*’ token
zm_mpeg.h:69: error: ISO C++ forbids declaration of ‘uint8_t’ with no type
zm_mpeg.h:69: error: expected ‘;’ before ‘*’ token
zm_mpeg.h:85: error: ‘uint8_t’ has not been declared
make[1]: *** [zmc.o] Error 1
make[1]: Leaving directory `/usr/local/src/ZoneMinder-1.23.1/src'
make: *** [install-recursive] Error 1

I don't know how to take care of the header problem. From what I have read I need to run make installlib in the ffmpeg source directory, but that doesn't work.
I get
make: *** No rule to make target `installlib'. Stop.

Any ideas?

Thanks.

l

Posted: Sun Mar 02, 2008 6:52 pm
by zoneminder
I think you probably want

Code: Select all

--with-ffmpeg=/usr/local/
rather than

Code: Select all

--with-ffmpeg=/usr/local/lib
however you may will find you don't need it use --with-ffmpeg at all. You should see configure look for avformat.h or other ffmpeg headers etc so check whether it has found them or not if you are not sure.

Re: compile with ffmpeg option error: ffmpeg/avformat.h: No

Posted: Mon Mar 03, 2008 7:07 pm
by cms
Ternitzer wrote:Hi there.

zm_mpeg.h:29:29: error: ffmpeg/avformat.h: No such file or directory
zm_mpeg.h:63: error: use of enum ‘PixelFormat’ without previous

l
Go see if there is a ffmpeg directory... I found that the newest version had an issue when it went to look for two header files from ffmpeg. See if the files are in another directory under /usr/local/include other then ffmepg. Mine were split up for each lib/app.

Then just change edit the zm file that is looking for it.

I can not get into my machine remotely right now or I would tell you exactly what I did.

The solution

Posted: Fri Aug 29, 2008 6:06 pm
by ttsoares