# ffmpeg with opencv -- or opencv with ffmpeg??



## free-and-bsd (Jun 28, 2015)

Hello everyone.

I'm trying to build a git version of ffmpeg and have encountered this diliemma. My ports-base multimedia/ffmpeg26 uses this flag --enable-libopencv, but when I'm trying to compile the git source with this flag, it says "OpenCV not found via pkg-config".
Now I've noticed that the one installed is actually graphics/opencv-core. OK, I tried to build graphics/opencv, but to be build with ffmpeg support it wants... ffmpeg installed!

Now can anybody, please, explain what the deal is? How can that be that if I enable OpenCv support in ffmpeg, it needs libopencv (logically), but then opencv needs in turn ffmpeg to build?

Where's the mistake?


----------



## talsamon (Jun 28, 2015)

It is an option, you can switch to off (in graphics/opencv it is per default off). OpenCV pulls in multimedia/ffmpeg, this is Version 2.3.6. multimedia/ffmpeg26 is an other port and other version.


----------



## free-and-bsd (Jun 29, 2015)

Right... OpenCV pulls in multimedia/ffmpeg, and multimedia/ffmpeg has the option to enable OpenCV. Then OpenCV, in turn, has the option... to enable ffmpeg -- for that you'll need to compile, guess what? Right, multimedia/ffmpeg. Or are these different versions of OpenCV in each of these cases??


----------

