怎样安装ffmpeg?
1,cd /usr/local/src
下载最新版本的ffmpeg:
svn checkout svn://g/trunk ffmpeg
2,cd ffmpeg
./configure
make && make install
以上是安装不带任何解码库的ffmpeg。
使用ffmpeg命令进行测试安装是否成功。例如:
ffmpeg --help
II,要加入则在./configure后面加上选项,前提是已经编译安装了这种编码库。例如:
./configure --enable-libmp3lame--enable-libvorbis --disable-mmx --enable-shared
测试的结果为:
[******@ip-208-109-221-163 ffmpeg]# ffmpeg --help
ffmpeg: error while loading shared libraries: libavdevic: cannot open shared object file: No such file or directory
找不到libavde。
解决方案:(成功解决问题的方案)
首先到/usr/local/lib/目录下去查看是否有libavdevice.,然后设置环境变量:
export LD_LIBRARY_PATH=/usr/local/lib/
注意:这种方案经验证,关闭终端再打开终端,这个环境变量就失效了,也就是说只对当前终端有效
最终解决方案:
//**********************************************
因为找不到库文件。编辑/etc/,加入一行:
/usr/local/lib
执行ldconfig命令即可。
//**************************************
然后添加软链接。
ln -s /usr/local/lib/libavdevic /usr/lib/libavdevic
安装成功后,测试:
ffmpeg -i /home/admn/public_html/ConvertVedioTest/ -ab 56 -ar 22050-b 500 -r 15 -qscale 4 -s 640*480
转换成功。
等等。
ln -s /usr/local/lib/libavforma /usr/lib/libavforma
ln -s /usr/local/lib/libavcodec. /usr/lib/libavcodec.
ln -s /usr/local/lib/libav /usr/lib/libav
ln -s /usr/local/lib/libmp3lame. /usr/lib/libmp3lame.
ln -s /usr/local/lib/libavforma /usr/lib/libavforma
最基本的需要这些东西:
FFMPEG
LAME Mp3 Audio Codec(Requred for mpg, flv, avi, wmv etc files)
AMR Audio Codec(Required for 3gp video files)
XVID Audio Codec
FFMPEG-PHP
安装FFMPEG-PHP:
FFMPEG-PHP# ./configure出现如下错误:??
checking for ffmpeg headers... configure: error: ffmpeg headers not found. Make sure you've built ffmpeg as shared libs using the --enable-shared option
解决方案:
换成ffmpeg-php-本进行安装,安装过程没有问题。
ffmp
linux下安装FFMPEG全纪录 来自淘豆网m.daumloan.com转载请标明出处.