ffmpeg编译安装v0.6.3

来源:互联网 发布:说话的软件 编辑:程序博客网 时间:2024/06/06 07:50

在http://www.ffmpeg.org/download.html 下载ffmpeg0.6.3版本或使用上传的文件


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

1
2
3
4
5
#tar zxvf ffmpeg-0.6.3.tar.gz
#cd ffmpeg-0.6.3
#./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

保存后,运行以下命令

01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
# 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

可能报如下错误:

ffmpeg: relocation error: /usr/local/lib/libavdevice.so.52: symbol av_new_packet, version LIBAVCODEC_52 not defined in file libavcodec.so.52 with link time reference

可以用下面这条语句解决

http://forum.ovh.de/showthread.php?t=9692

export LD_LIBRARY_PATH=/usr/local/lib/

在~/.bashrc中写入上面这句,再运行

. ~/.bashrc

就一次性OK了。



原创粉丝点击