我想在 64 位 Ubuntu 上配置 ffmpeg,但出现错误:“ ERROR: libx264 not found ”。
ffmpeg 看不到 libx264!在此之前,我在 QNX 和 Windows 中成功配置了它。
我用 --disable-opencl
阻止了一个已知错误,但它没有帮助。
在我的项目中 libx264 应该是 静态 .
libx264 配置:
../configure --prefix=x264 --disable-cli --enable-static --disable-opencl
platform: X86_64
byte order: little-endian
system: LINUX
cli: no
libx264: internal
shared: no
static: yes
asm: yes
interlaced: yes
avs: no
lavf: no
ffms: no
mp4: no
gpl: yes
thread: posix
opencl: no
filters: crop select_every
lto: no
debug: no
gprof: no
strip: no
PIC: no
bit depth: all
chroma format: all
没关系!只困惑平台:X86_64
FFmpeg 配置:
../configure --target-os=linux --prefix=ffmpeg --disable-programs \
--disable-ffplay --disable-ffprobe --disable-doc \
--disable-htmlpages --disable-manpages --disable-podpages \
--disable-txtpages --disable-avdevice --disable-postproc \
--disable-network --disable-encoders --enable-encoder=libx264 \
--disable-decoders --enable-decoder=h264 --disable-hwaccels \
--disable-muxers --enable-muxer=matroska --disable-demuxers \
--disable-parsers --enable-parser=h264 --enable-gpl \
--enable-libx264 \
--extra-ldflags=-L../x264/lib \
--extra-cflags=-I../x264/include
ERROR: libx264 not found
路径完全正确!
如果删除
--enable-libx264
:install prefix ffmpeg
source path /home/osuser/develop/libs/source/ffmpeg-3.4.2
C compiler gcc
C library glibc
ARCH x86 (generic)
big-endian no
runtime cpu detection yes
standalone assembly yes
x86 assembler nasm
...
这就是我担心的... 为什么 x86 ?
拱 x86 (通用的)
x86 汇编程序
也许这就是问题所在?如何在 x86_64 中配置 ffmpeg?
--arch=x86_64
没救了!更新:
问题已修复,配置libx264时,需要添加
--enable-pic
最佳答案
ERROR: libx264 not found
您正在使用自定义
--prefix
对于 x264,所以您需要添加 PKG_CONFIG_PATH
为您的 ffmpeg 配置,例如:PKG_CONFIG_PATH="$HOME/path/to/your/x264/lib/pkgconfig" ./configure
见 FFmpeg Wiki: Ubuntu再举一个例子。
This is what worries me... Why x86?
看起来它只是一个包含
i[3-6]86*|i86pc|BePC|x86pc|x86_64|x86_32|amd64
的别名.引用configure
的内容.它还显示
x86
对我来说 x86_64
(不使用 --arch
或 --target
)。
关于ubuntu - ffmpeg 配置错误 : libx264 not found,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55633765/