首页 > 解决方案 > libx264 没有找到 FFmpeg?

问题描述

我正在尝试构建启用了 libx264 的 ffmpeg。但是,当我在 MSYS 中运行以下命令时

./configure --prefix=ffmpeg/ --enable-gpl --enable-libx264

我收到一条错误消息

ERROR: libx264 not found

我在 Windows 10 上使用 MSYS。我还安装了 NASM。这是 config.log 文件

BEGIN /tmp/ffconf.TRVJWfGe/test.c
    1   #include <stdint.h>
    2   #include <x264.h>
    3   #include <stdint.h>
    4   long check_x264_encoder_encode(void) { return (long) x264_encoder_encode; }
    5   int main(void) { int ret = 0;
    6    ret |= ((intptr_t)check_x264_encoder_encode) & 0xFFFF;
    7   return ret; }
END /tmp/ffconf.TRVJWfGe/test.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -U__STRICT_ANSI__ -D__USE_MINGW_ANSI_STDIO=1 -D__MSVCRT_VERSION__=0x0700 -D_WIN32_WINNT=0x0600 -D__printf__=__gnu_printf__ -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c11 -fomit-frame-pointer -c -o /tmp/ffconf.TRVJWfGe/test.o /tmp/ffconf.TRVJWfGe/test.c
In file included from c:\mingw\include\stdint.h:46,
                 from c:\mingw\lib\gcc\mingw32\9.2.0\include\stdint.h:9,
                 from C:/Users/pawel/AppData/Local/Temp/ffconf.TRVJWfGe/test.c:1:
c:\mingw\include\_mingw.h:413:3: warning: #warning "Direct definition of __USE_MINGW_ANSI_STDIO is deprecated." [-Wcpp]
  413 | # warning "Direct definition of __USE_MINGW_ANSI_STDIO is deprecated."
      |   ^~~~~~~
c:\mingw\include\_mingw.h:414:10: note: #pragma message: See <_mingw.h> for preferred feature activation methods.
  414 | # pragma message "See <_mingw.h> for preferred feature activation methods."
      |          ^~~~~~~
C:/Users/pawel/AppData/Local/Temp/ffconf.TRVJWfGe/test.c:2:10: fatal error: x264.h: No such file or directory
    2 | #include <x264.h>
      |          ^~~~~~~~
compilation terminated.
ERROR: libx264 not found

你能告诉我如何解决这个错误,还是里面已经有一个带有 libx264 的预构建包?

标签: windowsffmpegnasmmsys

解决方案


推荐阅读