ffmpeg:
root@ubuntu:/home/thinkpad/tools/ffmpeg_x264_src_20071007/ffmpeg# ./configure --prefix=/usr/local/arm/arm-linux/ffmpeg/ --disable-static --enable-shared --enable-gpl --enable-swscaler --enable-libx264 --enable-libxvid --disable-strip --arch=libavcodec/armv4l/ --enable-ffplay --enable-ffserver --disable-armv5te --disable-armv6 --disable-zlib --cross-compile --cross-prefix=/usr/local/arm/3.4.1/bin/arm-linux- --cc=gcc --enable-gpl --disable-opts --disable-network --extra-libs=-L/usr/local/arm/arm-linux/ffmpeg/lib/ --extra-ldflags=-L/usr/local/arm/arm-linux/ffmpeg/lib/ --extra-cflags=-I/usr/local/arm/arm-linux/ffmpeg/include/ --disable-ipv6 --enable-pthreads
ok之后,应该先下载到arm测试
root@ubuntu:/home/thinkpad/tools/opencv-1.1.0# export LD_LIBRARY_PATH=/usr/local/arm/arm-linux/ffmpeg/lib:$LD_LIBRARY_PATH
出错:
error while loading shared libraries libavcodec.so.51: file too short
查看文件属性:
root@ubuntu:/usr/local/arm/arm-linux/ffmpeg/lib# file *
libavcodec.so: symbolic link to `libavcodec.so.51.44.0'
libavcodec.so.51: symbolic link to `libavcodec.so.51.44.0'
libavcodec.so.51.44.0: ELF 32-bit LSB shared object, ARM, version 1, dynamically linked, not stripped
libavformat.so: symbolic link to `libavformat.so.51.14.0'
libavformat.so.51: symbolic link to `libavformat.so.51.14.0'
libavformat.so.51.14.0: ELF 32-bit LSB shared object, ARM, version 1, dynamically linked, not stripped
libavutil.so: symbolic link to `libavutil.so.49.5.0'
libavutil.so.49: symbolic link to `libavutil.so.49.5.0'
libavutil.so.49.5.0: ELF 32-bit LSB shared object, ARM, version 1, dynamically linked, not stripped
libswscale.so: symbolic link to `libswscale.so.0.5.0'
libswscale.so.0: symbolic link to `libswscale.so.0.5.0'
libswscale.so.0.5.0: ELF 32-bit LSB shared object, ARM, version 1, dynamically linked, not stripped
libx264.a: current ar archive
libx264.so: symbolic link to `libx264.so.56'
libx264.so.56: ELF 32-bit LSB shared object, ARM, version 1, dynamically linked, stripped
libxvidcore.a: current ar archive
libxvidcore.so.4.1: ELF 32-bit LSB shared object, ARM, version 1, dynamically linked, not stripped
pkgconfig: directory
vhook: directory
根据网络友人的回答:
There was probably an error copying/extracting the libraries. libvtkWidgets.so and libvtkWidgets.so.5.4 should not be files but symbolic links. Try the following:
rm libvtkWidgets.so.5.4 libvtkWidgets.so ln -s libvtkWidgets.so.5.4.2 libvtkWidgets.so.5.4 ln -s libvtkWidgets.so.5.4 libvtkWidgets.soAnyway you should check if the software that you are installing is available from the software center. If it is not available and if the above fix does not work you will need to contact the application provider.
执行ffmpeg,不能识别mp4 或者avi格式
在xvidcore测试:在进入example目录输入
arm-linux-gcc -o xvid_encraw xvid_encraw.c -lc -lm -I../src/ -L../build/generic/=build -lxvidcore
报错,需要重新编译
opencv:
root@ubuntu:/home/thinkpad/tools/opencv-1.1.0# ./configure --prefix=/usr/local/arm/arm-linux/opencv --host=arm-linux --without-gtk --with-v4l --without-python --without-swig --without-carbon --without-quicktime --without-1394libs --with-ffmpeg --enable-shared --enable-swscale --enable-gpl CXXFLAGS=-fno-strict-aliasing CFLAGS=-I/usr/local/arm/arm-linux/ffmpeg/include CPPFLAGS=-I/usr/local/arm/arm-linux/ffmpeg/include LDFLAGS=-L/usr/local/arm/arm-linux/ffmpeg/lib
根据网上信息,gcc4.3.2可以,但是我没有测试成功,4.5.1+opencv2.0+ffmpeg0.5也是同样的问题,待解决。