从官网下载最新版的FFmpeg:​​http://www.ffmpeg.org/download.html​


目前最新版为ffmpeg v0.6.1

终端下依次运行以下命令:

​​#tar zxvf ffmpeg-0.6.1.tar.gz​​       


​​#cd ffmpeg-0.6.1​​


​​#./configure --prefix=/usr/local --enable-memalign-hack --enable-shared​​


​​#make​​


​​#make install​​



安装完成,运行ffmepg,提示以下错误信息:

ffmpeg: error while loading shared libraries: libavdevice.so.52: cannot open shared object file: No such file or directory

解决方法是用vi编辑/etc/ld.so.conf文件,末尾增加以下代码

​​/usr/local/lib​​


保存后,运行以下命令

​​# ldconfig​​       


​​# ffmpeg -version​​


​​FFmpeg version 0.6.1, Copyright (c) 2000-2010 the FFmpeg developers​​


​​built on Nov 23 2010 04:50:57 with gcc 4.4.5​​


​​configuration: --prefix=/usr/local --enable-memalign-hack --enable-shared​​


​​libavutil 50.15. 1 / 50.15. 1​​


​​libavcodec 52.72. 2 / 52.72. 2​​


​​libavformat 52.64. 2 / 52.64. 2​​


​​libavdevice 52. 2. 0 / 52. 2. 0​​


​​libswscale 0.11. 0 / 0.11. 0​​


​​FFmpeg 0.6.1​​


​​libavutil 50.15. 1 / 50.15. 1​​


​​libavcodec 52.72. 2 / 52.72. 2​​


​​libavformat 52.64. 2 / 52.64. 2​​


​​libavdevice 52. 2. 0 / 52. 2. 0​​


​​libswscale 0.11. 0 / 0.11. 0​​


参考资料:

1. ​​FFMEPG 安装​

2. ​​Ffmpeg快速安装​