Ask Your Question
4

cross compile OpenCV with FFMPEG for ARM Linux

asked 2013-03-11 06:20:39 -0600

gvi gravatar image

updated 2013-03-11 11:11:35 -0600

Hi all! I want to cross compile OpenCV with FFMPG for ARM Linux, but I don't know how to configure Cmake. I have previously downloaded ffmpeg codec from www.ffmpeg.org, and I have built it for ARM. I don't know how to configure Cmake to "see" the built ffmpeg libraries (libavcodec.a, libavformat.a, libavutil.a, libswscale.a).

Can anyone help me??

Thanks in advance!

checking for module 'libavcodec'
package 'libavcodec' not found
checking for module 'libavformat'
package 'libavformat' not found
checking for module 'libavutil'
package 'libavutil' not found
checking for module 'libswscale'
package 'libswscale' not found
Looking for libavformat/avformat.h
Looking for libavformat/avformat.h - not found
Looking for ffmpeg/avformat.h
Looking for ffmpeg/avformat.h - not found
edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
2

answered 2013-03-11 11:37:38 -0600

CMake uses Pkgconfig tool to find FFMPEG libraries and headers. The best way in your case to create pc file for your cross compiled FFMPEG and place it in pkgconfig folder of your cross compile environment. If you use cross compile tool chain from Ubuntu repositories, then place everything in /usr/arm-linux-gnueabi(hf)/

edit flag offensive delete link more

Comments

@Alexander I am using cross compile tool chain from Ubuntu repositories, I have merged ffmpeg install directories with usr/arm-linux-gnueabi but still can't find ffmpeg. Help?

haxan7 gravatar imagehaxan7 ( 2015-04-14 15:13:35 -0600 )edit

Did you build the ffmpeg for arm? At the risk of pointing out the obvious, the ffmpeg used in your host computer is probably built for x86_64 , and that's not compatible.

bot1131357 gravatar imagebot1131357 ( 2017-06-19 23:47:53 -0600 )edit
0

answered 2015-05-16 23:47:57 -0600

smokeink gravatar image

Try this export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig

it worked for me.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2013-03-11 06:20:39 -0600

Seen: 3,615 times

Last updated: Mar 11 '13