So; fc14 doesn't have ffmpeg compiled with zoneminder. I did the normal steps to get the src rpms for ffmpeg and installed all of them:
Code: Select all
rpm -qa | grep ffmpeg
ffmpeg-0.6-4.20100704svn.fc14.i386
ffmpeg-devel-0.6-4.20100704svn.fc14.i386
ffmpeg-libs-0.6-4.20100704svn.fc14.i386
1) Remove the ffmpeg delete patch
2) Add my own patch to fix ffmpeg compilation errors in the zoneminder source tree (0.6-4)
3) Add the config for non-x86_64 compile
For #3:
Code: Select all
--- zoneminder.spec 2011-01-23 11:06:01.493372988 -0500
+++ zoneminder.spec_ffmpeg 2010-06-02 06:20:28.000000000 -0400
@@ -23,10 +23,10 @@ Source5: http://downloads.sourceforge
Source6: http://mootools.net/download/get/mootools-1.2.3-core-yc.js
Patch1: zoneminder-1.24.2-dbinstall.patch
Patch2: zoneminder-1.24.1-runlevel.patch
+Patch3: zoneminder-1.24.2-noffmpeg.patch
Patch4: zoneminder-1.24.1-perldep.patch
Patch10: zoneminder-1.22.3-installfix.patch
Patch11: zoneminder-1.24.2-gcc44.patch
-Patch20: zoneminder-1.24.2-ffmpeg064.patch
Conflicts: zm <= 1.22.3
@@ -72,10 +72,10 @@ popd
%patch1 -p0 -b .dbinstall
%patch2 -p0 -b .runlevel
+%patch3 -p0 -b .noffmpeg
%patch4 -p0 -b .perldep
%patch10 -p0 -b .installfix
%patch11 -p0 -b .gcc44
-%patch20 -p0 -b .ffmpeg064
gunzip -c %{SOURCE1} | tar xf - cambozola-*/dist/cambozola.jar
cp %{SOURCE4} README.Fedora
@@ -102,7 +102,6 @@ OPTS=""
--with-webuser=%{zmuid} \
--with-webgroup=%{zmgid} \
--disable-debug \
- CPPFLAGS='-D__STDC_CONSTANT_MACROS' \
$OPTS
make %{?_smp_mflags}
%{__perl} -pi -e 's/(ZM_WEB_USER=).*$/${1}%{zmuid_final}/;' \
Code: Select all
--- configure.ac.ffmpeg064 2011-01-23 11:06:06.374806597 -0500
+++ configure.ac 2011-01-23 11:06:06.469815037 -0500
@@ -259,13 +259,13 @@ AC_CHECK_HEADERS(linux/videodev.h,,AC_MS
AC_CHECK_HEADERS(linux/videodev2.h,AC_SUBST(ZM_V4L2,"1"),AC_MSG_WARN(zm requires Video4Linux2 to be installed for V4L2 support),)
AC_CHECK_HEADERS(mysql/mysql.h,,AC_MSG_ERROR(zm requires MySQL headers - check that MySQL development packages are installed),)
AC_CHECK_HEADERS(libavutil/avutil.h,,,)
-AC_CHECK_HEADERS(ffmpeg/avutil.h,,,)
+AC_CHECK_HEADERS(ffmpeg/libavutil/avutil.h,,,)
AC_CHECK_HEADERS(libavcodec/avcodec.h,,,)
-AC_CHECK_HEADERS(ffmpeg/avcodec.h,,,)
+AC_CHECK_HEADERS(ffmpeg/libavcodec/avcodec.h,,,)
AC_CHECK_HEADERS(libavformat/avformat.h,,,)
-AC_CHECK_HEADERS(ffmpeg/avformat.h,,,)
+AC_CHECK_HEADERS(ffmpeg/libavformat/avformat.h,,,)
AC_CHECK_HEADERS(libswscale/swscale.h,,,)
-AC_CHECK_HEADERS(ffmpeg/swscale.h,,,)
+AC_CHECK_HEADERS(ffmpeg/libswscale/swscale.h,,,)
AC_CHECK_HEADERS(pcre/pcre.h,AC_SUBST(ZM_PCRE,"1"),,)
AC_CHECK_HEADERS(pcre.h,AC_SUBST(ZM_PCRE,"1"),,)
if test "$ENABLE_MMAP" = "yes"; then
--- src/zm_ffmpeg.h.ffmpeg064 2009-03-20 12:09:46.000000000 -0400
+++ src/zm_ffmpeg.h 2011-01-23 11:56:36.452029213 -0500
@@ -27,30 +27,30 @@ extern "C" {
#endif
#if HAVE_LIBAVUTIL_AVUTIL_H
#include <libavutil>
-#elif HAVE_FFMPEG_AVUTIL_H
-#include <ffmpeg>
+#elif HAVE_FFMPEG_LIBAVUTIL_AVUTIL_H
+#include <ffmpeg>
#else
#error "No location for avutils.h found"
#endif
#if HAVE_LIBAVCODEC_AVCODEC_H
#include <libavcodec>
-#elif HAVE_FFMPEG_AVCODEC_H
-#include <ffmpeg>
+#elif HAVE_FFMPEG_LIBAVCODEC_AVCODEC_H
+#include <ffmpeg>
#else
#error "No location for avcodec.h found"
#endif
#if HAVE_LIBAVFORMAT_AVFORMAT_H
#include <libavformat>
-#elif HAVE_FFMPEG_AVFORMAT_H
-#include <ffmpeg>
+#elif HAVE_FFMPEG_LIBAVFORMAT_AVFORMAT_H
+#include <ffmpeg>
#else
#error "No location for avformat.h found"
#endif
#if HAVE_LIBSWSCALE
#if HAVE_LIBSWSCALE_SWSCALE_H
#include <libswscale>
-#elif HAVE_FFMPEG_SWSCALE_H
-#include <ffmpeg>
+#elif HAVE_FFMPEG_LIBSWSCALE_SWSCALE_H
+#include <ffmpeg>
#else
#error "No location for swscale.h found"
#endif
Last step; to get things compiling nice (heade files found by the autoconf stuff), I made a series of symlinks in the /usr/include/ffmpeg directory:
Code: Select all
find . -type l
./libavformat/libavutil
./libavformat/libavcodec
./libswscale/libavutil
./libavutil/libavutil
./libavcodec/libavutil
./libavfilter/libavformat
./libavfilter/libpostproc
./libavfilter/libswscale
./libavfilter/libavutil
./libavfilter/libavdevice
./libavfilter/include
./libavfilter/libavcodec
http://www.zoneminder.com/wiki/index.ph ... ys#WVC54GC
--John