ubuntu - ffmpeg 配置错误 : libx264 not found

标签 ubuntu ffmpeg configure libx264

我想在 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/

相关文章:

ffmpeg - 如何在 FFmpeg 4.0 中将 5.1 音频拆分为离散的 AAC 流

Python子进程: capture output of ffmpeg and run regular expression against it

ffmpeg filtergraph描述中的文件索引3无效

java - 尝试将 Java 字符串中的每个单词大写

android - ADB 未响应 - 等待更多或终止 adb 或重新启动 (Ubuntu 13) 64 位

带有 VSCode 和 Ubuntu 的 Git 配置问题

gcc - macOS : configure: error: C compiler cannot create executables

ubuntu - 编译 QEMU 需要 glib-2.56

java - 如何设置 Sublime text 3 在 linux 上运行和编译 java?

python - Ubuntu 无法安装 OpenCV(libopencv_core 错误)