Page 1 of 3

1.21.0 > 1.21.4 my problems

Posted: Tue Nov 15, 2005 12:59 am
by caseystone
Hello...

Things are going reasonably well with my attempt to update from 1.21.0 to 1.21.4 on my FC3 x86_64 machine. However at the end of the 'make' I get this error:

Code: Select all

zm_mpeg.cpp: In member function `double VideoStream::EncodeFrame(uint8_t*, int, bool, unsigned int)':
zm_mpeg.cpp:331: error: 'struct AVCodecContext' has no member named 'time_base'
zm_mpeg.cpp:331: error: `av_rescale_q' undeclared (first use this function)
zm_mpeg.cpp:331: error: (Each undeclared identifier is reported only once for each function it appears in.)
make[2]: *** [zm_mpeg.o] Error 1
make[2]: Leaving directory `/home/tcstone/zm-1.21.4/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/tcstone/zm-1.21.4'
make: *** [all] Error 2
Is that fatal? I have applied the "64-bit" patch from karlg and my configure line was:

Code: Select all

./configure --with-libarch=lib64 --with-mysql=/usr --with-webdir=/var/www/html/zm --with-cgidir=/var/www/cgi-bin --with-ffmpeg=/usr --with-lame=usr/lib64
Thanks.

-Casey

Posted: Tue Nov 15, 2005 1:52 am
by caseystone
Is it fatal? The answer is yes!

Here is my attempted make install:

Code: Select all

[root@zoneminder zm-1.21.4]# make install
Making install in src
make[1]: Entering directory `/home/tcstone/zm-1.21.4/src'
if g++ -DHAVE_CONFIG_H -I. -I. -I..  -I/usr/include -I/usr/include   -g -O2 -MT zm_mpeg.o -MD -MP -MF ".deps/zm_mpeg.Tpo" -c -o zm_mpeg.o zm_mpeg.cpp; \
then mv -f ".deps/zm_mpeg.Tpo" ".deps/zm_mpeg.Po"; else rm -f ".deps/zm_mpeg.Tpo"; exit 1; fi
zm_mpeg.cpp: In member function `double VideoStream::EncodeFrame(uint8_t*, int, bool, unsigned int)':
zm_mpeg.cpp:331: error: 'struct AVCodecContext' has no member named 'time_base'
zm_mpeg.cpp:331: error: `av_rescale_q' undeclared (first use this function)
zm_mpeg.cpp:331: error: (Each undeclared identifier is reported only once for each function it appears in.)
make[1]: *** [zm_mpeg.o] Error 1
make[1]: Leaving directory `/home/tcstone/zm-1.21.4/src'
make: *** [install-recursive] Error 1
Unfortunately (even before attempting the make install) my installation is no longer working, that's why I figured I'd try the make install anyway. Is there an easy fix? I'm going away in a few days and would like to have some version of ZM running. Please help! :?

-Casey

Posted: Tue Nov 15, 2005 9:41 am
by zoneminder
This is basically an ffmpeg error. ZM should be able to cope with most versions of ffmpeg but it's not guaranteed. What version of ffmpeg do you have installed and where?

Phil

Posted: Tue Nov 15, 2005 10:07 am
by SyRenity
Hi. Most probably it's the RPM version of FFMPEG which comes from Fedora repositories. ZM indeed does not compile with it. The CVS version of FFMPEG should work fine, thought.

Posted: Tue Nov 15, 2005 6:14 pm
by caseystone
Here is the info regarding my ffmpeg:

Code: Select all

ffmpeg version 0.4.9-pre1, build 4730, Copyright (c) 2000-2004 Fabrice Bellard
  configuration:  --host=x86_64-redhat-linux-gnu --build=x86_64-redhat-linux-gnu --target=x86_64-redhat-linux --program-prefix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man --infodir=/usr/share/info --disable-mmx --extra-cflags=-O2 -fPIC --enable-mp3lame --enable-vorbis --enable-faad --enable-faac --enable-xvid --enable-pp --enable-shared-pp --enable-shared --enable-gpl --disable-strip 
  built on Jan 15 2005 14:46:57, gcc: 3.4.2 20041017 (Red Hat 3.4.2-6.fc3)
I think I got it via Yum. It's not too surprising that this is the problem because my mpeg video encoding has never worked. Perhaps 1.21.0 was more forgiving with the errors.

I'll try to install the cvs version as you recommend. Does that mean I need to complie it myself? Are the build parameters that I quoted above from my current system good to use with the CVS version? Do I have to setup the whole CVS thing on my system or can I just grab the version I need?

For example, when I do:

Code: Select all

[tcstone@zoneminder bin]$ cvs status -v ffmpeg
cvs status: No CVSROOT specified!  Please use the `-d' option
cvs [status aborted]: or set the CVSROOT environment variable.
it looks like I have to do some setup.

