设为首页 收藏本站
查看: 691|回复: 0

[经验分享] Centos 6.6 的FFmpeg简单安装文档

[复制链接]

尚未签到

发表于 2018-4-27 07:39:14 | 显示全部楼层 |阅读模式
  一、安装工具包   yum install -y automake autoconf libtool gcc gcc-c++
  所有安装包的下载地址:http://pan.baidu.com/s/1hriJB5U
  二、安装具体步骤

  1、lame
  wget http://downloads.sourceforge.net/project/lame/lame/3.99/lame-3.99.5.tar.gz
  (安装lame-3.99.5.tar.gz, 以免在第三步的时候出现ERROR:libmp3lame >= 3.98.3 not found错误, 需要提前安装lame.)
  #tar xzvf lame-3.99.5.tar.gz
  #cd lame-3.99.5
  #./configure --enable-nasm   --prefix=/usr
  #make
  #make install
  2、libogg
  libogg-1.1.3.tar.gz Url:http://downloads.xiph.org/releases/ogg/libogg-1.1.3.tar.gz
  安装方法如下:
  1. ./configure --prefix=/usr   
  2. make   
  3. make install  
  3、libvorbis
  libvorbis-1.1.2.tar.gz Url:http://downloads.xiph.org/releases/vorbis/libvorbis-1.1.2.tar.gz 安装方法如下:
       1. ./configure --prefix=/usr   
  2. make   
  3. make install  
  4、xvid
  xvidcore-1.1.3.tar.gz Url:http://downloads.xvid.org/downloads/xvidcore-1.1.3.tar.gz 安装方法如下:
  1. tar zvxf xvidcore-1.1.3.tar.gz   
  2. cd xvidcore-1.1.3/build/generic   
  3. ./configure --prefix=/usr   
  4. make   
  5. make install  
  5、x264
  x264-snapshot-20071107-2245.tar.bz2
  Url:http://www.videolan.org/developers/x264.htmlftp://ftp.videolan.org/pub/videolan/x264/snapshots/ 安装方法如下:
  1. bunzip2 x264-snapshot-20070913-2245.tar.bz2   
  2. tar xvf x264-snapshot-20070913-2245.tar   
  3. ./configure --prefix=/usr --enable-shared
  Found yasm 1.0.0.2319
Minimum version is yasm-1.2.0
If you really want to compile without asm, configure with --disable-asm.
说明yasm的版本低了,可以下一个高一点的版本:
  http://yasm.tortall.net/releases/Release1.2.0.html
[root@localhost x264-snapshot-20130301-2245-stable]# cd ..
[root@localhost ffmpeg]# tar zxvf yasm-1.2.0.tar.gz ; rm -rf yasm-1.2.0.tar.gz
[root@localhost ffmpeg]# cd yasm-1.2.0
[root@localhost yasm-1.2.0]# ./configure --prefix=/usr
[root@localhost yasm-1.2.0]# make
[root@localhost yasm-1.2.0]# make install
[root@localhost yasm-1.2.0]# cd ../x264-snapshot-20130301-2245-stable/
[root@localhost x264-snapshot-20130301-2245-stable]#
      4. ./configure --prefix=/usr --enable-shared  
  5. make   
  6. make install
  

  6、libdts
  libdts-0.0.2.tar.gz http://download.videolan.org/pub/videolan/libdca/0.0.2/libdca-0.0.2.tar.gz
  安装方法:
  1. tar zxvf libdts-0.0.2.tar.gz   
  2. cd libdts-0.0.2  
  3. ./configure --prefix=/usr   
  4. make   
  5. make install  
  7、a52
  a52dec-0.7.4.tar.gz http://liba52.sourceforge.net/downloads.html 安装方法:
  1. ./configure --prefix=/usr   
  2. make   
    3. make install  
  

  8、faad2
  faad2-2.6.1.tar.gz http://www.audiocoding.com/downloads.html 安装方法
      1. autoreconf -vif   
      2. ./configure --prefix=/usr --with-mp4v2 --enable-shared   
      3. make   
      4. make install  
  9、faac
  faac-1.26.tar.gz http://linux.softpedia.com/progDownload/FAAC-Download-554.html 安装方法:
  yum install -y aclocal autoheader libtoolize automake autoconf libtool
      1. tar zxvf faac-1.26.tar.gz   
      2. cd faac   
      3. ./bootstrap   
      4. ./configure --prefix=/usr   
      5. make   
      6. make install  
  
In file included from mp4common.h:29:0,from 3gp.cpp:28:
mpeg4ip.h:126:58: error: new declaration ‘char* strcasestr(const char*, const char*)’ /usr/include/string.h:369:28: error: ambiguates old declaration ‘const char* strcasestr(const char*, const char*)’
make[3]: *** [3gp.o] Error 1
make[3]: Leaving directory `/usr/local/pc/ffmpeg/faac-1.28/common/mp4v2'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/local/pc/ffmpeg/faac-1.28/common'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/pc/ffmpeg/faac-1.28'
make: *** [all] Error 2
解决方法:
修改源文件common/mp4v2/mpeg4ip.h文件
注释掉://char *strcasestr(const char *haystack, const char *needle);这一行
重新编译:
[root@localhost faac-1.28]# make clean ; make
[root@localhost faac-1.28]# make install
  

  ffmpeg开启libfdk_aac和libmp3lame

  http://ffmpeg.org/trac/ffmpeg/wiki/AACEncodingGuide
http://yasm.tortall.net/Download.html
git clone --depth 1 git://github.com/mstorsjo/fdk-aac.git
  cd fdk-aac
  autoreconf -fiv
  ./configure --enable-shared
  make && make install
  编译ffmpeg需要加上的参数
  ./configure --enable-libfdk_aac --enable-nonfree --enable-libmp3lame
  10、ffmpeg
  解压ffmpeg  tar jxvf ffmpeg-2.8.1.tar.bz2
  ./configure --prefix=/usr --enable-gpl --enable-shared --enable-libmp3lame  --enable-libvorbis --enable-libx264     --enable-libfdk_aac --enable-nonfree  --enable-pthreads

  make && make install
  ./configure --enable-libfdk_aac --enable-nonfree --enable-libmp3lame



ffmpeg正常安装后执行ffmpeg时出现如下错误:
ffmpeg: error while loading shared libraries: libavdevice.so.53: cannot open shared object file: No such file or directory
解决办法:
vi /etc/ld.so.conf
加入:/usr/local/lib
执行ldconfig
  

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-452465-1-1.html 上篇帖子: Centos手动编写service命令脚本(运行原理) 下篇帖子: Centos yum异常问题
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表