读书人

FFMpeg装配

发布时间: 2012-06-26 10:04:13 作者: rapoo

FFMpeg安装

?

FFmpeg安装

svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg

./configure --enable-shared --disable-yasm --prefix=/usr/local/ffmpeg

make && make install

cd /usr/lib

ln -s /usr/local/ffmpeg/lib/* .

?

?

ffmpeg正常安装后执行ffmpeg时出现如下错误:

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

?

获取MP3播放时间命令:

ffmpeg -i test.mp3 2>&1|grep Duration

or

ffprobe -show_format test.mp3|grep duration

参考资料:

http://www.linuxdiyf.com/viewarticle.php?id=104214

http://seaskys.iteye.com/blog/983341

http://hi.baidu.com/injava/blog/item/04580c4cbb32b1f9d72afcbb.html

http://www.oschina.net/code/snippet_220255_7784

http://iamcaihuafeng.blog.sohu.com/143419334.html

读书人网 >开源软件

热点推荐