Unable to compile ZM 1.25 on Ubuntu, problem with ffmpeg

Forum for questions and support relating to the 1.25.x releases only.
Locked
marc.assin
Posts: 2
Joined: Sat Jun 15, 2013 10:05 am

Unable to compile ZM 1.25 on Ubuntu, problem with ffmpeg

Post by marc.assin »

Hi,

I'm a Linux beginner. I've a small project to recognize and identify car number plates.
I'm trying to compile ZoneMinder 1.25 on Ubuntu 12.04.
The configure seems to work with this command line (no error)
./configure --prefix=/opt/zm --with-libarch=lib64 --with-mysql=/usr --with-ffmpeg=/usr --with-webuser=www-data --with-webgroup=www-data --disable-debug --disable-crashtrace --enable-mmap=yes --with-webdir=/var/www --with-cgidir=/usr/lib/cgi-bin ZM_SSL_LIB=openssl CPPFLAGS="-D__STDC_CONSTANT_MACROS -msse2"
The make brings up this error message
zm_mpeg.cpp: In member function ‘double VideoStream::EncodeFrame(uint8_t*, int, bool, unsigned int)’:
zm_mpeg.cpp:386:77: error: ‘av_rescale_q’ was not declared in this scope
make[2]: *** [zm_mpeg.o] Error 1
I've followed this procedure to compile ffmpeg, before starting the configure
/ffmpeg/wiki/UbuntuCompilationGuide
It seems to work, no error message

Obviously there is something wrong in the process, but as a newbie, I can't see it.

Any hint please ?
gjdunga
Posts: 6
Joined: Wed Jul 03, 2013 10:21 am

Re: Unable to compile ZM 1.25 on Ubuntu, problem with ffmpeg

Post by gjdunga »

I've hit my head against this issue.

It is more of a political battle.. Debian and Ubuntu have moved to the libav fork of ffmpeg.

Rather than calling their version of FFMPEG 'DebMPEG', or allowing shared libraries, they chose to use the same name, and use the libav libs, but in doing so it totally fubars the standard libraries and functions.

This does a number on zoneminder, as well as trying to compile a nice clean version of FFMPEG "standard".
Very few if any of the functions are named or work the same in the libav fork. (Nice of them huh!)

Zoneminder will have to either adjust for this issue, or you may consider building an standard version of ffmpeg and the libraries for it in a different prefix , or you can attempt to patch zoneminder yourself.

Let me repeat. The Libav and FFmpeg one gets with Wheezy is not cannon ffmpeg, but infact a libav fork.
The libav fork version hijacks the ffmpeg command and prints the following at the bottom of it's version info

Code: Select all

*** THIS PROGRAM IS DEPRECATED *** 
This program is only provided for compatibility and will be removed in a future release. Please use avconv instead. 
I chose to switch to CentOS for my Camera rig, as they are not playing politics with packages right now..

Gabriel
bb99
Posts: 943
Joined: Wed Apr 02, 2008 12:04 am

Re: Unable to compile ZM 1.25 on Ubuntu, problem with ffmpeg

Post by bb99 »

Thank you. I was beginning to wonder; not too many successful Debian or Ubuntu without compiling an older version of ffmpeg and building against it.
Locked