[操作系统]CentOS6.2下编译mpeg4ip

0

2012-06-29 01:00:09

一、环境

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

2、mpeg4ip版本

版本:1.6.1

下载链接:

http://people.freebsd.org/~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

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

2.2 报错内容:cc1plus: warnings being treated as errorssys_decoder_blkdec.cpp:190: error: suggest parentheses around '&&' within '||'sys_decoder_blkdec.cpp:205: error: suggest parentheses around '&&' within '||'

如图所示:

解决办法:

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

去掉Werror

vi命令: %s/-Werror//

2.3 报错内容:type_basic.cpp:320: error: '' has incomplete typetype_basic.cpp:320: error: invalid use of 'Void'type_basic.cpp:320: error: prototype for 'Void CMotionVector::setToZero()' 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,如图所示:

2.4 报错内容:cc1: warnings being treated as errorsconfig.c: In function 'enter_chn':config.c:636: error: array subscript is above array boundsconfig.c:637: error: array subscript is above array bounds

解决办法:

vi player/lib/audio/faad/Makefile

去掉Werror

2.5 报错内容:/usr/local/include/libavutil/common.h: In function ‘int32_t av_clipl_int32(int64_t)’:/usr/local/include/libavutil/common.h:154: error: ‘UINT64_C’ was not declared in this scope...

解决办法:

涉及到标准c和c99的问题,在出问题的文件中加上下面三句话就好了#ifndef UINT64_C#define UINT64_C(value)__CONCAT(value,ULL)#endif

2.6 报错内容:In file included from ffmpeg.cpp:26:ffmpeg.h:29:28: error: ffmpeg/avcodec.h: No such file or directory...

解决办法:

版本遗留问题,修改下路径就行了。其实这是一类问题,接下来还会遇到好多次,以这个为例展例下,其它的照此修改就OK了。

vi player/plugin/audio/ffmpeg/ffmpeg.h

在第30行进行修改,替换成完整路径:

#include

2.7 报错内容:ffmpeg.cpp: In function 'codec_data_t* ffmpeg_create(const char*, const char*, int, int, format_list_t*, audio_info_t*, const uint8_t*, uint32_t, audio_vft_t*, void*)':ffmpeg.cpp:180: error: 'AVCODEC_MAX_AUDIO_FRAME_SIZE' was not declared in this scopeffmpeg.cpp: In function 'int ffmpeg_decode(codec_data_t*, frame_timestamp_t*, int, int*, uint8_t*, uint32_t, void*)':

解决办法:

vi /usr/include/ffmpeg-spice/libavcodec/avcodec.h

查找 AVCODEC_MAX_AUDIO_FRAME_SIZE,得到如下结果:

复制其值到文件player/plugin/audio/ffmpeg/ffmpeg.h,并把Q去掉:

vi player/plugin/audio/ffmpeg/ffmpeg.h

添加如下内容:

#define AVCODEC_MAX_AUDIO_FRAME_SIZE 192000

2.8 报错内容:media_utils.cpp: In function 'int create_media_for_iptv(CPlayerSession*, const char*, int, control_callback_vft_t*)':media_utils.cpp:613: error: invalid conversion from 'const char*' to 'char*'

解决办法:

vi player/src/media_utils.cpp

在613行,对name变量进行强制类型转换,如图所示:

2.9 报错内容:../server/mp4live/video_util_resize.h:93: error: conflicting declaration 'uint8_t* fV'../server/mp4live/video_util_resize.h:91: error: 'fV' has a previous declaration as 'const uint8_t* fV'../server/mp4live/video_util_resize.h:94: error: redefinition of 'uint32_t tvStride'../server/mp4live/video_util_resize.h:94: error: 'uint32_t tvStride' previously declared here解决办法:

这个就是函数声明的时候变量重名了,把名字修改的不同就OK了。这是我修改:void CopyYuv(const uint8_t *fY, const uint8_t *fU, const uint8_t *fV,             uint32_t fyStride, uint32_t fuStride, uint32_t fvStride2,             uint8_t *tY, uint8_t *tU, uint8_t *fV2,             uint32_t tyStride, uint32_t tvStride, uint32_t tvStride2,             uint32_t w, uint32_t h);2.10 报错内容:video_ffmpeg.cpp:124: error: 'struct AVCodecContext' has no member named 'frame_rate'video_ffmpeg.cpp:125: error: 'struct AVCodecContext' has no member named 'frame_rate_base'video_ffmpeg.cpp:136: error: 'struct AVCodecContext' has no member named 'aspect_ratio'解决办法:这几个错误影响不大,就直接注释掉了,我主要用mp4live

好,编译成功,make install 即可使用。

三、安装使用

1、安装

make install

2、使用mp4live

转载请保留本文网址:http://www.shaoqun.com/a/34267.html

