我想在Ubuntu 64位上配置ffmpeg,但是我得到了一个错误:“错误: libx264 not ”。没看到libx264!在此之前,我成功地在QNX和Windows中配置了它。我用--disable-opencl防止了一个已知的bug,但没有帮助。在我的项目中,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
ARCH x86 (属)
x86汇编程序nasm
也许这就是问题所在?如何在x86_64中配置ffmpeg?--arch=x86_64没有帮助!
更新:问题解决了,当配置libx264时,需要添加--enable-pic
发布于 2019-04-11 19:32:19
ERROR: libx264 not found
您正在为--prefix使用自定义x264,因此需要为ffmpeg配置添加PKG_CONFIG_PATH,如下所示:
PKG_CONFIG_PATH="$HOME/path/to/your/x264/lib/pkgconfig" ./configure另一个例子请参见FFmpeg Wiki: Ubuntu。
这就是我担心的..。为什么是x86?
看起来它只是一个包含i[3-6]86*|i86pc|BePC|x86pc|x86_64|x86_32|amd64的别名。请参考configure的内容。
它还在x86_64上为我展示了x86_64(不使用--arch或--target)。
https://stackoverflow.com/questions/55633765
复制相似问题