1.libx264 编译
./configure --enable-static --disable-asm --prefix=/usr/local/ffmpegDM3730 --arch=arm --host=arm-linux --cross-prefix=arm-arago-linux-gnueabi-
make
make install
2.ffmpeg 编译
./configure --enable-shared --disable-yasm --enable-memalign-hack --enable-libx264 --enable-gpl --prefix=/usr/local/ffmpegDM3730 --enable-cross-compile --arch=arm --target-os=linux --cross-prefix=arm-arago-linux-gnueabi- --cc=arm-arago-linux-gnueabi-gcc --extra-cflags=-I/usr/local/ffmpegDM3730/include --extra-ldflags=-L/usr/local/ffmpegDM3730/lib --extra-libs=-ldl
make
make install
注意1:--extra-cflags=-I/usr/local/ffmpegDM3730/include --extra-ldflags=-L/usr/local/ffmpegDM3730/lib用于指定libx264的路径,但是指定完以后需要添加--extra-libs=-ldl才能找到该路径。否则会提示 ERROR: libx264 not found
注意2:交叉编译工具链要添加到环境变量
我编译使用的libx264和ffmpeg版本参考:
http://blog.csdn.net/caoshangpa/article/details/50947926
linux下编译ffmpeg,并加入H264编码支持:
http://blog.csdn.net/caoshangpa/article/details/51392445
Windows 7(Win7)下MinGW+msys编译ffmpeg,并加入H264编码支持:
http://blog.csdn.net/caoshangpa/article/details/50947926