linux下搞定 mplayer

linux下搞定 mplayer

1.下载相关codes ( http://www.mplayerhq.hu/MPlayer/ ) 主要都在这里

Mplayer-1.0rc1.tar.bz2(主程序)( http://www.mplayerhq.hu/MPlayer/releases/MPlayer-1.0rc1.tar.bz2 )

Abyss-1.6.tar.bz2 (皮肤) (http://www2.mplayerhq.hu/MPlayer/skins/Abyss-1.6.tar.bz2)

all-20060611.tar.bz2(http://www.mplayerhq.hu/MPlayer/ ... ll-20060611.tar.bz2 )

windows-all-20060611.zip(建议不要在win下使用. rar,用. zip)

( http://www.mplayerhq.hu/MPlayer/ ... ws-all-20060611.zip )

这是我的mplayer的一些组件,你可以去http://www.mplayerhq.hu/MPlayer/ 下载你自己喜欢的皮肤和字体.

2.安装过程(请把你的终端打开)

a.安装相应的解码

进入主目录后,以root身份安装 ,这样改变身份:在终端输入su或者su root ,然后输入密码就ok啦,有没有看到 $ 变成了 #

接着

mkdir /usr/lib/codecs

mkdir /usr/lib/wincodecs

tar jxvf all-20060611.tar.bz2

mv all-20060611/* /usr/lib/codecs

unzip windows-all-20060611.zip

mv windows-all-20060611/* /usr/lib/wincodecs

b.安装mplayer

tar jxvf MPlayer-1.0rc1.tar.bz2

cd MPlayer-1.0rc1

./configure --prefix=/usr/local/mplayer --enable-gui --enable-freetype --with-codecsdir=/usr/lib/codecs/ --with-win32libdir=/usr/lib/wincodecs/ --language=zh_CN

注意:

--prefix=/usr/local/mplayer 是安装路径

--enable-gui 安装图形化用户界面

--enable-freetype 调节字体

--with-codecsdir=/usr/lib/codecs/

--with-win32libdir=/usr/lib/wincodecs 指定解码位置

--language=zh_CN 中文

接着

make

make install

c.安装皮肤

tar jxvf Abyss-1.6.tar.bz2

mv Abyss /usr/local/mplayer/share/mplayer/skins/

cd /usr/local/mplayer/share/mplayer/skins/

mv Abyss default

至此mplayer已经成为了万能播放器

执行程序在 /usr/local/mplayer/bin中

你可以在终端中输入gmplayer,也可以在桌面建立起动器来使用mplayer

赶紧运行一下,看看有没有问题

你一定会发现我们还没有装字体,运行mplayer后它也会提示没有字体

你就从自己电脑中拷个字体到主目录下的.mplayer文件夹下,并把你的字体改名为subfont.ttf,问题就解决了,或者做个链接也行,只要你喜欢

字体你可以上网下载,mplayer网站也有,你电脑里也有字体,在/usr/share/fonts/chinese下(/usr/share/fonts/chinese/TrueType/uming.ttf就可以用)你就直接cp /usr/share/fonts/chinese/TrueType/uming.ttf $HOME/.mplayer下

每个用户都有自己的环境变量HOME,再cd $HOME/.mplayer 接着

mv uming.ttf subfont.ttf 结束!
我只要make就会出现这种情况
引用:
./version.sh `cc -dumpversion`
cc -c -Wdeclaration-after-statement -fno-PIC -O4 -march=pentium-m -mtune=pentium-m -pipe -ffast-math -fomit-frame-pointer -D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include  -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT   -I/usr/include/freetype2 -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng12   -I.  -I./libavutil -I./libavcodec -o mplayer.o mplayer.c
cc -c -Wdeclaration-after-statement -fno-PIC -O4 -march=pentium-m -mtune=pentium-m -pipe -ffast-math -fomit-frame-pointer -D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include  -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT   -I/usr/include/freetype2 -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng12   -I.  -I./libavutil -I./libavcodec -o vobsub.o vobsub.c
make -C loader
make[1]: Entering directory `/home/reson/MPlayer-1.0rc1/loader'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/reson/MPlayer-1.0rc1/loader'
make -C loader/dshow
make[1]: Entering directory `/home/reson/MPlayer-1.0rc1/loader/dshow'
make[1]: `libDS_Filter.a' is up to date.
make[1]: Leaving directory `/home/reson/MPlayer-1.0rc1/loader/dshow'
make -C loader/dmo
make[1]: Entering directory `/home/reson/MPlayer-1.0rc1/loader/dmo'
make[1]: `libDMO_Filter.a' is up to date.
make[1]: Leaving directory `/home/reson/MPlayer-1.0rc1/loader/dmo'
make -C libavformat LIBPREF=lib LIBSUF=.a
make[1]: Entering directory `/home/reson/MPlayer-1.0rc1/libavformat'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/reson/MPlayer-1.0rc1/libavformat'
make -C libavcodec LIBPREF=lib LIBSUF=.a
make[1]: Entering directory `/home/reson/MPlayer-1.0rc1/libavcodec'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/reson/MPlayer-1.0rc1/libavcodec'
make -C libavutil LIBPREF=lib LIBSUF=.a
make[1]: Entering directory `/home/reson/MPlayer-1.0rc1/libavutil'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/reson/MPlayer-1.0rc1/libavutil'
make -C libmpdemux
make[1]: Entering directory `/home/reson/MPlayer-1.0rc1/libmpdemux'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/reson/MPlayer-1.0rc1/libmpdemux'
make -C stream
make[1]: Entering directory `/home/reson/MPlayer-1.0rc1/stream'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/reson/MPlayer-1.0rc1/stream'
make -C libmpcodecs
make[1]: Entering directory `/home/reson/MPlayer-1.0rc1/libmpcodecs'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/reson/MPlayer-1.0rc1/libmpcodecs'
make -C libao2
make[1]: Entering directory `/home/reson/MPlayer-1.0rc1/libao2'
make[1]: `libao2.a' is up to date.
make[1]: Leaving directory `/home/reson/MPlayer-1.0rc1/libao2'
make -C osdep
make[1]: Entering directory `/home/reson/MPlayer-1.0rc1/osdep'
make[1]: `libosdep.a' is up to date.
make[1]: Leaving directory `/home/reson/MPlayer-1.0rc1/osdep'
make -C libswscale LIBPREF=lib LIBSUF=.a
make[1]: Entering directory `/home/reson/MPlayer-1.0rc1/libswscale'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/reson/MPlayer-1.0rc1/libswscale'
make -C input
make[1]: Entering directory `/home/reson/MPlayer-1.0rc1/input'
make[1]: `libinput.a' is up to date.
make[1]: Leaving directory `/home/reson/MPlayer-1.0rc1/input'
make -C libvo
make[1]: Entering directory `/home/reson/MPlayer-1.0rc1/libvo'
make[1]: `libvo.a' is up to date.
make[1]: Leaving directory `/home/reson/MPlayer-1.0rc1/libvo'
make -C libaf
make[1]: Entering directory `/home/reson/MPlayer-1.0rc1/libaf'
make[1]: `libaf.a' is up to date.
make[1]: Leaving directory `/home/reson/MPlayer-1.0rc1/libaf'
make -C mp3lib
make[1]: Entering directory `/home/reson/MPlayer-1.0rc1/mp3lib'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/reson/MPlayer-1.0rc1/mp3lib'
make -C liba52
make[1]: Entering directory `/home/reson/MPlayer-1.0rc1/liba52'
make[1]: `liba52.a' is up to date.
make[1]: Leaving directory `/home/reson/MPlayer-1.0rc1/liba52'
make -C libmpeg2
make[1]: Entering directory `/home/reson/MPlayer-1.0rc1/libmpeg2'
make[1]: `libmpeg2.a' is up to date.
make[1]: Leaving directory `/home/reson/MPlayer-1.0rc1/libmpeg2'
make -C libfaad2
make[1]: Entering directory `/home/reson/MPlayer-1.0rc1/libfaad2'
make[1]: `libfaad2.a' is up to date.
make[1]: Leaving directory `/home/reson/MPlayer-1.0rc1/libfaad2'
make -C libdha
make[1]: Entering directory `/home/reson/MPlayer-1.0rc1/libdha'
make[1]: `libdha.so.1.0' is up to date.
make[1]: Leaving directory `/home/reson/MPlayer-1.0rc1/libdha'
make -C vidix
make[1]: Entering directory `/home/reson/MPlayer-1.0rc1/vidix'
make -C drivers
make[2]: Entering directory `/home/reson/MPlayer-1.0rc1/vidix/drivers'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/reson/MPlayer-1.0rc1/vidix/drivers'
make[1]: Leaving directory `/home/reson/MPlayer-1.0rc1/vidix'
make -C libmpdvdkit2
make[1]: Entering directory `/home/reson/MPlayer-1.0rc1/libmpdvdkit2'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/reson/MPlayer-1.0rc1/libmpdvdkit2'
make -C libass
make[1]: Entering directory `/home/reson/MPlayer-1.0rc1/libass'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/reson/MPlayer-1.0rc1/libass'
make -C Gui
make[1]: Entering directory `/home/reson/MPlayer-1.0rc1/Gui'
make[1]: `libgui.a' is up to date.
make[1]: Leaving directory `/home/reson/MPlayer-1.0rc1/Gui'
cc -Wdeclaration-after-statement -fno-PIC -O4 -march=pentium-m -mtune=pentium-m -pipe -ffast-math -fomit-frame-pointer -D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include  -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT   -I/usr/include/freetype2 -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng12   -I.  -I./libavutil -I./libavcodec -o mplayer mplayer.o m_property.o mp_msg.o asxparser.o codec-cfg.o cpudetect.o edl.o find_sub.o m_config.o m_option.o m_struct.o parser-cfg.o playtree.o playtreeparser.o spudec.o sub_cc.o subreader.o vobsub.o unrarlib.o mixer.o parser-mpcmd.o subopt-helper.o libvo/libvo.a libao2/libao2.a input/libinput.a  Gui/libgui.a -L/lib -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0   -L/lib -lglib-2.0   libmpcodecs/libmpcodecs.a loader/libloader.a loader/dshow/libDS_Filter.a loader/dmo/libDMO_Filter.a libaf/libaf.a libmpdemux/libmpdemux.a stream/stream.a libswscale/libswscale.a osdep/libosdep.a -Wl,-z,noexecstack  -Llibmpdvdkit2 -lmpdvdkit  libavformat/libavformat.a  libavcodec/libavcodec.a  libavutil/libavutil.a  libpostproc/libpostproc.a          -lpng -lz -lz -ljpeg -lasound -ldl -lpthread       -lncurses      -lungif  -lsmbclient     -lpthread -ldl -rdynamic  -lm    libfaad2/libfaad2.a  mp3lib/libMP3.a liba52/liba52.a libmpeg2/libmpeg2.a tremor/libvorbisidec.a libass/libass.a -lfontconfig -lfreetype  -lGL -ldl -lXxf86dga -lXv  -lXxf86vm -lXinerama  -lXext -lX11  -lpthread  -L/usr/lib -lSDL -lpthread       vidix/libvidix.a  -lesd -laudiofile -lm         
Gui/libgui.a(interface.o): In function `guiInit':
interface.c:(.text+0xae7): undefined reference to `vo_setwindow'
collect2: ld returned 1 exit status
make: *** [mplayer] 错误 1
我前面的configure结果是这样的:
引用:
[root@reson MPlayer-1.0rc1]# ./configure --prefix=/usr/local/mplayer --enable-gui --enable-freetype --with-codecsdir=/usr/lib/codecs/ --with-win32libdir=/usr/lib/wincodecs/ --language=zh_CN
Detected operating system: Linux
Detected host architecture: i386
Checking for cc version ... 4.1.1, ok
Checking for host cc ... cc
Checking for cross compilation ... no
Checking for CPU vendor ... GenuineIntel (6:14:8)
Checking for CPU type ...  Genuine Intel(R) CPU           T2300  @ 1.66GHz
Checking for GCC & CPU optimization abilities ... pentium-m
Checking for kernel support of mmx ... yes
Checking for kernel support of mmxext ... yes
Checking for kernel support of sse ... yes
Checking for kernel support of sse2 ... yes
Checking for mtrr support ... yes
Checking for assembler support of -pipe option ... yes
Checking for compiler support of named assembler arguments ... yes
Checking for assembler (as 2.17.50.0.3) ... ok
Checking for .align is a power of two ... no
Checking for Linux kernel version ... 2.6.18-1.2798.fc6, ok
Checking for MPlayer binary name ... mplayer
Checking for awk ... gawk
Checking for extra headers ... none
Checking for extra libs ... none
Checking for -lposix ... no
Checking for -lm ... yes
Checking for langinfo ... yes
Checking for language ... using zh_CN (man pages:  en)
Checking for enable sighandler ... yes
Checking for runtime cpudetection ... no
Checking for restrict keyword ... __restrict
Checking for __builtin_expect ... yes
Checking for kstat ... no
Checking for posix4 ... no
Checking for lrintf ... yes
Checking for round ... yes
Checking for nanosleep ... yes
Checking for socklib ... yes
Checking for inet_pton() ... yes (using )
Checking for inttypes.h (required) ... yes
Checking for int_fastXY_t in inttypes.h ... yes
Checking for word size ... 32
Checking for stddef.h ... yes
Checking for malloc.h ... yes
Checking for memalign() ... yes
Checking for alloca.h ... yes
Checking for mman.h ... yes
Checking for dynamic loader ... yes
Checking for dynamic a/v plugins support ... no
Checking for pthread ... yes (using -lpthread)
Checking for rpath ... no
Checking for iconv ... yes
Checking for sys/soundcard.h ... yes
Checking for sys/dvdio.h ... no
Checking for sys/cdio.h ... no
Checking for linux/cdrom.h ... yes
Checking for dvd.h ... no
Checking for termcap ... yes (using -lncurses)
Checking for termios ... yes (using sys/termios.h)
Checking for shm ... yes
Checking for linux devfs ... no
Checking for scandir() ... yes
Checking for strsep() ... yes
Checking for strlcpy() ... no
Checking for strlcat() ... no
Checking for fseeko() ... yes
Checking for localtime_r() ... yes
Checking for vsscanf() ... yes
Checking for swab() ... yes
Checking for POSIX select() ... yes
Checking for gettimeofday() ... yes
Checking for glob() ... yes
Checking for setenv() ... yes
Checking for sys/sysinfo.h ... yes
Checking for Samba support (libsmbclient) ... yes
Checking for 3dfx ... no
Checking for tdfxfb ... no
Checking for s3fb ... no
Checking for tdfxvid ... no
Checking for tga ... yes
Checking for DirectFB ... no
Checking for X11 headers presence ... yes (using /usr/include)
Checking for X11 ... yes
Checking for DPMS ... yes (using Xdpms 4)
Checking for Xv ... yes
Checking for XvMC ... no
Checking for Xinerama ... yes
Checking for Xxf86vm ... yes
Checking for XF86keysym ... yes
Checking for DGA ... 2 (using DGA 2.0)
Checking for OpenGL ... yes
Checking for /dev/mga_vid ... no
Checking for xmga ... no
Checking for GGI ... no
Checking for GGI extension: libggiwmh ... no
Checking for AA ... no
Checking for CACA ... no
Checking for SVGAlib ... no
Checking for FBDev ... no
Checking for DVB ... no
Checking for DVB HEAD ... yes
Checking for PNG support ... yes
Checking for JPEG support ... yes
Checking for PNM support ... yes
Checking for GIF support ... yes
Checking for broken giflib workaround ... disabled
Checking for VESA support ... no
Checking for SDL ... yes (using sdl-config)
Checking for NAS ... no
Checking for DXR2 ... no
Checking for DXR3/H+ ... no
Checking for IVTV TV-Out ... no
Checking for libfame ... no
Checking for OSS Audio ... yes
Checking for aRts ... no
Checking for EsounD ... yes
Checking for esd_get_latency() ... yes
Checking for Polyp ... no
Checking for JACK ... no
Checking for OpenAL ... no
Checking for ALSA audio ... yes (using alsa 1.0.x and alsa/asoundlib.h)
Checking for Sun audio ... no
Checking for VCD support ... yes
Checking for DVD support (libdvdnav) ... no
Checking for DVD support (libmpdvdkit2) ... yes
Checking for DVD support (libdvdread) ... no (disabled by libmpdvdkit2)
Checking for cdparanoia ... no
Checking for libcdio ... no
Checking for bitmap font support ... yes
Checking for freetype >= 2.0.9 ... yes
Checking for fontconfig ... yes
Checking for SSA/ASS support ... yes
Checking for fribidi with charsets ... no
Checking for ENCA ... no
Checking for zlib ... yes
Checking for RTC ... yes
Checking for external liblzo support ... no
Checking for mad support ... no
Checking for Toolame ... no
Checking for Twolame ... no
Checking for OggVorbis support ... yes (internal Tremor)
Checking for libspeex (version >= 1.1 required) ... no
Checking for OggTheora support ... no
Checking for mp3lib support ... yes
Checking for liba52 support ... yes
Checking for libdts support ... no
Checking for libmpeg2 support ... yes
Checking for libmpcdec (musepack, version >= 1.2.1 required) ... no
Checking for FAAC (AAC encoder) support ... no
Checking for FAAD2 (AAC) support ... yes (internal floating-point)
Checking for LADSPA plugin support ... no
Checking for Win32 codec DLL support ... yes (using /usr/lib/wincodecs/)
Checking for Win32 loader support ... yes
Checking for XAnim DLL ... yes (using /usr/lib/codecs/)
Checking for RealPlayer DLL ... yes (using /usr/lib/codecs/)
Checking for LIVE555 Streaming Media libraries ... no
Checking for FFmpeg libavutil (static) ... yes
Checking for FFmpeg libavcodec (static) ... yes
Checking for FFmpeg libavformat (static) ... yes
Checking for FFmpeg libpostproc (static) ... yes
Checking for md5sum support ... yes
Checking for AMR narrowband ... no
Checking for AMR narrowband, fixed point ... no
Checking for AMR wideband ... no
Checking for libdv-0.9.5+ ... no
Checking for zr ... no
Checking for bl ... no
Checking for XviD ... no
Checking for x264 ... no
Checking for nut ... no
Checking for libmp3lame (for mencoder) ... no
Checking for mencoder ... yes
Checking for fastmemcpy ... yes
Checking for UniquE RAR File Library ... yes
Checking for TV interface ... yes
Checking for Video 4 Linux TV interface ... yes
Checking for Video 4 Linux 2 TV interface ... yes
Checking for Radio interface ... no
Checking for Capture for Radio interface ... no
Checking for Video 4 Linux 2 Radio interface ... no
Checking for Video 4 Linux Radio interface ... no
Checking for Video 4 Linux 2 MPEG PVR interface ... yes
Checking for audio select() ... yes
Checking for network ... yes
Checking for ftp ... yes
Checking for vstream client ... no
Checking for byte order ... little-endian
Checking for OSD menu ... no
Checking for QuickTime codecs ... yes
Checking for Subtitles sorting ... yes
Checking for XMMS inputplugin support ... no
Checking for inet6 ... yes
Checking for gethostbyname2 ... yes
Checking for GUI ... yes
Checking for XShape extension ... yes
Checking for GTK+ version ... 2.10.4
Checking for glib version ... 2.12.3
Checking for automatic gdb attach ... no
Checking for compiler support for -fno-PIC ... yes
Checking for compiler support for noexecstack ... yes
Checking for ftello() ... yes
Checking for VIDIX (internal) ... yes
Checking for VIDIX (external) ... no
Checking for joystick ... no
Checking for lirc ... no
Checking for lircc ... no
Creating config.mak
Creating config.h

Config files successfully generated by ./configure !

  Install prefix: /usr/local/mplayer
  Data directory: /usr/local/mplayer/share/mplayer
  Config direct.: /usr/local/mplayer/etc/mplayer

  Byte order: little-endian
  Optimizing for: pentium-m mmx mmxext sse sse2 mtrr

  Languages:
    Messages/GUI: zh_CN
    Manual pages:  en

  Enabled optional drivers:
    Input: ftp network pvr tv-v4l2 tv-v4l tv mpdvdkit2 vcd dvb smb
    Codecs: qtx libavcodec real xanim win32 faad2 libmpeg2 liba52 mp3lib tremor(internal) gif
    Audio output: alsa esd oss sdl mpegpes(dvb)
    Video output: xvidix cvidix md5sum sdl gif89a pnm jpeg png mpegpes(dvb) opengl dga xv x11 xover tga
    Audio filters:
  Disabled optional drivers:
    Input: vstream radio live555 cdda dvdread dvdnav
    Codecs: x264 xvid libdv amr_wb amr_nb faac musepack libdts libtheora speex twolame toolame libmad liblzo
    Audio output: sun openal jack polyp arts ivtv dxr2 nas
    Video output: winvidix bl zr zr2 ivtv dxr3 dxr2 vesa fbdev svga caca aa ggi xmga mga xvmc dfbmga directfb tdfx_vid s3fb tdfxfb 3dfx
    Audio filters: ladspa

'config.h' and 'config.mak' contain your configuration options.
Note: If you alter theses files (for instance CFLAGS) MPlayer may no longer
      compile *** DO NOT REPORT BUGS if you tweak these files ***

'make' will now compile MPlayer and 'make install' will install it.
Note: On non-Linux systems you might need to use 'gmake' instead of 'make'.

Please check mtrr settings at /proc/mtrr (see DOCS/HTML/en/video.html#mtrr)


Check configure.log if you wonder why an autodetection failed (check whether
the development headers/packages are installed).
Do not report compilation errors if you used any of the --enable-* options
(except --enable-gui and maybe --enable-debug).

If you suspect a bug, please read DOCS/HTML/en/bugreports.html.
大哥,你要帮帮我呀,我装了2天了…………看着教程装都还没装好…………
没人理我,自己再顶一下!
不错,学习了,顶!