Thanks for your help.

-Casey

Posted: Tue Nov 15, 2005 7:33 pm
by caseystone
OK... I seem to have the CVS version of ffmpeg now. I'm looking at a folder like this:

Code: Select all

berrno.h     cmdutils.c  CREDITS    Doxyfile       ffserver.c  libavformat       pktdumper.c     unwrap-diff
build_avopt  cmdutils.h  CVS        ffinstall.nsi  ffserver.h  libavutil         qt-faststart.c  vhook
Changelog    configure   cws2fws.c  ffmpeg.c       INSTALL     Makefile          README          xvmc_render.h
clean-diff   COPYING     doc        ffplay.c       libavcodec  output_example.c  tests
Now that I'm at this point, I guess I would just ask for any suggestions on building this for our purposes. This 'compiling your own' is very nearly over my head. Thanks.

-Casey

Posted: Tue Nov 15, 2005 8:20 pm
by caseystone
Hello.... So I did a build with these options:

Code: Select all

./configure --disable-mmx --extra-cflags=-O2 --enable-mp3lame --enable-vorbis --enable-xvid --enable-pp --enable-shared-pp --enable-shared --enable-gpl --disable-strip
a small problem there was that I should have enabled libogg to go with the vorbis.... so the enable vorbis was cancelled. That's fine.

It went through the build with many warnings, but completed OK I think.

I did the make install, which was very fast but seemed to do some stuff. However, we have a problem:

Code: Select all

[root@zoneminder /]# which ffmpeg
/usr/local/bin/ffmpeg
[root@zoneminder /]# ffmpeg help
ffmpeg: error while loading shared libraries: libavutil.so: cannot open shared object file: No such file or directory
[root@zoneminder /]# ffmpeg
ffmpeg: error while loading shared libraries: libavutil.so: cannot open shared object file: No such file or directory
Any clues for me?

