Does OpenCV through Yast come with FFMPEG support?

The title is pretty self-explanatory :slight_smile:

I’m trying to make a capture from a file in OpenCV, but I keep getting NULL pointers. My guess is that opencv is not configured to use ffmpeg, when installed through Yast, but I don’t know how to check this.

(I have tried building ffmpeg and opencv myself, that was a 2 day traumatic experience, to say the least)

No OpenCV users here?

ok, … I’ll bite. What has openCV got to do with ffmpeg ? To my knowledge, openCV does not come with openSUSE, although it is on packman.

Some links:
Packman’s openCV: PackMan :: opencv
openCV wiki: OpenCV - Wikipedia, the free encyclopedia

You could contact the packman packager if you believe there is an openCV feature missing in the Packman packaged version.

Hi,

OpenCV is available via the build service but of course without ffmpeg support. You have to install ffmpeg (e.g. via packman) and compile openCV yourself if you want to have ffmpeg support.

Hope this helps

You need ffmpeg to do video I/O in openCV :slight_smile:

Yes, that’s what I’ve been afraid of. I’ve been trying to build openCV with ffmpeg support for 3 days now.

First I have to hack the configure.in script to let it detect the ffmpeg libs, together with the appropriate include flags.
Then I have to hack the Makefile.am to change install-hook into install-exec-hook.
The libtool they generate complains about:

/bin/sh …/…/libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I…/… -I. -I…/…/cxcore/include -I…/… -DNDEBUG -I/usr/include/ffmpeg/ -Wall -fno-rtti -pipe -O3 -fomit-frame-pointer -fno-strict-aliasing -MT dummy.lo -MD -MP -MF .deps/dummy.Tpo -c -o dummy.lo dummy.cpp
…/…/libtool: line 813: X–tag=CXX: command not found

So I copy my own from /usr/bin and that actually gets the compilation going! However, then it complains about hardcode properties:

libtool: link: ( cd “.libs” && rm -f “lib_cv.la” && ln -s “…/lib_cv.la” “lib_cv.la” )
/bin/sh …/…/libtool --tag=CXX --mode=link g++ -Wall -fno-rtti -pipe -O3 -fomit-frame-pointer -fno-strict-aliasing -no-undefined -version-info 1:0:0 -L/home/jvlek/ffmpeg/lib -L/home/jvlek/ffmpeg/lib -o libcv.la -rpath /home/jvlek/opencv/lib dummy.lo lib_cv.la …/…/cxcore/src/libcxcore.la -lpthread -ldl -lm -lavcodec -lavformat
libtool: link: unsupported hardcode properties
libtool: link: See the libtool documentation for more information.
libtool: link: Fatal configuration error.

I’ve looked into libtool and there are some hardcode config options, but I have no idea what to do with them.

Building the latest TESTED svn snapshot, with CMake, yields compilation errors. These are not overcome by adding ‘#define __STDC_CONSTANT_MACROS’ as mentioned elsewhere.

So I’ve also tried to post the above to the openCV mailinglist, but the owner has to approve and I don’t know if he still has to look at my message (sent it yesterday afternoon), or that he rejected it…

I tried to compile version 1.0. The autotools errors were easily fixable, but then I found that it uses “img_convert()”… a function available only in versions of ffmpeg previous to 2008.

Since I’m not motivated to patch it I will wait for 1.1 final.

Well, I changed my mind. OpenCV 1.0 is available for openSUSE 11.1 at home:RedDwarf:multimedia with this configuration:

General configuration ================================================
 Compiler: g++
 CXXFLAGS: -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -fno-strict-aliasing

 Install path: /usr

HighGUI configuration ================================================

 Windowing system --------------
 Use Carbon / Mac OS X: no
 Use gtk+ 2.x: yes
 Use gthread: yes

 Image I/O ---------------------
 Use libjpeg: yes
 Use zlib: yes
 Use libpng: yes
 Use libtiff: yes
 Use libjasper: yes
 Use libIlmImf: yes

 Video I/O ---------------------
 Use QuickTime / Mac OS X: no
 Use xine: yes
 Use ffmpeg: yes
 Use dc1394 & raw1394: yes
 Use v4l: yes
 Use v4l2: yes

Wrappers for other languages =========================================
 SWIG 
 Python yes

Additional build settings ============================================
 Build demo apps yes

Isn’t the best package that could be, and don’t expect me to mantain it, but it should work.

I am having similar problem compiling opencv on x86-64. It uses by default its own libtool, with which I had no luck at all. So I resorted to using libtool from /isr/bin.

Now I am getting the:

libtool: link: unsupported hardcode properties
libtool: link: See the libtool documentation for more information.
libtool: link: Fatal configuration error.

I don’t really know how to resolve this one. You said you resolved it, how did you do it?

Alex