Page 2 of 2

Posted: Tue Feb 17, 2009 11:36 am
by zoneminder
I configure using

Code: Select all

./configure --enable-gpl --enable-swscale --enable-shared --enable-pthreads
though I think only the first two are that important.

I have just updated and reconfigured and compiled so that is version 17390 accorind to svn info and 17125 accoprding to version.h, though I don't know how accurate that is.

Posted: Tue Feb 17, 2009 2:26 pm
by Normando
Post edited, because the problem is my ffmpeg.

Thank you

Posted: Thu Feb 26, 2009 3:09 pm
by liviab
Which ffmpeg version I have to use? Because I'm using the version that cordel said to be too old and I'm getting this error:

Code: Select all

Making all in src
make[2]: Entering directory `/root/ZoneMinder-1.24.1/src'
g++ -DHAVE_CONFIG_H -I. -I..  -I/usr/include -I/usr/include/ffmpeg/include -Wall -Wno-sign-compare -fno-inline -I/usr/include/ffmpeg/include  -frepo -g -O2 -MT zmc.o -MD -MP -MF .deps/zmc.Tpo -c -o zmc.o zmc.cpp
In file included from zm_ffmpeg.h:36,
                 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:
/usr/include/ffmpeg/include/libavcodec/avcodec.h:2388: warning: ‘ImgReSampleContext’ is deprecated (declared at /usr/include/ffmpeg/include/libavcodec/avcodec.h:2382)
/usr/include/ffmpeg/include/libavcodec/avcodec.h:2398: warning: ‘ImgReSampleContext’ is deprecated (declared at /usr/include/ffmpeg/include/libavcodec/avcodec.h:2382)
mv -f .deps/zmc.Tpo .deps/zmc.Po
g++ -DHAVE_CONFIG_H -I. -I..  -I/usr/include -I/usr/include/ffmpeg/include -Wall -Wno-sign-compare -fno-inline -I/usr/include/ffmpeg/include  -frepo -g -O2 -MT zm_box.o -MD -MP -MF .deps/zm_box.Tpo -c -o zm_box.o zm_box.cpp
mv -f .deps/zm_box.Tpo .deps/zm_box.Po
g++ -DHAVE_CONFIG_H -I. -I..  -I/usr/include -I/usr/include/ffmpeg/include -Wall -Wno-sign-compare -fno-inline -I/usr/include/ffmpeg/include  -frepo -g -O2 -MT zm_buffer.o -MD -MP -MF .deps/zm_buffer.Tpo -c -o zm_buffer.o zm_buffer.cpp
mv -f .deps/zm_buffer.Tpo .deps/zm_buffer.Po
g++ -DHAVE_CONFIG_H -I. -I..  -I/usr/include -I/usr/include/ffmpeg/include -Wall -Wno-sign-compare -fno-inline -I/usr/include/ffmpeg/include  -frepo -g -O2 -MT zm_camera.o -MD -MP -MF .deps/zm_camera.Tpo -c -o zm_camera.o zm_camera.cpp
mv -f .deps/zm_camera.Tpo .deps/zm_camera.Po
g++ -DHAVE_CONFIG_H -I. -I..  -I/usr/include -I/usr/include/ffmpeg/include -Wall -Wno-sign-compare -fno-inline -I/usr/include/ffmpeg/include  -frepo -g -O2 -MT zm_comms.o -MD -MP -MF .deps/zm_comms.Tpo -c -o zm_comms.o zm_comms.cpp
mv -f .deps/zm_comms.Tpo .deps/zm_comms.Po
g++ -DHAVE_CONFIG_H -I. -I..  -I/usr/include -I/usr/include/ffmpeg/include -Wall -Wno-sign-compare -fno-inline -I/usr/include/ffmpeg/include  -frepo -g -O2 -MT zm_config.o -MD -MP -MF .deps/zm_config.Tpo -c -o zm_config.o zm_config.cpp
mv -f .deps/zm_config.Tpo .deps/zm_config.Po
g++ -DHAVE_CONFIG_H -I. -I..  -I/usr/include -I/usr/include/ffmpeg/include -Wall -Wno-sign-compare -fno-inline -I/usr/include/ffmpeg/include  -frepo -g -O2 -MT zm_coord.o -MD -MP -MF .deps/zm_coord.Tpo -c -o zm_coord.o zm_coord.cpp
mv -f .deps/zm_coord.Tpo .deps/zm_coord.Po
g++ -DHAVE_CONFIG_H -I. -I..  -I/usr/include -I/usr/include/ffmpeg/include -Wall -Wno-sign-compare -fno-inline -I/usr/include/ffmpeg/include  -frepo -g -O2 -MT zm.o -MD -MP -MF .deps/zm.Tpo -c -o zm.o zm.cpp
mv -f .deps/zm.Tpo .deps/zm.Po
g++ -DHAVE_CONFIG_H -I. -I..  -I/usr/include -I/usr/include/ffmpeg/include -Wall -Wno-sign-compare -fno-inline -I/usr/include/ffmpeg/include  -frepo -g -O2 -MT zm_db.o -MD -MP -MF .deps/zm_db.Tpo -c -o zm_db.o zm_db.cpp
mv -f .deps/zm_db.Tpo .deps/zm_db.Po
g++ -DHAVE_CONFIG_H -I. -I..  -I/usr/include -I/usr/include/ffmpeg/include -Wall -Wno-sign-compare -fno-inline -I/usr/include/ffmpeg/include  -frepo -g -O2 -MT zm_event.o -MD -MP -MF .deps/zm_event.Tpo -c -o zm_event.o zm_event.cpp
In file included from zm_ffmpeg.h:36,
                 from zm_mpeg.h:23,
                 from zm_event.cpp:34:
/usr/include/ffmpeg/include/libavcodec/avcodec.h:2388: warning: ‘ImgReSampleContext’ is deprecated (declared at /usr/include/ffmpeg/include/libavcodec/avcodec.h:2382)
/usr/include/ffmpeg/include/libavcodec/avcodec.h:2398: warning: ‘ImgReSampleContext’ is deprecated (declared at /usr/include/ffmpeg/include/libavcodec/avcodec.h:2382)
mv -f .deps/zm_event.Tpo .deps/zm_event.Po
g++ -DHAVE_CONFIG_H -I. -I..  -I/usr/include -I/usr/include/ffmpeg/include -Wall -Wno-sign-compare -fno-inline -I/usr/include/ffmpeg/include  -frepo -g -O2 -MT zm_exception.o -MD -MP -MF .deps/zm_exception.Tpo -c -o zm_exception.o zm_exception.cpp
mv -f .deps/zm_exception.Tpo .deps/zm_exception.Po
g++ -DHAVE_CONFIG_H -I. -I..  -I/usr/include -I/usr/include/ffmpeg/include -Wall -Wno-sign-compare -fno-inline -I/usr/include/ffmpeg/include  -frepo -g -O2 -MT zm_file_camera.o -MD -MP -MF .deps/zm_file_camera.Tpo -c -o zm_file_camera.o zm_file_camera.cpp
mv -f .deps/zm_file_camera.Tpo .deps/zm_file_camera.Po
g++ -DHAVE_CONFIG_H -I. -I..  -I/usr/include -I/usr/include/ffmpeg/include -Wall -Wno-sign-compare -fno-inline -I/usr/include/ffmpeg/include  -frepo -g -O2 -MT zm_ffmpeg_camera.o -MD -MP -MF .deps/zm_ffmpeg_camera.Tpo -c -o zm_ffmpeg_camera.o zm_ffmpeg_camera.cpp
In file included from zm_ffmpeg.h:36,
                 from zm_ffmpeg_camera.h:27,
                 from zm_ffmpeg_camera.cpp:24:
/usr/include/ffmpeg/include/libavcodec/avcodec.h:2388: warning: ‘ImgReSampleContext’ is deprecated (declared at /usr/include/ffmpeg/include/libavcodec/avcodec.h:2382)
/usr/include/ffmpeg/include/libavcodec/avcodec.h:2398: warning: ‘ImgReSampleContext’ is deprecated (declared at /usr/include/ffmpeg/include/libavcodec/avcodec.h:2382)
mv -f .deps/zm_ffmpeg_camera.Tpo .deps/zm_ffmpeg_camera.Po
g++ -DHAVE_CONFIG_H -I. -I..  -I/usr/include -I/usr/include/ffmpeg/include -Wall -Wno-sign-compare -fno-inline -I/usr/include/ffmpeg/include  -frepo -g -O2 -MT zm_image.o -MD -MP -MF .deps/zm_image.Tpo -c -o zm_image.o zm_image.cpp
zm_image.cpp: In member function ‘void Image::Blend(const Image&, int) const’:
zm_image.cpp:776: warning: operation on ‘pdest’ may be undefined
mv -f .deps/zm_image.Tpo .deps/zm_image.Po
g++ -DHAVE_CONFIG_H -I. -I..  -I/usr/include -I/usr/include/ffmpeg/include -Wall -Wno-sign-compare -fno-inline -I/usr/include/ffmpeg/include  -frepo -g -O2 -MT zm_local_camera.o -MD -MP -MF .deps/zm_local_camera.Tpo -c -o zm_local_camera.o zm_local_camera.cpp
In file included from zm_ffmpeg.h:36,
                 from zm_local_camera.h:32,
                 from zm_local_camera.cpp:20:
/usr/include/ffmpeg/include/libavcodec/avcodec.h:2388: warning: ‘ImgReSampleContext’ is deprecated (declared at /usr/include/ffmpeg/include/libavcodec/avcodec.h:2382)
/usr/include/ffmpeg/include/libavcodec/avcodec.h:2398: warning: ‘ImgReSampleContext’ is deprecated (declared at /usr/include/ffmpeg/include/libavcodec/avcodec.h:2382)
zm_local_camera.cpp: In function ‘PixelFormat getFfPixFormatFromV4lPalette(int, int)’:
zm_local_camera.cpp:161: error: ‘PIX_FMT_VDPAU_H264’ was not declared in this scope
zm_local_camera.cpp:162: error: ‘PIX_FMT_VDPAU_MPEG1’ was not declared in this scope
zm_local_camera.cpp:163: error: ‘PIX_FMT_VDPAU_MPEG2’ was not declared in this scope
zm_local_camera.cpp:228: error: ‘PIX_FMT_VDPAU_H264’ was not declared in this scope
zm_local_camera.cpp:229: error: ‘PIX_FMT_VDPAU_MPEG1’ was not declared in this scope
zm_local_camera.cpp:230: error: ‘PIX_FMT_VDPAU_MPEG2’ was not declared in this scope
make[2]: *** [zm_local_camera.o] Error 1

Posted: Sun Mar 01, 2009 8:54 pm
by zoneminder
Just try using the latest svn ffmpeg and you should be ok. Unless they have changed the interface again.

Posted: Mon Mar 02, 2009 3:41 pm
by liviab
Thanks for your answer, Phil.
I updated the svn ffmpeg and it works.
However, I got another error at the line 183 on the file zm_rtsp.cpp. I commented this line and the ZM compiled without errors, but I want to know if this can be "dangerous".

Posted: Tue Mar 03, 2009 9:13 pm
by zoneminder
What was your error? If you have commented out an alloc call then this is bad, unless you are not using MPEG cams in which case it will make no difference to you.

Fedora 9 and 10 compile ffmpeg problems

Posted: Sat Mar 07, 2009 8:14 am
by johnc10
This problem with ffmpeg has been since Fedora 9.
http://www.zoneminder.com/forums/viewto ... highlight=

zm_ffmpeg.h:29:30: error: libavutil/avutil.h: No such file or directory
zm_ffmpeg.h:36:32: error: libavcodec/avcodec.h: No such file or directory
zm_ffmpeg.h:43:34: error: libavformat/avformat.h: No such file or directory
zm_ffmpeg.h:51:32: error: libswscale/swscale.h: No such file or directory

Add ffmpeg to path :-
$ diff zm_ffmpeg.h zm_ffmpeg.h.orig
29c29
< #include <ffmpeg/libavutil/avutil.h>
---
> #include <libavutil/avutil.h>
36c36
< #include <ffmpeg/libavcodec/avcodec.h>
---
> #include <libavcodec/avcodec.h>
43c43
< #include <ffmpeg/libavformat/avformat.h>
---
> #include <libavformat/avformat.h>
51c51
< #include <ffmpeg/libswscale/swscale.h>
---
> #include <libswscale/swscale.h>

vi src/zm_ffmpeg.h

Add full path for these files e.g #include "/usr/include/ffmpeg/libavcodec/avcodec.h"

sudo vi /usr/include/ffmpeg/libavcodec/avcodec.h
sudo vi /usr/include/ffmpeg/libavformat/avformat.h
sudo vi /usr/include/ffmpeg/libswscale/swscale.h
make

My modified fix for F9 in 10 sorts the ffmpeg but I now get

make[2]: Entering directory `/data/ZoneMinder-1.24.1/src'
g++ -DHAVE_CONFIG_H -I. -I.. -I/usr/include -I/usr/local/bin/include -Wall -Wno-sign-compare -fno-inline -I/usr/local/bin/include -frepo -g -O2 -MT zm_local_camera.o -MD -MP -MF .deps/zm_local_camera.Tpo -c -o zm_local_camera.o zm_local_camera.cpp
zm_local_camera.cpp: In function ‘PixelFormat getFfPixFormatFromV4lPalette(int, int)’:
zm_local_camera.cpp:161: error: ‘PIX_FMT_VDPAU_H264’ was not declared in this scope
zm_local_camera.cpp:162: error: ‘PIX_FMT_VDPAU_MPEG1’ was not declared in this scope
zm_local_camera.cpp:163: error: ‘PIX_FMT_VDPAU_MPEG2’ was not declared in this scope
zm_local_camera.cpp:228: error: ‘PIX_FMT_VDPAU_H264’ was not declared in this scope
zm_local_camera.cpp:229: error: ‘PIX_FMT_VDPAU_MPEG1’ was not declared in this scope
zm_local_camera.cpp:230: error: ‘PIX_FMT_VDPAU_MPEG2’ was not declared in this scope
make[2]: *** [zm_local_camera.o] Error 1

