CentOS 6.2下编译mpeg4ip

一、环境

1、操作系统版本

CentOS 6.2 64

uname -a的输出:

Linux localhost.localdomain 2.6.32-220.17.1.el6.x86_64 #1 SMP Wed May 16 00:01:37 BST 2012 x86_64 x86_64 x86_64 GNU/Linux

2mpeg4ip版本

版本:1.6.1

下载链接:

~ahze/distfiles/mpeg4ip-1.6.1.tar.gz 

 

二、编译 

1、编译mpeg4ip需要的库 

首先安装libtool库,命令如下: 

yum install libtool 

然后进入到mpeg4ip的目录,运行./bootstrap进行配置,如果出错,是因为bash版本及名称的问题,修改bootstrap文件中第一行,改sh bash.或运行 bash ./bootstrap。 

提示如下:  

*** ffmpeg encoder is not installed *** xvid encoder is not installed *** x264 encoder is not installed *** lame encoder is not installed *** faac encoder is not installed *** twolame encoder is not installed

 安装相应库: 

yum install ffmpeg-devel xvidcore-devel twolame-devel x264-devel 

编译:make 

2、编译中的错误处理 

2.1 报错内容:  

In file included from config_opts.cpp:1: /include/mpeg4ip.h:126: error: new declaration 'char* strcasestr(const char*, const char*)' /usr/include/string.h:369: error: ambiguates old declaration 'const char* strcasestr(const char*, const char*)'

解决办法:

vi include/mpeg4ip.h 

注释掉函数声明,如下所示:

CentOS 6.2下编译mpeg4ip

2.2 报错内容: 

cc1plus: warnings being treated as errors sys_decoder_blkdec.cpp:190: error: suggest parentheses around '&&' within '||' sys_decoder_blkdec.cpp:205: error: suggest parentheses around '&&' within '||'

 如图所示:

CentOS 6.2下编译mpeg4ip

解决办法:

vi common/video/iso-mpeg4/src/Makefile 

去掉Werror 

vi命令: %s/-Werror//

2.3 报错内容: 

type_basic.cpp:320: error: '<anonymous>' has incomplete type type_basic.cpp:320: error: invalid use of 'Void' type_basic.cpp:320: error: prototype for 'Void CMotionVector::setToZero(<type error>)' does not match any in class 'CMotionVector' ./../include/basic.hpp:441: error: candidate is: Void CMotionVector::setToZero()

解决办法: 

vi common/video/iso-mpeg4/src/type_basic.cpp 

320行去掉括号内的Void,如图所示:

CentOS 6.2下编译mpeg4ip

2.4 报错内容:  

cc1: warnings being treated as errors config.c: In function 'enter_chn': config.c:636: error: array subscript is above array bounds config.c:637: error: array subscript is above array bounds

解决办法: 

vi player/lib/audio/faad/Makefile 

去掉Werror 

2.5 报错内容: 

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/21588.html