Linux下ffmpeg的依赖库安装

项目需要添加ffmpeg功能,折腾完mark一下,以下是期间收集的一些资料,仅供参考

首先要安装各种解码器 


1、lame 
lame-3.99.5.tar.gz 
Url:http://sourceforge.net/project/showfiles.php?group_id=290&package_id=309 
安装方法如下:

1     tar -zxvf lame-3.99.5.tar.gz  
2     cd lame-3.99.5  
3     ./configure --enable-shared 
4     make  
5     make install  

2、libogg 
libogg-1.3.1.tar.gz 
Url:http://www.xiph.org/downloads/ 
安装方法如下:

1     ./configure --enable-shared 
2     make  
3     make install  

3、libvorbis 
libvorbis-1.3.3.tar.gz 
Url:http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.3.tar.gz

(libvorbis依赖于libogg, 所以libogg必须先于libvorbis安装)
安装方法如下:

1     ./configure --enable-shared 
2     make  
3     make install  

4、xvid 
xvidcore-1.3.2.tar.gz 
Url:http://downloads.xvid.org/downloads/xvidcore-1.3.2.tar.gz 
安装方法如下:

1     tar zvxf xvidcore-1.3.2.tar.gz  
2     cd xvidcore-1.3.2/build/generic  
3     ./configure --enable-shared
4     make  
5     make install  

5、x264  
latest_x264.tar.bz2 (其中包含的目录是 x264-snapshot-20131023-2245) 
Url:http://www.videolan.org/developers/x264.html 
ftp://ftp.videolan.org/pub/videolan/x264/snapshots/ 
安装方法如下:

1
2
3
4
1    tar -jxvf latest_x264.tar.bz2
2 ./configure --enable-shared
3     make 
4     make install 

 

6、libdts 
libdca-0.0.5.tar.bz2
Url: http://www.videolan.org/developers/libdca.html
安装方法:

1     tar -jxvf libdca-0.0.5.tar.bz2 
2     cd libdca-0.0.5  
3     ./configure --enable-shared 
4     make  
5     make install  

7、a52 
a52dec-0.7.4.tar.gz        
http://liba52.sourceforge.net/downloads.html       
安装方法:

1     ./configure --enable-shared 
2     make  
3     make install  

8、faad2 
faad2-2.7.tar.gz 
http://www.audiocoding.com/downloads.html 
安装方法

1     autoreconf -vif  
2     ./configure  --with-mp4v2 --enable-shared  
3     make  
4     make install  

9、faac 
faac-1.28.tar.gz 
http://www.audiocoding.com/downloads.html
安装方法:

1     tar zxvf faac-1.28.tar.gz  
2     cd faac-1.28  
3     ./bootstrap  
4     ./configure 5     make   
6     make install  

12、最关键的一步, 安装ffmpeg

 
 
1
2
3
1   configuration: --enable-shared --prefix=/{ffmpegpath}/ffmpeg-2.8 --enable-libmp3lame --enable-gpl --enable-version3 --enable-nonfree --enable-pthreads --enable-libx264 --enable-libfaac --enable-postproc --enable-ffserver --enable-ffplay --enable-avfilter
2   make 
3   make install 

安装完之后, 运行ffmpeg成功, ./ffmpeg -version 输出如下:
1
2
3
4
5
6
7
ffmpeg version 2.8 Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-4)
configuration: --enable-shared --prefix=/ {ffmpegpath}/ffmpeg-2.8 --enable-libmp3lame --enable-gpl --enable-version3 --enable-nonfree --enable-pthreads --enable-libx264 --enable-libfaac --enable-postproc --enable-ffserver --enable-ffplay --enable-avfilter
libavutil      54. 31.100 / 54. 31.100
libavcodec     56. 60.100 / 56. 60.100
libavformat    56. 40.101 / 56. 40.101
libavdevice    56.  4.100 / 56.  4.100
libavfilter     5. 40.101 /  5. 40.101
libswscale      3.  1.101 /  3.  1.101
libswresample   1.  2.101 /  1.  2.101
libpostproc    53.  3.100 / 53.  3.100

参考页面

https://www.cnblogs.com/wanghetao/p/3386311.html

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值