I am using the standard RPMs for Fedora so I suspect all users will see this problem. I've tried compiling ffmpeg from latest svn but I'm still seeing errors.

I'm sticking with 1.23.3 and hopefully this will be fixed or a workaround found for the standard RPM (via yum).

Posted: Mon Mar 09, 2009 4:27 pm
by liviab
Which is your ffmpeg version (SVN)?

Posted: Mon Mar 09, 2009 5:27 pm
by johnc10
ffmpeg-0.4.9-0.54.20080908.fc10.i386

I've removed the if else from zm_ffmpeg.h and replaced with :-

#include </usr/include/ffmpeg/libavutil/avutil.h>
#include </usr/include/ffmpeg/libavcodec/avcodec.h>
#include </usr/include/ffmpeg/libavformat/avformat.h>
#include </usr/include/ffmpeg/libswscale/swscale.h>

On make I see :-

In file included from zm_ffmpeg.h:30,
from zm_local_camera.h:33,
from zm_local_camera.cpp:21:
/usr/include/ffmpeg/libavcodec/avcodec.h:2388: warning: ‘ImgReSampleContext’ is deprecated (declared at /usr/include/ffmpeg/libavcodec/avcodec.h:2382)
/usr/include/ffmpeg/libavcodec/avcodec.h:2398: warning: ‘ImgReSampleContext’ is deprecated (declared at /usr/include/ffmpeg/libavcodec/avcodec.h:2382)
zm_local_camera.cpp: In function ‘PixelFormat getFfPixFormatFromV4lPalette(int, int)’:
zm_local_camera.cpp:161: error: ‘PIX_FMT_VDPAU_H264’ was not declared in this scope
zm_local_camera.cpp:162: error: ‘PIX_FMT_VDPAU_MPEG1’ was not declared in this scope
zm_local_camera.cpp:163: error: ‘PIX_FMT_VDPAU_MPEG2’ was not declared in this scope
zm_local_camera.cpp:228: error: ‘PIX_FMT_VDPAU_H264’ was not declared in this scope
zm_local_camera.cpp:229: error: ‘PIX_FMT_VDPAU_MPEG1’ was not declared in this scope
zm_local_camera.cpp:230: error: ‘PIX_FMT_VDPAU_MPEG2’ was not declared in this scope
make[2]: *** [zm_local_camera.o] Error 1

I'll try removing the RPM and compiling the latest SVN download.

Posted: Mon Mar 09, 2009 5:42 pm
by cordel
Yes you Need to have ffmpeg from SVN latter than 2/1/2009 or there about or it will not function or build.

Posted: Wed Jul 01, 2009 2:14 pm
by liviab
This topic helped me: http://www.zoneminder.com/forums/viewto ... highlight=
I don't know if it's the best way, but it works!
:wink:

Posted: Wed Jul 01, 2009 11:10 pm
by nombrandue
I didn't close this out, but I did find a work around for this. Use CentOS 5. My Camara's worked perfectly after that (until I got a better card that the system was too slow for, then I upgraded hardware... and the AJAX bug in 1.24.1, I fixed that by going to 1.24.2) and everything is working perfectly.


I have had a few oddities with Fedora lately in regards to compiling from source, so most of my systems are going to a more 'stable' system setup than one that is as dynamic as Fedora.