本文主要是介绍集成ffmpeg/x264:ERROR: libx264 not found的问题,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
转至:http://blog.sina.com.cn/s/blog_54b5ea250100r53o.html
集成ffmpeg/x264:ERROR: libx264 not found的问题--拔剑集成ffmpeg/x264碰到如下问题: ERROR: libx264 not found
察看config.log,详细信息如下:check_lib x264.h x264_encoder_encode -lx264check_header x264.hcheck_cppBEGIN /tmp/ffconf.isuazGlg.c1 #include <x264.h>2 int x;END /tmp/ffconf.isuazGlg.cgcc -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -U__STRICT_ANSI__ -I/d/MinGW/msys/1.0/include -std=c99 -fno-common -fomit-frame-pointer -E -o /tmp/ffconf.ClhyDYvC.o /tmp/ffconf.isuazGlg.cC:/DOCUME~1/ibm/LOCALS~1/Temp/ffconf.isuazGlg.c:1:18: fatal error: x264.h: No such file or directory^Mcompilation terminated.^MERROR: libx264 not found:
所以实际原因是x264 make install 的东西ffmpeg configure没有找到x264.h这个文件。查看我的x264
make install的结果,有:install -d /usr/local/bininstall -d /usr/local/includeinstall -d /usr/local/libinstall -d /usr/local/lib/pkgconfiginstall -m 644 x264.h /usr/local/includeinstall -m 644 x264_config.h /usr/local/includeinstall -m 644 libx264.a /usr/local/libinstall -m 644 x264.pc /usr/local/lib/pkgconfiginstall x264.exe /usr/local/binranlib /usr/local/lib/libx264.ainstall -m 755 libx264-115.dll /usr/local/bininstall -m 644 libx264.dll.a /usr/local/lib
因此,只要在配制configure时,添加额外的include/link路径应该能够解决问题,即增加开关:--extra-cflags=-I/usr/local/include --extra-ldflags=-L/usr/local/lib
这个需要根据你x264编译、安装的实际配制修改。Finally, the configure command for ffmpeg is
changed to :$./configure --enable-memalign-hack --enable-ffserver --enable-network --enable-protocols --enable-muxers --disable-yasm --enable-shared --enable-w32threads --enable-libx264 --enable-gpl --extra-cflags=-I/usr/local/include --extra-ldflags=-L/usr/local/lib运行,一切无误!
这篇关于集成ffmpeg/x264:ERROR: libx264 not found的问题的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!