目标
我正在努力建立:
1. Converted from RGB to YUV2
2. The converted image is sent to the x264 encoder
3. and the output of the encoder is streamed to a remote IP-endpoint via UDP.
问题
我在弄清楚如何使用swscale支持进行编译时遇到了一些困难。我需要对可执行文件和库的swscale支持。
状态
到目前为止,我已经从x264网站下载了最新的x264源代码。
我已经在我的机器上安装了MINGW,当我运行“configure”和“make”时,我得到了x264静态库--但是没有swscale支持。
我还没有找到关于如何在x264库中包含swscale的详细的逐步指南。我所描述的最接近的是这样的讨论:
http://forum.doom9.org/showthread.php?t=165350
所以我从以下网站下载了libpack:
http://komisar.gin.by/mingw/index.html
把它提取到我的硬盘上:
然后在我的x264目录中执行'make‘和'configure’(再次):
./configure --extra-cflags="-I/m/somePath/libpack/libpack/libpack/include" --extra-ldflags="-L/m/somePath/libpack/libpack/libpack/lib"我在lib中有以下内容,并包含目录:


当我执行上面的“配置”时,我得到:
platform: X86
system: WINDOWS
cli: yes
libx264: internal
shared: no
static: no
asm: yes
interlaced: yes
avs: avisynth
lavf: no
ffms: no
mp4: lsmash
gpl: yes
thread: win32
opencl: yes
filters: crop select_every
debug: no
gprof: no
strip: no
PIC: no
bit depth: 8
chroma format: all
You can run 'make' or 'make fprofiled' now.
bash.exe"-3.1$当我执行“make”时,就会出现以下错误:
gcc.exe: error: unrecognized command line option '-fomit-frame-poin'
gcc.exe: fatal error: no input files
compilation terminated.
make: *** [.depend] Error 1
bash.exe"-3.1$问题,我做错了什么?
发布于 2014-04-23 12:24:55
我要指出的几件事:
发布于 2014-04-23 19:30:08
1)您无法构建“具有swscale支持的x264静态库(.lib)”,因为它们是单独的库,应该在项目中一起使用,而不是通过在另一个项目中构建。另外,除非使用ICL构建,否则您无法构建libx264静态库,因为要将MinGW构建库(.a)混合到MSVS项目中会有很多问题。我建议在MSVS项目中使用共享库(.dll),以防您想使用libx264。您可以找到如何使用谷歌为libx264.dll构建.lib。
2)要构建具有swscale支持的x264可执行文件,您需要提供X 264的配置,其中包含作为ffmpeg/libav项目一部分的swscale库和标头的路径,并与它们一起构建。
在使用komisar的libpack构建时遇到的问题。您的配置命令行看起来是正确的,但它仍然没有用swscale配置它(配置输出中缺少了调整大小的过滤器)。要找出原因,您需要查看config.log文件,该文件是由配置创建的,但在您使用的libpack中,swscale很可能已经过时(并且没有x264使用的一些API值)。
至于gcc.exe: error: unrecognized command line option '-fomit-frame-poin',我不知道你从哪里得到这个错误的选项,因为它应该是-fomit-frame-pointer,但你没有发布gcc的完整命令行导致错误。可能是您自己指定的(环境CFLAGS),或者是命令行的截短(命令行太长)。
https://stackoverflow.com/questions/23190965
复制相似问题