|
|
刚刚在CentOS4下装了MPlayer 1.0pre7觉得不错,看了有fc3下的安装,借此写下CentOS4的,和fc3基本是一样的:
1.下载文件(下载到如/tmp目录下总共大概有约20M)
1)源代码MPlayer v1.0pre7 source
http://www4.mplayerhq.hu/MPlayer/releases/MPlayer-1.0pre7.tar.bz2
2)all codecs for Linux x86
http://www4.mplayerhq.hu/MPlayer ... ll-20050412.tar.bz2
3)all codecs for Windows
http://www4.mplayerhq.hu/MPlayer ... ws-all-20050412.zip
4)LIVE.COM Streaming Media(可选支持RTSP)
http://live.com/liveMedia/public/live-latest.tar.gz
5)皮肤(我选neutron图见http://www.mplayerhq.hu/homepage/images/skin-neutron-shot01.jpg)
http://www1.mplayerhq.hu/MPlayer/Skin/neutron-1.5.tar.bz2 (可以选择自己喜欢的到http://www.mplayerhq.hu/homepage/design7/dload.html)
2.打开终端解压下载的文件(安装目录可根据自己情况及喜好而定如prefix=/urs/local)
1)[root@localhost ~]# cd /tmp
2)安装linux音频视频编码解码文件
[root@localhost tmp]# tar jxvf all-20050412.tar.bz2
[root@localhost tmp]# mv all-20050412 /usr/local/lib/codecs
3)安装windows音频视频编码解码文件
[root@localhost tmp]# unzip -x windows-all-20050412.zip
[root@localhost tmp]# mv windows-all-20050412.zip /usr/local/lib/wincodecs
4)安装liveMedia
[root@localhost tmp]# tar zxvf live-latest.tar.gz
[root@localhost tmp]# cd live
[root@localhost live]# ./genMakefiles linux
//如果你的gcc版本为3.0或者更高可加上-Wno-deprecated参数
[root@localhost live]# make;cd ..
[root@localhost tmp]# cp -r live /usr/local/lib
//要是你以前有livemedia,最好现删除它再装新的参考http://live.com/liveMedia/
6)安装MPlayer 1.0pre7
[root@localhost tmp]# tar jxvf MPlayer-1.0pre7.tar.bz2
[root@localhost tmp]# cd MPlayer-1.0pre7
[root@localhost MPlayer-1.0pre7]# echo 'UTF-8' > help/help_mp-zh_CN.h.charset
//修改中文语言编码设置为UTF-8,用"locale"查看,如果你的locale显示为zh_CN.GB2312,就把上面的'UTF-8'换成'GB2312'编码
[root@localhost MPlayer-1.0pre7]# ./configure --help
Usage: ./configure [OPTIONS]...
Configuration:
-h, --help display this help and exit
Installation directories:
--prefix=DIR use this prefix for installing mplayer [/usr/local]
--bindir=DIR use this prefix for installing mplayer binary
[PREFIX/bin]
--datadir=DIR use this prefix for installing machine independent
data files (fonts, skins) [PREFIX/share/mplayer]
--mandir=DIR use this prefix for installing manpages [PREFIX/man]
--confdir=DIR use this prefix for installing configuration files
[PREFIX/etc/mplayer]
--libdir=DIR use this prefix for object code libraries [PREFIX/lib]
Optional features:
--disable-mencoder disable mencoder (a/v encoder) compilation [enable]
--enable-gui enable gmplayer compilation (GTK 1.2 GUI) [disable]
--enable-largefiles enable support for files > 2 GBytes [disable]
--enable-linux-devfs set default devices to devfs ones [disable]
--enable-termcap use termcap database for key codes [autodetect]
--enable-termios use termios database for key codes [autodetect]
--disable-iconv do not use iconv(3) function [autodetect]
--disable-setlocale disable setlocale using in mplayer [autodetect]
--disable-langinfo do not use langinfo [autodetect]
--enable-lirc enable LIRC (remote control) support [autodetect]
--enable-lircc enable LIRCCD (LIRC client daemon) input [autodetect]
--enable-joystick enable joystick support [disable]
--disable-vm disable support X video mode extensions [autodetect]
--disable-xf86keysym disable support for 'multimedia' keys [autodetect]
--disable-tv disable TV Interface (tv/dvb grabbers) [enable]
--disable-tv-v4l disable Video4Linux TV Interface support [autodetect]
--disable-tv-v4l2 disable Video4Linux2 TV Interface support [autodetect]
--disable-tv-bsdbt848 disable BSD BT848 Interface support [autodetect]
--disable-edl disable EDL (edit decision list) support [enable]
--disable-rtc disable RTC (/dev/rtc) on Linux [autodetect]
--disable-network disable network support (for: http/mms/rtp) [enable]
--enable-winsock2 enable winsock2 usage [autodetect]
--enable-smb enable Samba (SMB) input support [autodetect]
--enable-live enable LIVE.COM Streaming Media support [autodetect]
--disable-dvdread Disable libdvdread support [autodetect]
--disable-mpdvdkit Disable mpdvdkit/mpdvdkit2 support [autodetect]
--disable-cdparanoia Disable cdparanoia support [autodetect]
--disable-freetype Disable freetype2 font rendering support [autodetect]
--disable-fontconfig Disable fontconfig font lookup support [autodetect]
--disable-unrarlib Disable Unique RAR File Library [enabled]
--enable-menu Enable OSD menu support (NOT DVD MENU) [disabled]
--disable-sortsub Disable subtitles sorting [enabled]
--enable-fribidi Enable using the FriBiDi libs [disabled]
--disable-enca Disable using ENCA charset oracle library [autodetect]
--disable-macosx Disable Mac OS X specific features [autodetect]
--enable-macosx-finder-support Enable Mac OS X Finder invocation parameter parsing [disabled]
--enable-macosx-bundle Enable Mac OS X bundle file locations [autodetect]
--disable-inet6 Disable IPv6 support [autodetect]
--disable-gethostbyname2 gethostbyname() function is not provided by the C
library [autodetect]
--disable-ftp Disable ftp support [enabled]
--disable-vstream Disable tivo vstream client support [autodetect]
Codecs:
--enable-gif enable gif support [autodetect]
--enable-png enable png input/output support [autodetect]
--enable-jpeg enable jpeg input/output support [autodetect]
--enable-liblzo enable external liblzo support [autodetect]
--disable-win32 disable Win32 DLL support [autodetect]
--disable-dshow disable Win32/DirectShow support [autodetect]
--disable-qtx disable Quicktime codecs [autodetect]
--disable-xanim disable XAnim DLL support [autodetect]
--disable-real disable RealPlayer DLL support [autodetect]
--disable-xvid disable XviD codec [autodetect]
--disable-x264 disable H.264 encoder [autodetect]
--disable-divx4linux disable DivX4linux/Divx5linux codec [autodetect]
--enable-opendivx enable _old_ OpenDivx codec [disable]
--disable-libavcodec disable libavcodec [autodetect]
--disable-libavformat disable libavformat [autodetect]
--enable-libfame enable libfame realtime encoder [autodetect]
--disable-internal-tremor do not build internal OggVorbis support [enabled]
--enable-tremor-low build with lower accuracy internal tremor [disabled]
--enable-external-tremor build with external tremor [disabled]
--disable-vorbis disable OggVorbis support entirely [autodetect]
--enable-theora build with OggTheora support [autodetect]
--disable-internal-matroska disable internal Matroska support [enabled]
--enable-external-faad build with external FAAD2 (AAC) support [autodetect]
--disable-internal-faad disable internal FAAD2 (AAC) support [autodetect]
--disable-ladspa disable LADSPA plugin support [autodetect]
--disable-libdv disable libdv 0.9.5 en/decoding support [autodetect]
--disable-mad disable libmad (MPEG audio) support [autodetect]
--disable-toolame disable Toolame (MPEG layer 2 audio) support in mencoder [autodetect]
--enable-xmms build with XMMS inputplugin support [disabled]
--disable-mp3lib disable builtin mp3lib [enabled]
--disable-liba52 disable builtin liba52 [enabled]
--enable-libdts enable libdts support [autodetect]
--disable-libmpeg2 disable builtin libmpeg2 [enabled]
--disable-amr_nb disable amr narrowband, floating point [autodetect]
--disable-amr_nb-fixed disable amr narrowband, fixed point [autodetect]
--disable-amr_wb disable amr wideband, floating point [autodetect]
Video output:
--disable-vidix disable VIDIX [enable on x86 *nix]
--enable-gl build with OpenGL render support [autodetect]
--enable-dga[=n] build with DGA [n in {1, 2} ] support [autodetect]
--enable-vesa build with VESA support [autodetect]
--enable-svga build with SVGAlib support [autodetect]
--enable-sdl build with SDL render support [autodetect]
--enable-aa build with AAlib render support [autodetect]
--enable-caca build with CACA render support [autodetect]
--enable-ggi build with GGI render support [autodetect]
--enable-directx build with DirectX support [autodetect]
--enable-dxr2 build with DXR2 render support [autodetect]
--enable-dxr3 build with DXR3/H+ render support [autodetect]
--enable-dvb build with support for output via DVB-Card [autodetect] --enable-dvbhead build with DVB support (HEAD version) [autodetect]
--enable-mga build with mga_vid (for Matrox G200/G4x0/G550) support
(check for /dev/mga_vid) [autodetect]
--enable-xmga build with mga_vid X Window support
(check for X & /dev/mga_vid) [autodetect]
--enable-xv build with Xv render support for X 4.x [autodetect]
--enable-xvmc build with XvMC acceleration for X 4.x [disable]
--enable-vm build with XF86VidMode support for X11 [autodetect]
--enable-xinerama build with Xinerama support for X11 [autodetect]
--enable-x11 build with X11 render support [autodetect]
--enable-fbdev build with FBDev render support [autodetect]
--enable-mlib build with MLIB support (Solaris only) [autodetect]
--enable-3dfx build with obsolete /dev/3dfx support [disable]
--enable-tdfxfb build with tdfxfb (Voodoo 3/banshee) support [disable]
--enable-directfb build with DirectFB support [autodetect]
--enable-zr build with ZR360[56]7/ZR36060 support [autodetect]
--enable-bl build with Blinkenlights support [disable]
--enable-tdfxvid build with tdfx_vid support [disable]
--disable-tga disable targa output support [enable]
--disable-pnm disable pnm output support [enable]
--disable-md5sum disable md5sum output support [enable]
Audio output:
--disable-alsa disable ALSA sound support [autodetect]
--disable-ossaudio disable OSS sound support [autodetect]
--disable-arts disable aRts sound support [autodetect]
--disable-esd disable esd sound support [autodetect]
--disable-polyp disable Polypaudio sound support [autodetect]
--disable-jack disable JACK sound support [autodetect]
--disable-nas disable NAS sound support [autodetect]
--disable-sgiaudio disable SGI sound support [autodetect]
--disable-sunaudio disable Sun sound support [autodetect]
--disable-win32waveout disable Windows waveout sound support [autodetect]
--disable-select disable using select() on audio device [enable]
Miscellaneous options:
--enable-runtime-cpudetection Enable runtime CPU detection [disable]
--cc=COMPILER use this C compiler to build MPlayer [gcc]
--host-cc=COMPILER use this C compiler to build apps needed for the build process [gcc]
--as=ASSEMBLER use this assembler to build MPlayer [as]
--target=PLATFORM target platform (i386-linux, arm-linux, etc)
--enable-static build a statically linked binary. Set further linking
options with --enable-static="-lslang -lncurses"
--charset convert the help messages to this charset
--language=list a white space or comma separated list of languages
for translated man pages, the first language is the
primary and therefore used for translated messages
and GUI (also the environment variable $LINGUAS is
honored) [en]
(Available: bg cs de dk el en es fr hu it ja ko mk nl no pl ro ru sk sv tr uk pt_BR zh_CN zh_TW all)
--enable-shared-pp install & use shared postprocessing lib
--with-install=PATH use a custom install program (useful if your OS uses
a GNU-incompatible install utility by default and
you want to use GNU version)
--install-path=PATH the path to a custom install program
this option is obsolete and will be removed soon,
use --with-install instead.
Advanced options:
--enable-mmx build with MMX support [autodetect]
--enable-mmx2 build with MMX2 support (PIII, Athlon) [autodetect]
--enable-3dnow build with 3DNow! support [autodetect]
--enable-3dnowex build with extended 3DNow! support [autodetect]
--enable-sse build with SSE support [autodetect]
--enable-sse2 build with SSE2 support [autodetect]
--enable-shm build with shm support [autodetect]
--enable-altivec build with Altivec support (PowerPC) [autodetect]
--disable-fastmemcpy disable 3DNow!/SSE/MMX optimized memcpy() [enable]
--enable-big-endian Force byte order to big-endian [autodetect]
--enable-debug[=1-3] compile debugging information into mplayer [disable]
--enable-profile compile profiling information into mplayer [disable]
--disable-sighandler disable sighandler for crashes [enable]
--enable-crash-debug enable automatic gdb attach on crash [disable]
--enable-i18n _experimental_ gnu gettext() support [autodetect]
--enable-dynamic-plugins Enable support for dynamic a/v plugins [disable]
Hazardous options a.k.a. "DO NOT REPORT ANY BUGS!"
--disable-gcc-checking disable gcc version checking [enable]
Use these options if autodetection fails (Options marked with (*) accept
multiple paths separated by ':'):
--with-extraincdir=DIR extra headers (png, mad, sdl, ...) in DIR (*)
--with-extralibdir=DIR extra library files (png, mad, sdl, ...) in DIR (*)
--with-x11incdir=DIR X headers in DIR (*)
--with-x11libdir=DIR X library files in DIR (*)
--with-dxr2incdir=DIR DXR2 headers in DIR (*)
--with-dvbincdir=DIR DVB headers in DIR (*)
--with-madlibdir=DIR libmad (libmad shared library) in DIR (*)
--with-mlibdir=DIR libmlib (MLIB support) in DIR (Solaris only)
--with-codecsdir=DIR Binary codec files in DIR
--with-win32libdir=DIR W*ndows DLL files in DIR
--with-xanimlibdir=DIR XAnim DLL files in DIR
--with-reallibdir=DIR RealPlayer DLL files in DIR
--with-xvidlibdir=DIR libxvidcore (XviD) in DIR (*)
--with-xvidincdir=DIR XviD header in DIR (*)
--with-x264libdir=DIR libx264 in DIR
--with-x264incdir=DIR x264 header in DIR
--with-dtslibdir=DIR libdts library in DIR (*)
--with-dtsincdir=DIR libdts header in DIR (*)
--with-livelibdir=DIR LIVE.COM Streaming Media libraries in DIR
--with-toolamedir=DIR path to Toolame library and include file
--with-xmmsplugindir=DIR XMMS plugins in DIR
--with-xmmslibdir=DIR libxmms.so.1 in DIR
--with-bio2jack=DIR libbio2jack.a in DIR
--with-cdparanoiaincdir=DIR cdparanoia headers in DIR (*)
--with-cdparanoialibdir=DIR cdparanoia libraries (libcdda_*) in DIR (*)
--with-xvmclib=NAME name of adapter-specific library (e.g. XvMCNVIDIA)
--with-termcaplib=NAME name of library with termcap functionality
name should be given without leading "lib"
checks for "termcap" and "tinfo"
--with-freetype-config=PATH path to freetype-config
(e.g. /opt/bin/freetype-config)
--with-fribidi-config=PATH path to fribidi-config
(e.g. /opt/bin/fribidi-config)
--with-glib-config=PATH path to glib*-config (e.g. /opt/bin/glib-config)
--with-gtk-config=PATH path to gtk*-config (e.g. /opt/bin/gtk-config)
--with-sdl-config=PATH path to sdl*-config (e.g. /opt/bin/sdl-config)
[root@localhost MPlayer-1.0pre7]# ./configure --language=zh_CN --charset=utf8 --enable-gui --target=i686-linux --enable-freetype --enable-i18n --enable-largefiles --with-codecsdir=/usr/local/lib/codecs --with-win32libdir=/usr/local/lib/wincodecs --disable-gcc-checking --enable-menu --enable-live --with-livelibdir=/usr/local/lib/live
//如果有xmms可加上--enable-xmms及--with-xmmsplugindir=/usr/lib/xmms/*** ,--with-xmmslibdir=/usr/lib选项
//同样'--language=zh_CN --charset=utf8'的'utf8'可变的
//如果不想用gui显示就去掉--enable-gui选项
//--target=i686-linux这个选项我还没发现有什么作用,可选可不选都可以,只是编译时没出错,当然用的gcc4编译不过
//如果你的系统装了gcc4,为了保险期间还是加上--disable-gcc-checking,否则编译几次都过不了(只要能编译过小错误还是可以容忍吧)其实最好少加些选项,一般是不会出错的
//--enable-menu不用说了,视频中用的,像电视机
[root@localhost MPlayer-1.0pre7]# make
[root@localhost MPlayer-1.0pre7]# make install
6)安装for gui皮肤
[root@localhost MPlayer-1.0pre7]#cd..;tar jxvf neutron-1.5.tar.bz2
[root@localhost tmp]# mv neutron /usr/local/share/mplayer/skin/neutron;ln -s /usr/local/share/mplayer/skin/neutron /usr/local/share/mplayer/skin/default
7)善后处理
[root@localhost MPlayer-1.0pre7]# vim /usr/local/share/applications/mplayer*
[Desktop Entry]
Type=Application
Encoding=UTF-8
Name=MPlayer
GenericName=Multimedia Player
Comment=Multimedia Player
Comment[de]=Multimedia Player
Comment[es]=Reproductor multimedia
Comment[fr]=Lecteur multimedia
Comment[it]=Lettore multimediale
Icon=/usr/local/share/pixmaps/mplayer-desktop.xpm //修改处1
TryExec=/usr/local/bin/gmplayer //修改处2
Exec=/usr/local/bin/gmplayer //修改处3
Terminal=false //修改处4
Categories=GNOME;KDE;GTK;Application;Multimedia;AudioVideo;Video layer;
[root@localhost MPlayer-1.0pre7]# cp /usr/local/share/applications/mplayer.desktop /usr/share/applications/mplayer.desktop;cp /usr/local/share/applications/mplayer.desktop ~/Desktop/mplayer.desktop
//在gnome菜单中和桌面显示,如果装在/usr下,而不是/usr/local(默认),那么不须要这一步,只改上一步vim /usr/share/applications/mplayer*
[root@localhost MPlayer-1.0pre7]# gmplayer &
接下来先运行一次,出现字体找不到,关闭
终端再运行:rm -rf ~/.mplayer/subfonts;ln -s /usr/share/fonts/zh_CN/TrueType/zysong.ttf ~/.mplayer/subfont.ttf
字体链接源文件可变
如有认识错误,请大家予以改正
谢谢! |
|