步青云

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

在Red Hat Enterprise Linux 6下编译Mplayer过程很忐忑,特记录一下:

首先

# wget http://www1.mplayerhq.hu/MPlayer/releases/MPlayer-1.0rc4.tar.bz2
# tar -zxvf MPlayer-1.0rc4.tar.bz2
# ./configure
# make

出现错误:

libmpcodecs/vd_mpng.c: In function 'pngReadFN':
libmpcodecs/vd_mpng.c:77: error: dereferencing pointer to incomplete type
libmpcodecs/vd_mpng.c: In function 'decode':
libmpcodecs/vd_mpng.c:114: error: dereferencing pointer to incomplete type
libmpcodecs/vd_mpng.c:131: error: dereferencing pointer to incomplete type
make: *** [libmpcodecs/vd_mpng.o] 错误 1

搜索半天,终于在谷歌上得到解惑,百度有点不给力:

Bug 354965 – media-video-mplayer fails to compile against media-libs-libpng-1_5_x

竟然是一BUG,没办法,只能用最新版的了。

# svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer
# ./configure

又有错误提示
No FFmpeg checkout, press enter to download one with git or CTRL+C to abort
解决方案:
You may need to install git client  and press enter  during the above warning time

直接回车,自动安装git获取FFmpeg

# ./configure 没办法,再来一次configure

错误

Error: yasm not found, use --yasm='' if you really want to compile without

说明YASM没有找到

# git clone git://github.com/yasm/yasm.git

# wget http://www.tortall.net/projects/yasm/releases/yasm-1.1.0.tar.gz

安装 yasm 后重新进入mplayer下

# make -j 2

我的机器是E5300双核


# make install

成功


# svn update
# ldconfig
# mplayer --help

完毕!

# mencoder -of lavf -ovc lavc -lavcopts vcodec=flv:vbitrate=500 -lavfopts format=flv -srate 22050 -oac mp3lame -lavcopts acodec=mp3:abitrate=56  PrettyGirlWillGotMarried.mpg -o  PrettyGirlWillGotMarried.flv -ofps 16

错误
MPlayer was compiled without libmp3lame support.

没安装lame
# wget http://sourceforge.net/projects/lame/files/lame/3.98.4/lame-3.98.4.tar.gz
# tar -zxvf lame-3.98.4.tar.gz
# cd lame-3.98.4
#  ./configure  --enable-shared
# make && make install

重新编译一遍Mplayer,成功

呵呵,压缩率50%

posted on 2011-06-23 11:38  步青云  阅读(1589)  评论(0编辑  收藏  举报