OpenCV Cross Compile Issue for ARM with FFMPEG support on x86 host

asked 2014-10-28 18:37:22 -0500

newuser gravatar image

I am trying to compile OpenCV with ffmpeg support for ARM Platform on a x86 host.

I downloaded and compiled ffmpeg for arm platform (both static - FFMPEG_ARM_LIB and dynamic libs - FFMPEG_ARM_LIB_SO)

When I run cmake in opencv, it gives the following -

-- Video I/O:
--DC1394 1.x: NO
-- DC1394 2.x: NO
-- FFMPEG: NO
-- codec: NO
-- format: NO
-- util: NO
-- swscale: NO
-- gentoo-style: YES
-- GStreamer: NO
-- OpenNI: NO
-- OpenNI PrimeSensor Modules: NO
-- PvAPI: NO
-- GigEVisionSDK: NO
-- UniCap: NO
-- UniCap ucil: NO
-- V4L/V4L2: NO/YES
-- XIMEA: NO
-- Xine: NO

I changed the following flags to point to the lib paths of both ffmpeg static and dynamic libs-

LD_LIBRARY_PATH
C_INCLUDE_PATH
CPLUS_INCLUDE_PATH
PKG_CONFIG_PATH
PKG_CONFIG_LIBDIR
PATH
CMAKE_LIBRARY_PATH
CMAKE_INCLUDE_PATH

However, the opencv is still not able to recognize the ffmpeg libs.

My FFMPEG compilation command was

./configure --enable-shared --disable-static\ --cross-prefix=arm-linux-gnueabi- --arch=armv7a\ --target-os=linux --prefix=<path>

What am I doing wrong here? 1. Am I compiling the ffmpeg with the wrong option? 2. Am I missing some element in CMake which would make it point to the compiled ffmpeg lib for ARM on my system?

Host Arch - x86 64 Target Arch - ARM 32 bit

edit retag flag offensive close merge delete

Comments

Did you try adding -DWITH_FFMPEG=ON to your cmake command?

StevenPuttemans gravatar imageStevenPuttemans ( 2014-10-29 04:06:20 -0500 )edit

Yup. I did that. But it still did not detect the ffmpeg files.

newuser gravatar imagenewuser ( 2014-10-29 21:24:03 -0500 )edit

When running CMAKE-GUI can you check if it retrieves the ffmpeg libs location?

StevenPuttemans gravatar imageStevenPuttemans ( 2014-10-30 04:09:54 -0500 )edit

I used this to print out where the libs are message(STATUS "CMAKE_LIBRARY_PATH is " ${CMAKE_LIBRARY_PATH}) message(STATUS "CMAKE_INCLUDE_PATH is " ${CMAKE_INCLUDE_PATH}) message(STATUS "PKG_CONFIG_PATH is " $ENV{PKG_CONFIG_PATH})

It does point to the ffmpeg cross compiled lib path.

newuser gravatar imagenewuser ( 2014-10-30 15:18:42 -0500 )edit