ffmpeg编译后找不到libx264

ffmpeg no libx264

ffmpeg编译libx264完成之后,查看config.h,编译都对,但是怎么也找不到libx264:

$ ./ffmpeg -encoders | grep 264
ffmpeg version n4.4 Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 9 (Ubuntu 9.4.0-1ubuntu1~20.04.1)
  configuration: --enable-shared --enable-libx264 --enable-gpl --enable-nonfree --enable-sdl --enable-ffplay --disable-optimizations --enable-debug --extra-cflags=-g --enable-libfdk-aac --enable-libopenh264 --enable-libx264
  WARNING: library configuration mismatch
  avutil      configuration: --prefix=/usr/local/ffmpeg --enable-shared --enable-static --enable-gpl --enable-sdl --enable-ffplay --enable-libmp3lame
  avcodec     configuration: --prefix=/usr/local/ffmpeg --enable-shared --enable-static --enable-gpl --enable-sdl --enable-ffplay --enable-libmp3lame
  avformat    configuration: --prefix=/usr/local/ffmpeg --enable-shared --enable-static --enable-gpl --enable-sdl --enable-ffplay --enable-libmp3lame
  avdevice    configuration: --prefix=/usr/local/ffmpeg --enable-shared --enable-static --enable-gpl --enable-sdl --enable-ffplay --enable-libmp3lame
  avfilter    configuration: --prefix=/usr/local/ffmpeg --enable-shared --enable-static --enable-gpl --enable-sdl --enable-ffplay --enable-libmp3lame
  swscale     configuration: --prefix=/usr/local/ffmpeg --enable-shared --enable-static --enable-gpl --enable-sdl --enable-ffplay --enable-libmp3lame
  swresample  configuration: --prefix=/usr/local/ffmpeg --enable-shared --enable-static --enable-gpl --enable-sdl --enable-ffplay --enable-libmp3lame
  postproc    configuration: --prefix=/usr/local/ffmpeg --enable-shared --enable-static --enable-gpl --enable-sdl --enable-ffplay --enable-libmp3lame
  libavutil      56. 70.100 / 56. 70.100
  libavcodec     58.134.100 / 58.134.100
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter     7.110.100 /  7.110.100
  libswscale      5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100
 V..... h264_v4l2m2m         V4L2 mem2mem H.264 encoder wrapper (codec h264)

这段输出里面有个warning(WARNING: library configuration mismatch),发现这里有个路径:

--prefix=/usr/local/ffmpeg

看着这里在什么时候编译的时候指定/usr/local/ffmpeg,/usr/local/ffmpeg下面存在一份ffmpeg的库,删掉这个目录后,再用ffmpeg查找264,显示正常了:

ffmpeg version n4.4 Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 9 (Ubuntu 9.4.0-1ubuntu1~20.04.1)
  configuration: --enable-static --enable-shared --enable-libx264 --enable-gpl --enable-nonfree --enable-sdl --enable-ffplay --disable-optimizations --enable-debug --extra-cflags=-g --enable-libfdk-aac --enable-libopenh264 --enable-libx264
  libavutil      56. 70.100 / 56. 70.100
  libavcodec     58.134.100 / 58.134.100
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter     7.110.100 /  7.110.100
  libswscale      5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100
 V..... libx264              libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (codec h264)
 V..... libx264rgb           libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 RGB (codec h264)
 V..... libopenh264          OpenH264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (codec h264)
 V..... h264_v4l2m2m         V4L2 mem2mem H.264 encoder wrapper (codec h264)
  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值