Using ffmpeg without ffmpeg-config

ffmpeg-config depends on distribution, some distributions have it some do not.
Original sources of the ffmpeg from http://ffmpeg.sourceforge.net do not have this script.
So it is not wise to use ffmpeg-config to determinate if ffmpeg is installed.

GolemJ

This is already fixed, beta2 will not have this problem.
--
Damian Pietras - MOC developer

Than you, I will wait for beta2

GolemJ

Sorry, I was wrong. MOC already uses pkg-config to detect ffmpeg, but only if ffmpeg-config script is not present, so it should work with all distributions.

--
Damian Pietras - MOC developer

In my case it not work.

$ pkg-config --libs ffmpeg
Package ffmpeg was not found in the pkg-config search path.
Perhaps you should add the directory containing `ffmpeg.pc'
to the PKG_CONFIG_PATH environment variable
No package 'ffmpeg' found

And I can not find any *.pc file which may be used by pkg-config in compilled sources.

So you shall add some option which disable ffmpeg test and set ffmpeg to 'yes' (e.g. --ffmpeg-libs argument in configure script).

What is your distribution and how you installed ffmpeg (from source?). FFmpeg is not just one library, the list of libraries needed to compile with it is different and depends on how ffmpeg was compiled. I can't hard code any -lffmpeg in MOC.

--
Damian Pietras - MOC developer

My distribution is Source Mage GNU/Linux.
Here are files wich discribe how will be sources processed:
http://distro.ibiblio.org/pub/linux/distributions/sourcemage/codex/test/video/ffmpeg/
Here are files which was installed:
/etc/ffserver.conf
/usr
/usr/bin/ffmpeg
/usr/bin/ffplay
/usr/bin/ffserver
/usr/include
/usr/include/ffmpeg
/usr/include/ffmpeg/avcodec.h
/usr/include/ffmpeg/avformat.h
/usr/include/ffmpeg/avio.h
/usr/include/ffmpeg/bswap.h
/usr/include/ffmpeg/common.h
/usr/include/ffmpeg/dsputil.h
/usr/include/ffmpeg/os_support.h
/usr/include/ffmpeg/rational.h
/usr/include/ffmpeg/rtp.h
/usr/include/ffmpeg/rtsp.h
/usr/include/ffmpeg/rtspcodes.h
/usr/include/postproc
/usr/include/postproc/postprocess.h
/usr/include/postproc/postprocess_internal.h
/usr/lib
/usr/lib/libavcodec-0.4.9-pre1.so
/usr/lib/libavcodec.so
/usr/lib/libavformat-0.4.9-pre1.so
/usr/lib/libavformat.so
/usr/lib/libpostproc.so
/usr/lib/libpostproc.so.0.0.1
/usr/lib/vhook
/usr/lib/vhook/drawtext.so
/usr/lib/vhook/fish.so
/usr/lib/vhook/imlib2.so
/usr/lib/vhook/null.so
/usr/lib/vhook/ppm.so
/usr/share
/usr/share/doc
/usr/share/doc/ffmpeg
/usr/share/doc/ffmpeg/COPYING
/usr/share/doc/ffmpeg/README
/usr/share/doc/ffmpeg/doc
/usr/share/doc/ffmpeg/doc/Makefile
/usr/share/doc/ffmpeg/doc/TODO
/usr/share/doc/ffmpeg/doc/faq.html
/usr/share/doc/ffmpeg/doc/faq.texi
/usr/share/doc/ffmpeg/doc/ffmpeg-doc.html
/usr/share/doc/ffmpeg/doc/ffmpeg-doc.texi
/usr/share/doc/ffmpeg/doc/ffmpeg.1
/usr/share/doc/ffmpeg/doc/ffmpeg_powerpc_performance_evaluation_howto.txt
/usr/share/doc/ffmpeg/doc/ffplay-doc.html
/usr/share/doc/ffmpeg/doc/ffplay-doc.texi
/usr/share/doc/ffmpeg/doc/ffplay.1
/usr/share/doc/ffmpeg/doc/ffserver-doc.html
/usr/share/doc/ffmpeg/doc/ffserver-doc.texi
/usr/share/doc/ffmpeg/doc/ffserver.1
/usr/share/doc/ffmpeg/doc/ffserver.conf
/usr/share/doc/ffmpeg/doc/hooks.html
/usr/share/doc/ffmpeg/doc/hooks.texi
/usr/share/doc/ffmpeg/doc/optimization.txt
/usr/share/doc/ffmpeg/doc/texi2pod.pl
/usr/share/man/man1/ffmpeg.1
/usr/share/man/man1/ffplay.1
/usr/share/man/man1/ffserver.1

Currently ffmpeg installs .pc files with make install. If your distribution doesn't provide these files there is no way to guess host ffmpeg is compiled and which libraries are needed. Ask the package maintainers to include pkg-config files.

--
Damian Pietras - MOC developer

I found the problem, cvs version generates .pc files but last release do not generate this files.
With cvs version all works fine.