Also, as you can see, ffmpeg is now in /usr/local/bin whereas before it was in /usr/bin. Can I just delete the ffmpeg binary which is in /usr/bin (the older one that wasn't working?).

Or use --with-ffmpeg=/usr/local

Or reinstall ffmpeg that I built to tell it to go into /usr/bin (but how???)

-Casey

Posted: Tue Nov 15, 2005 9:02 pm
by caseystone
Hmmm. I tried again with a slighly different configuration but got the same result. The shared library is there, however:

Code: Select all

[root@zoneminder /]# find / -name libavutil*
/tmp/ffmpegbuild/libavutil.pc
/tmp/ffmpegbuild/libavutil-uninstalled.pc
/tmp/ffmpegbuild/libavutil
/tmp/ffmpegbuild/libavutil/libavutil.so
/tmp/ffmpegbuild/libavutil/libavutil.a
/cvs/CVSROOT/ffmpeg/libavutil.pc
/cvs/CVSROOT/ffmpeg/libavutil-uninstalled.pc
/cvs/CVSROOT/ffmpeg/libavutil
/usr/local/lib/libavutil-CVS.so
/usr/local/lib/pkgconfig/libavutil.pc
/usr/local/lib/libavutil.so
Isn't that last one in the right place and all? Should I symlink it somewhere else?

-Casey

Posted: Tue Nov 15, 2005 11:04 pm
by caseystone
When I do make install now I get an error:

Code: Select all

[root@zoneminder ffmpeg]# make install
make -C libavutil all
make[1]: Entering directory `/cvs/CVSROOT/ffmpeg/libavutil'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/cvs/CVSROOT/ffmpeg/libavutil'
make -C libavcodec all
make[1]: Entering directory `/cvs/CVSROOT/ffmpeg/libavcodec'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/cvs/CVSROOT/ffmpeg/libavcodec'
make -C libavformat all
make[1]: Entering directory `/cvs/CVSROOT/ffmpeg/libavformat'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/cvs/CVSROOT/ffmpeg/libavformat'
cp -p ffmpeg_g ffmpeg
echo ignoring strip ffmpeg
ignoring strip ffmpeg
make -C vhook all
make[1]: Entering directory `/cvs/CVSROOT/ffmpeg/vhook'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/cvs/CVSROOT/ffmpeg/vhook'
make -C doc all
make[1]: Entering directory `/cvs/CVSROOT/ffmpeg/doc'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/cvs/CVSROOT/ffmpeg/doc'
if [ -f doc/ffmpeg.1 ] ; then \
    install -d "/usr/local/man/man1" ; \
    install -m 644 doc/ffmpeg.1 doc/ffserver.1 doc/ffplay.1 "/usr/local/man/man1" ; \
fi
make -C vhook install
make[1]: Entering directory `/cvs/CVSROOT/ffmpeg/vhook'
install -d "/usr/lib/vhook"
install -m 755 null.so fish.so ppm.so watermark.so imlib2.so drawtext.so "/usr/lib/vhook"
make[1]: Leaving directory `/cvs/CVSROOT/ffmpeg/vhook'
make -C libavutil install
make[1]: Entering directory `/cvs/CVSROOT/ffmpeg/libavutil'
make[1]: Nothing to be done for `install'.
make[1]: Leaving directory `/cvs/CVSROOT/ffmpeg/libavutil'
make -C libavcodec install
make[1]: Entering directory `/cvs/CVSROOT/ffmpeg/libavcodec'
make[1]: Nothing to be done for `install'.
make[1]: Leaving directory `/cvs/CVSROOT/ffmpeg/libavcodec'
make -C libavformat install
make[1]: Entering directory `/cvs/CVSROOT/ffmpeg/libavformat'
make[1]: Nothing to be done for `install'.
make[1]: Leaving directory `/cvs/CVSROOT/ffmpeg/libavformat'
install -d "/usr/local/bin"
install -c  -m 755 ffmpeg ffserver ffplay "/usr/local/bin"
install: `ffmpeg' is a directory
make: *** [install] Error 1
I'm getting frustrated.

-Casey

Posted: Tue Nov 15, 2005 11:07 pm
by jameswilson
i cant help you but you seemed lonely here. I have only installed ffmpeg with rpms and not had as many problems

Posted: Tue Nov 15, 2005 11:15 pm
by caseystone
Thanks Jim. I was getting lonely here. Yeah.. I'd love to install from RPM. Where did you get yours... is it a recent build from the CVS version (that seems to be the key).

-Casey

Posted: Tue Nov 15, 2005 11:20 pm
by caseystone
Hey.. I just had a breakthrough. Not exactly sure what I did (or didn't do):

Code: Select all

[root@zoneminder ffmpeg]# ffmpeg
ffmpeg version CVS, build 3277056, Copyright (c) 2000-2004 Fabrice Bellard
  configuration:  --enable-mp3lame --enable-pp --enable-shared-pp --enable-gpl --disable-mmx --disable-ffserver --disable-ffplay 
  built on Nov 15 2005 15:09:53, gcc: 3.4.3 20050227 (Red Hat 3.4.3-22.fc3)
probably because I disabled a few things and stopped trying to force some paths:

Code: Select all

./configure  --enable-mp3lame --enable-pp --enable-shared-pp --enable-gpl --disable-mmx --disable-ffserver --disable-ffplay
I also noticed that I had another ffmpeg folder nested in the ffmepg source folder. Not sure how that happened, but removing it may have fixed that error about ffmpeg being a folder a few posts up.

Well... on to buiding ZM I guess, though the path to ffmpeg is still a question in my mind since I think I still have one at /usr/bin and one at /usr/local/bin.

-Casey

Posted: Tue Nov 15, 2005 11:27 pm
by jameswilson
googled for ffmpeg rpm and used one built for mandrake

i guess i was just lucky

Posted: Tue Nov 15, 2005 11:55 pm
by zoneminder
I just did a

Code: Select all

cvs -z9 -d:pserver:anonymous@mplayerhq.hu:/cvsroot/ffmpeg co ffmpeg
and then did a configure with the --prefix option only and make etc and it worked ok. Remember to do make installlib as well as just install.

Phil

Posted: Wed Nov 16, 2005 12:55 am
by caseystone
Hey.. Glad you're around Phil! We are in some different timezones! I hope you're around for a while as I'm making progress, but still not there.

I did finally get ffmpeg to compile and got zoneminder to compile also, well, maybe. The new version is all installed but ZMC, ZMA, ZMF, ZMS do not seem to run anymore.

I can interact with the web interface, but I cannot view streaming or still images from the cams, cannot view saved streaming images (the stills do show up in saved events), and of course no new events are being captured.

One plus, is that I successfully was able to create video (first time ever) from saved events. So it seems FFMPEG is working.

Now, I never did that "make installlib" command you suggest. Based on the above info, do I need to? Could it be responsible for the main ZM daemons not running? I'm guessing no.

Again, this was an update from 1.21.0 which generally was working fine for me. No hardware changes have been made. Seems I botched something in the install.

Interestingly, zmpkg.pl status says 'running' and the web interface will say running also.

Thank you so much for your continued hand-holding here.

-Casey