as5安装mencoder过程中的错误解决

对linux系统不熟悉,在as5安装mencoder过程中非常的痛苦,安装时碰到了各种悲催的错误(有时也一个错误google了很久也没找到解决的办法),昨天终于算是把mencoder给装上去了,几天把我安装过程中出现的错误和解决写下来。
首先google搜到这边文章 http://blog.sina.com.cn/s/blog_4987199801009cff.html
首先需要安装好一些mencoder需要的编解码库:lame-3.97.tar.gz,xvidcore-1.1.3.tar.gz,x264-snapshot-20080522-2245.tar.bz2;
安装mplayer/mencoder:
http://www.mplayerhq.hu/design7/dload.html

Downloading MPlayer from Subversion
You can also get MPlayer via Subversion. Issue the following command to get the latest sources:
svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer
A directory named mplayer will be created in the current directory
[root@test ~]# svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer

有些慢不如直接下载tar.bz2的包
http://www1.mplayerhq.hu/MPlayer/releases/MPlayer-1.0rc2.tar.bz2
# tar -xjvf MPlayer-1.0rc2.tar.bz2
# cd MPlayer-1.0rc2
[root@test MPlayer-1.0rc2]# ./configure --prefix=/usr/local --enable-gui --enable-largefiles  --enable-gif --enable-png --enable-jpeg --language=zh_CN --codecsdir=/usr/lib/codecs/
在这过程配置有 错误1:Error: The GUI requires libavcodec with PNG support (needs zlib).
解决1:参考这边文章 http://hi.baidu.com/yfdwdnyiu/blog/item/9618f01817c7a40f34fa4155.html/cmtid/c35c6fa8c79099bfcb130cfe
#yum install zlib*
yum install gtk+* -y
yum install gtk+-* -y
配置通过以后,接着make
错误2:--enable-gif --enable-png --enable-jpeg这3个配置引起的错误
解决2:参考这边文章 http://blog.csdn.net/absurd/article/details/646546
继续make,继续报 错误3:syntax error before ‘nut_context_t’。。。这个错误找了很久才发现是libnut安装的库文件libnut.h上根本就没有nut_context_t而是nut_context_tt,nut_stream_header_t是nut_stream_header_tt
解决3:把libmpdemux/demux_nut中所有用到nut_context_t和nut_stream_header_t改成nut_context_tt和nut_stream_header_tt
继续make,继续报 错误4:b_bframe_adaptive,b_bframe_adaptive,b_bidir_me,b_bframe_rdo找不到,是由于我在安装mencoder之前,我装过ffmpeg参考这边文章 http://hi.baidu.com/changjiajia/blog/item/5528ff8af798586d9e2fb4e8.html,已经装了很多编解码库,也装过lame和x264。在这里我又安装了1次x264这个,这个x264-snapshot-20080522-2245.tar.bz2跟之前安装的x264版本不一样,默认读了之前安装的x264的库文件x264.h。
解决4:我是把从x264-snapshot-20080522-2245.tar.bz2解压后的x264.h中这些参数加到读的库文件x264.h中。
继续make,没有报错,终于安装成功,真TMD太不容易了  。这个找资料过程中花了我很多很多的时间,有些问题google出来都是千篇一律的,有的错误一搜还没有中文的,英语网站看了也不是很明白。

猜你喜欢

转载自zfl110.iteye.com/blog/1144291