*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们:admin@shaoqun.com。

Centos

0

linux mpeg4ip 编译,[操作系统]CentOS6.2下编译mpeg4ip相关推荐

  1. Linux(CentOS6.5)下编译安装Nginx1.10.1

    原文出自:http://www.cnblogs.com/comexchan/p/5815753.html Linux(CentOS6.5)下编译安装Nginx1.10.1 首先在特权账号(root)下 ...

  2. linux mysql 5.6.22_LinuxCentOS6.0下编译安装MySQL5.6.22

    Linux CentOS6.5下编译安装MySQL 5.6.22[给力详细教程] 一.编译安装MySQL前的准备工作 安装编译源码所需的工具和库(安装过程注意有没出错) yum install gcc ...

  3. mysql5.6.22编译安装教程_Linux CentOS6.0下编译安装MySQL 5.6.22

    Linux CentOS6.5下编译安装MySQL 5.6.22[给力详细教程] 一.编译安装MySQL前的准备工作 安装编译源码所需的工具和库(安装过程注意有没出错) yum install gcc ...

  4. opencv编译python库_linux 下编译安装 opencv-python

    编译参考 Docker环境下编译,内部整理的详细的编译选项和整个编译的流程,可以直接用,也可以参考: https://github.com/SkeLLLa/docker-ffmpeg-opencv h ...

  5. linux mpeg4ip 编译,CentOS6.2下编译mpeg4ip

    一.环境 1.操作系统版本 CentOS 6.2 64位 uname -a的输出: Linux localhost.localdomain 2.6.32-220.17.1.el6.x86_64 #1 ...

  6. linux mpeg4ip 编译,CentOS 6.2下编译mpeg4ip

    一.环境 1.操作系统版本 CentOS 6.2 64位 uname -a的输出: Linux localhost.localdomain 2.6.32-220.17.1.el6.x86_64 #1 ...

  7. linux编译ffmepg,在Ubuntu下编译FFmpeg

    在之前,我们成功地使用mingw+msys在Windows平台下编译FFmpeg(见 http://www.linuxidc.com/Linux/2014-11/109839.htm),并生成了ffp ...

  8. CentOS6.9 下编译安装MySQL5.7.19

    官网:https://www.mysql.com/ 下载地址:https://cdn.mysql.com//Downloads/MySQL-5.7/mysql-5.7.19.tar.gz 一.准备工作 ...

  9. linux 6.8 dns,CentOS6.8下安装DNS服务器

    CentOS6.8下安装DNS服务器 1.安装DNS服务器组件 安装bind # yum install bind bind-libs bind-utils bind-chroot 2.修改主配置文件 ...

最新文章

  1. 说说对npm的开发模式和生产模式的理解
  2. [转]大话企业级Android应用开发实战 音乐播放器的开发
  3. gradle拷贝静态资源文件_Gradle-操作文件文件拷贝
  4. sqlplus 镜像_【Docker】拉取Oracle 11g镜像配置
  5. 袁大头 如何辨别假货
  6. leetcode第21题: 合并两个有序链表
  7. Spring-jdbc-JdbcTemplate
  8. 谁说程序员的老婆和代码不可兼得?!
  9. Surfer格网文件裁剪
  10. C# 小票打印机 直接打印 无需驱动
  11. vscode超好玩好用的插件
  12. 怎么清楚计算机硬盘搜索记录,win7系统怎么清除搜索记录_windows7删除计算机搜索记录的方法...
  13. 2013年全国计算机一级上机,2013年全国高校计算机联合考试一级机试试题(1)
  14. 7-22 龟兔赛跑 (20分) Python
  15. 深入理解LINUX内核 第三版2.6 笔记
  16. 有道词典工具(命令行+GUI)
  17. shell脚本循环执行任务的脚本
  18. echarts 折线图随时间动态添加(能跳动)
  19. 神仙爱情!年轻富翁捐5亿科研经费,让女友不用申请项目,专心搞科研!
  20. Flink及Storm、Spark主流流框架比较-实时框架比较

热门文章

  1. 如何把音频文件音量调大?三种方法帮你放大音频音量
  2. x-ways forensics v20.0
  3. linux 设置时钟 教程,linux时钟同步入门教程
  4. python爬虫之下载电影(不是爱奇艺腾讯视频等平台哈)
  5. 在线制作思维导图,哪个思维导图网站简单好用?
  6. FS4060是一款具有升降压模式的充电管理芯片支持多串锂电池充电筋膜枪充电IC
  7. 百面机器学习--机器学习面试问题系列(四)降维
  8. sqlite函数大全
  9. esxi6.7虚拟机装服务器上不认u盘,vmware ESXi 6.7 识别不到USB 网卡(示例代码)
  10. PDF如何转换成EPUB格式?PDF转EPUB常用方法分享