`
shappy1978
  • 浏览: 677974 次
  • 性别: Icon_minigender_1
  • 来自: 广州
社区版块
存档分类
最新评论

linux下ffmpeg增加h.264库时的ERROR: libx264 not found 错误解决

阅读更多

Linux 操作系统:Fedora 8;FFMpeg版本:0.5;libx264 BUILD:79。

错误描述:在安装好libx264 库后configure ffmpeg-0.5 时(要选择--enable-libx264),报出ERROR: libx264 not found 的错误。即提示找不到libx264 库,并指出了是找不到'x264_encoder_open'这个宏。

解决方法:

        查看libx264 库安装目录(就是configure libx264时的--prefix选项指向的路径)下/lib/include 目录中的x264.h 头文件。查看其中的第38行#define X264_BUILD 79 (这里的版本可能和我的不一样),这里的79说明了改libx264 库的版本号;第459行#define x264_encoder_open x264_encoder_glue2(x264_encoder_open_,X264_BUILD) 中定义了'x264_encoder_open'这个宏,并且指出了调用时为x264_encoder_open_X264_BUILD 这种格式,所以使用时应将版本号加在x264_encoder_open_后边。即需要调用时的宏名'x264_encoder_open' 将改为'x264_encoder_open_版本号' 的格式
        在/ffmpeg-0.5/configure 文件中的第1996行调用了'x264_encoder_open'这个宏,语句如下:

enabled libx264    && require  libx264 x264.h x264_encoder_open -lx264 -lm &&

 

        比如我的libx264 BUILD=79,那么把上面这句改成如下所示即可通过configure 了。

enabled libx264    && require  libx264 x264.h x264_encoder_open_79 -lx264 -lm

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics