【FFMPEG系列】FFMPEG linux下集成x264

FFMPEG集成x264

1.x264下载地址:
http://download.videolan.org/pub/videolan/x264/snapshots/
2. FFMPEG引入外部库x264方法
https://www.cnblogs.com/wanggang123/p/8660435.html

FFMPEG引入x264时出现的问题
FFMPEG引入外部x264在./configure时出现以下问题:
gcc -L./x264 -Wl,–as-needed -o /tmp/ffconf.ZNG31130 /tmp/ffconf.xCt31136.o -lx264 -lm -lbz2 -lz -pthread -lrt
./x264/libx264.a(opencl.o): In function x264_opencl_close_library': opencl.c:(.text+0x572): undefined reference todlclose’
./x264/libx264.a(opencl.o): In function x264_opencl_load_library': opencl.c:(.text+0x5d7): undefined reference todlopen’
opencl.c:(.text+0x5f1): undefined reference to dlsym' opencl.c:(.text+0x60e): undefined reference todlsym’
opencl.c:(.text+0x62b): undefined reference to dlsym' opencl.c:(.text+0x648): undefined reference todlsym’
opencl.c:(.text+0x665): undefined reference to dlsym' ./x264/libx264.a(opencl.o):opencl.c:(.text+0x682): more undefined references todlsym’ follow
./x264/libx264.a(opencl.o): In function x264_opencl_load_library': opencl.c:(.text+0x8fd): undefined reference todlclose’
./x264/libx264.a(opencl.o): In function x264_opencl_lookahead_init': opencl.c:(.text+0x1841): undefined reference todlopen’
opencl.c:(.text+0x185b): undefined reference to dlsym' opencl.c:(.text+0x186d): undefined reference todlsym’
opencl.c:(.text+0x1881): undefined reference to dlsym' opencl.c:(.text+0x1895): undefined reference todlsym’
opencl.c:(.text+0x18d4): undefined reference to `dlclose’
collect2: ld returned 1 exit status

解决方法
在GUI配置相应项或makefile里面的gcc命令行中添加-ldl,如:

../configure --enable-static --enable-libx264 --enable-gpl --disable-x86asm --prefix=/home/wgg/compile/ffmpeg/static --extra-cflags="-I/home/wgg/work/compile/x264/static/include" --extra-ldflags="-L/home/wgg/work/compile/x264/static/lib -ldl" 

参考网址:https://bbs.csdn.net/topics/390842477

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值