CentOS下安裝mplayer
技術(shù)支持服務(wù)電話:15308000360 【7x24提供運維服務(wù),解決各類系統(tǒng)/軟硬件疑難技術(shù)問題】
yum install mplayer mencoder
Error : yasm not found
下載mplayer源碼包:
[root@centos File]# wget http://www.mplayerhq.hu/MPlayer/releases/MPlayer-1.3.0.tar.xz
下載解碼包:
[root@centos File]# wget http://www.mplayerhq.hu/MPlayer/releases/codecs/all-20110131.tar.bz2
centos x64# wget http://www.mplayerhq.hu/MPlayer/releases/codecs/essential-amd64-20071007.tar.bz2
centos x64# wget http://www.mplayerhq.hu/MPlayer/releases/codecs/essential-amd64-20071007.tar.bz2
下載皮膚:
[root@centos File]# wget ftp://ftp.mplayerhq.hu/MPlayer/skins/Blue-1.8.tar.bz2
下載yasm編譯器:
[root@centos File]# wget http://www.tortall.net/projects/yasm/releases/yasm-1.2.0.tar.gz
解壓所有這些包。
首先,安裝yasm:
解壓后:
./configure
make && make install (用root權(quán)限)
tar jvxf all-20110131.tar.bz2.bz2
tar jvxf essential-amd64-20071007.tar.bz2
復(fù)制解碼包(默認MPlayer到/usr/local/lib/codecs/目錄下找解碼文件)
cp all-20110131/* /usr/local/lib/codecs/
cp essential-amd64-20071007/* /usr/local/lib/codecs/
cp essential-amd64-20071007/* /usr/local/lib/codecs/
yum -y install gtk+ gtk+-devel gtk2 gtk2-devel
然后:安裝mplayer:
解壓后:
./configure --prefix=/usr/local/mplayer --enable-gui --codecsdir=/usr/local/lib/codecs
./configure --prefix=/usr/local/mplayer --enable-gui --codecsdir=/usr/local/lib/codecs
make && make install (用root權(quán)限)
錯誤提示:
./configure: line 8324: cannot create temp file for here-document: No such file or directory
Creating config.h
./configure: line 8745: cannot create temp file for here-document: No such file or directory
make: *** osdep/: Is a directory. Stop.
解決方法:擴充當(dāng)前硬盤,或?qū)惭b包轉(zhuǎn)移到有夠大容量的硬盤再編譯。# PATH=/usr/local/mplayer/bin:$PATH
# export PATH
安裝過程以及錯誤解決:
確定已安裝gcc, zlib, libpng, gtk+, gtk+-devel
yum install gcc
解決Error: The GUI requires libavcodec with PNG support (needs zlib):
yum install zlib
yum install libpng
解決Error:X11 Support required for GUI compilation:
yum install gtk+
yum install gtk+-devel
配置mplayer
復(fù)制皮膚(默認MPlayer到/usr/local/share/mplayer/skins目錄下找皮膚)
mv Blue/* /usr/local/share/mplayer/skins/default
雖然安裝成功,但是使用起來卻很爛,不知道是不是自己編譯時沒弄好????
好吧,下了1.1版本,
./configure
make
make install
和上面一樣,配置解碼包。
開始使用,郊果比enable gui好多了。
查看視頻輸出驅(qū)動列表:
[user@centos ~]$ mplayer -vo help
MPlayer 1.1-4.1.2 (C) 2000-2012 MPlayer Team
Available video output drivers:
gl_nosw OpenGL no software rendering
x11 X11 ( XImage/Shm )
xover General X11 driver for overlay capable video output drivers
gl OpenGL
gl2 X11 (OpenGL) - multiple textures version
fbdev Framebuffer Device
fbdev2 Framebuffer Device
matrixview MatrixView (OpenGL)
xvidix X11 (VIDIX)
cvidix console VIDIX
null Null video output
mpegpes MPEG-PES to DVB card
yuv4mpeg yuv4mpeg output for mjpegtools
png PNG file
tga Targa output
pnm PPM/PGM/PGMYUV file
md5sum md5sum of each frame
查看音頻輸出驅(qū)動列表:
[user@centos ~]$ mplayer -ao help
MPlayer 1.1-4.1.2 (C) 2000-2012 MPlayer Team
Available audio output drivers:
oss OSS/ioctl audio output
mpegpes DVB audio output
null Null audio output
pcm RAW PCM/WAVE file writer audio output
[user@centos ~]$ mplayer -vo x11 -ao oss /media/E/FILM/***.rmvb
至于怎么控制,google 或者用
[user@centos ~]$ man mplayer
里面有詳細說明~~~