0

I want to cross compile opencv with ffmpeg for arm.

I have cross compiled ffmpeg, how do I configure cmake to see the ffmpeg?

Edit: I am cross compiling for AR Drone 2.0. I use toolchain under platform/linux.

Hassan
  • 870
  • 13
  • 25

2 Answers2

0

The answer to your specific problem is to use cmake-gui which provides you a visual interface to ease the process of setting up variables, like your ffmpeg package location.

However I have 2 recommendations:

  • Download the most updated toolchain.
  • DO NOT USE THIS GUIDE. Use instead the toolchain that you find in the package in sources\platforms\android\android.toolchain.cmake: read inside, you'll find the correct instructions at the beginning of the file.

Another optional recommendation: use ninja as build system, much faster.

Antonio
  • 19,451
  • 13
  • 99
  • 197
  • There is a checkbox to enable/disable ffmpeg but no ffmpeg include path option. And btw i am cross compiling for AR Drone – Hassan Apr 13 '15 at 15:33
  • @haxan7 You are right! You'll have to modify stuff in the source directory. You can reproduce the same that you find for Windows in `sources\3rdparty\ffmpeg`, and then touch a couple of places where you have conditional statements `if(WIN32)`. If you manage, please post an answer. – Antonio Apr 14 '15 at 08:57
0

I was successful in cross compiling OpenCV with ffmpeg for AR Drone's ARM processor by writing my own toolchain file where I explicitly set all the linker, pkg_config and compiler paths to relevant directories containing the cross-compiled stuff.

I have written a blog post detailing the entire process here: How to Cross-Compile OpenCV with FFmpeg for AR Drone (ARM Processor).

Hassan
  • 870
  • 13
  • 25