CentOS下安装mplayer
技术支持服务电话:15308000360 【7x24提供运维服务,解决各类系统/软硬件疑难技术问题】
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权限)
tar jvxf all-20110131.tar.bz2.bz2
tar jvxf essential-amd64-20071007.tar.bz2
复制解码包(默认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权限)
错误提示:
./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.
解决方法:扩充当前硬盘,或将安装包转移到有够大容量的硬盘再编译。# 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
复制皮肤(默认MPlayer到/usr/local/share/mplayer/skins目录下找皮肤)
mv Blue/* /usr/local/share/mplayer/skins/default
虽然安装成功,但是使用起来却很烂,不知道是不是自己编译时没弄好????
好吧,下了1.1版本,
./configure
make
make install
和上面一样,配置解码包。
开始使用,郊果比enable gui好多了。
查看视频输出驱动列表:
[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
查看音频输出驱动列表:
[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
里面有详细说明~~~