论坛: UNIX系统 标题: 关于安装Mplayer问题 复制本贴地址    
作者: q8406654 [q8406654]    论坛用户   登录
win32 for linux的dll库是自带的吗 没有那在哪里下呢

地主 发表时间: 04-07-21 10:00

回复: TecZm [teczm]   版主   登录
?你在哪下的?我怎么没发现需要这东东?

B1层 发表时间: 04-07-21 15:30

回复: q8406654 [q8406654]   论坛用户   登录
mplayer是linux下播放速度最快,支持媒体格式最多的播放器,它几乎能播放所有的win媒体文件!下面介绍它的安装方法:
使用nvdia显卡的朋友请务必安装nvidia的for linux驱动,否则xv模式不能支持,虽然可以用sdl视频模式播放,但效果不理想。
1、下载mplayer的最新版本及安装所需软件包的集合包http://www.linuxfans.org/nuke/modul...op=getit&lid=23
2、unzip mplayer.zip
得到mplayer目录,cd mplayer,运行ls命令,应该可以看见divx4linux-20020418,arial-18,gcc3,default这四个目录(三个目录下各有一些文件,这里就不列出来了),及MPlayer-0.90pre5.tar,w32codec-0.60.tar,SDL-1.2.3-1.i686.rpm,SDL-devel-1.2.3-1.i686.rpm这四个文件
3、升级gcc:
检查你的gcc版本,运行gcc -v看输出是多少,如果是3.0以下的话,则建议安装gcc3.0以上(根据mplayer的官方说明,3.0以下的gcc可以用./configre --disable-gcc-checking参数编译,但可能不稳定),安装gcc3的方法是:进入gcc3目录,运行rpm -ivh *.rpm --nodeps,全部百分百安装后,开一个终端窗口,运行mv /usr/bin/gcc /usr/bin/gcc2和mv /usr/bin/gcc3 /usr/bin/gcc,再运行gcc -v,看输出是否为3.0.2,如果是,则ok,不是,则检查安装步骤。
4、安装sdl及sdl-devel:
检查你的系统有没有安装了sdl及相同版本(一定要相同版本的)的sdl-devel库:运行“软件包管理器”,按“查找软件包”按钮,输入sdl,查找,如果能找到sdl及sdl-devel包,则表示都已经安装,如果版本比1.2.0高,那么跳到第5步;如果没安装或版本比较低(小于1.2.0),则安装本站提供的sdl包,命令rpm -ivh SDL*.rpm --nodeps或rpm -Uvh SDL*.rpm --nodeps,安装完后运行一下sdl-config --version[/color],看输出是不是1.2.3,如果正确,则ok;不正确或有问题,检查步骤,或发帖子问。
5、安装win32 for linux的dll库:(必须,只有安装它才可以播放win下的媒体文件,包括asf,wmv,mp3,avi,dat,mpg等)
运行命令:tar vxf w32codec-0.60.tar,得到w32codec-0.60.tar这个目录,建立/usr/lib/win32目录(mkdir /usr/lib/win32),将w32codec-0.60.tar目录下所有文件拷贝到/usr/lib/win32目录下(cp w32codec-0.60/*.* /usr/lib/win32)
6、安装divx5 for linux:(如果你想播放divx格式的电影文件的话必须安装这个,安装了这个后xine也可以利用,推荐)
进入divx4linux-20020418目录(cd divx4linux-20020418),运行./install.sh
7、解压编译安装mplayer:
tar vxf MPlayer-0.90pre5.tar,cd MPlayer-0.90pre5.tar,./configure (如果你想要gui的操作界面,则换用这个命令./configrue --enable-gui,但似乎这个版本的gui编译有错,我和linuxCN都无法成功,pre4版本则没问题),make,make install,都成功运行一下mplayer(这是为了让它在家目录下建立.mplayer这个配置目录,好进行下一步操作)
8、拷贝配置文件:(注意:下面这个etc目录是上一步中解压出来的MPlayer-0.90pre5目录下的,非/etc)
cp etc/codecs.conf ~/.mplayer
cp etc/example.conf ~/.mplayer/config
9、安装font和skin:(如果你选择了./configure --enable-gui那才需要skin,否则skin不用安装)
进入自己的home目录,显示隐藏文件,进入.mplayer文件夹,创2个建文件夹:font和Skin。然后把arial-18内的所有文件拷入到font内,把default整个文件夹(注意:是连同文件夹一起)拷到Skin内!
10、运行方式
两种:(1)mpalyer /路径/要播放的媒体文件名;(2)gmplayer(只有用./configure --enable-gui编译的这个命令才有效)
11、关于~/.mplayer/config文件的一些配置说明
vo=xv(选择默认的播放模式,xv模式是支持显卡硬加速功能的模式,对cpu的占用很小,推荐;更多的显示模式可以用命令mplayer -vo help看,其中的vesa模式可以在不启动xwin界面时播放,有点象当年DOS下的金山影霸)
ao=oss(选择声音的播放模式,oss是兼容性最好的播放模式,推荐;你也可以试试sdl模式)
fs=yes(全屏模式,yes的话默认以全屏播放,no或前面加#号注释掉这行的话则默认是1:1播放模式)
zoom=yes(即时改变电影画面大小,yes的话则可以用鼠标随意将播放画面拉大拉小,no 的话不能)
gui = yes(默认是图形化操作界面,这需要你先前用./configure --enable-gui来编译,否则的话就算yes也没有gui操作界面)
skin = default(设置默认的skin,将等号右边的值换成skin所放目录就可以设置想要的skin为默认了,这个参数在用gui操作界面才有效)
cache = 8192(默认的播放缓存大小,如果机器内存够大,则将它加大一点,如果不是很大,譬如128以下,还是用默认的算了)
framedrop = yes(允许跳帧,如果你的机器CPU速度非常非常慢的话请将这个yes,默认是no或前面加#号将这行禁止;对于366MHZ以上的机器,建议都设成no或前面加#号)
其他设置用默认就行
一些小技巧:
标准播放模式时一般按F键可以切换到全屏模式,再按一下复原,按Q可以退出;播放时如果发现声音和画面不同步,可以按+号(shift+=)或-号调整;播放divx的avi时如果想支持中文字幕,则你的电影文件目录下必须要有和电影同名的idx和sub这两种格式的字幕文件存在;支持网络播放流式文件,譬如输入mplayer http://IP/1.asf 可以在线播放1.asf

./configure后的输出窗口,请注意Enabled optional drivers:的下面:
Codecs: divx5linux libavcodec directshow win32这行,它代表了支持电影格式包括divx,avi,win32dll里的所有媒体格式;如果你缺少了divx,则检查你的divx4linux安装有没有问题,如果你缺少了win32,则检查你的win32codec安装正确了没有Audio output: arts oss sdl mpegpes(file)这行,它表示音频的输出模式支持arts,oss,sdl和mpegpes模式,其中的mpegpes模式是将音频导出生成mpg文件;如果缺少sdl模式,则检查你的sdl及sdl-devel安装了没有;安装完后可以通过修改config文件设置默认的音频输出模式,或用mplayer -ao 模式 要播放的文件名即时改变播放模式,譬如mplayer -ao sdl 1.asf就是用sdl的音频模式播放1.asf
Video output: xvidix sdl vesa gif89a jpeg png mpegpes(file) fbdev svga opengl dga xv x11这行,它表示可以支持的视频输出模式;如果缺少sdl模式,则检查你的sdl及sdl-devel安装了没有;安装完后可以通过修改config文件设置默认的视频输出模式,或用mplayer -vo 模式 要播放的文件名即时改变播放模式,譬如mplayer -vo sdl 1.asf就是用sdl的视频模式播放1.asf,mplayer -vo sdl -ao sdl 1.asf就是音频视频都选用sdl模式来播放1.asf"





B2层 发表时间: 04-07-21 15:38

回复: q8406654 [q8406654]   论坛用户   登录
5、安装win32 for linux的dll库:(必须,只有安装它才可以播放win下的媒体文件,包括asf,wmv,mp3,avi,dat,mpg等)

B3层 发表时间: 04-07-21 15:38

回复: TecZm [teczm]   版主   登录
原文如下,没有说要安装win32 for linux的dll库呀

Welcome to MPlayer, the Unix movie player. MPlayer can play most standard video
formats out of the box and almost all others with the help of external codecs.
MPlayer currently works best from the command line, but visual feedback for
many functions is available from its onscreen status display (OSD), which is
also used for displaying subtitles. MPlayer also has a GUI with skin support and
several unofficial alternative graphical frontends are available.

MEncoder is a command line video encoder for advanced users that can be built
from the MPlayer source tree. An unofficial graphical frontend exists but is
not included.

This document is for getting you started in a few minutes. It cannot answer all
of your questions. If you have problems, please read the documentation in
DOCS/documentation.html, which should help you solve most of your problems.
Also read the man page to learn how to use MPlayer.


Requirements:
- You need a working development environment that can compile programs.
  On popular Linux distributions, this means having the glibc development
  package(s) installed.
- To compile MPlayer with X11 support, you need to have the XFree86 development
  packages installed.
- For the GUI you need the libpng and GTK 1.2 development packages.


Before you start...
Unless you know what are you doing, consult DOCS/video.html to see which driver
to use with your video card to get the best quality and performance. Most cards
require special drivers not included with XFree86 to drive their 2-D video
acceleration features like YUV and scaling.

A quick and incomplete list of recommendations:
- ATI cards: Get the GATOS drivers for X11/Xv or use VIDIX.
- Matrox G200/G4x0/G550: Compile and use mga_vid for Linux, on BSD use VIDIX.
- 3dfx Voodoo3/Banshee: Get XFree86 4.2.0+ for Xv or use the tdfxfb driver.
- nVidia cards: Get the X11 driver from www.nvidia.com for Xv support.
- NeoMagic cards: Get an Xv capable driver from our homepage as described in
  DOCS/video.html.

Without accelerated video even an 800MHz P3 may be too slow to play DVDs.


______________________
STEP0: Getting MPlayer
~~~~~~~~~~~~~~~~~~~~~~

Official releases, prereleases and CVS snapshots, as well as fonts for the
OSD, codec packages and a number of different skins for the GUI are available
from the download section of our homepage at

  http://www.mplayerhq.hu/homepage/dload.html

A set of fonts is necessary for the OSD and subtitles, the GUI needs at least
one skin and codec packages add support for some more video and audio formats.
MPlayer does not come with any of these by default, you have to download and
install them separately. A wide range of codec packages can be downloaded at

  http://www.mplayerhq.hu/MPlayer/releases/codecs/

You can also get MPlayer via anonymous CVS. Issue the following commands to get
the latest sources:

  cvs -d:pserver:anonymous@mplayerhq.hu:/cvsroot/mplayer login
  cvs -z3 -d:pserver:anonymous@mplayerhq.hu:/cvsroot/mplayer co main

When asked for a password, just hit enter. A directory named 'main' will be
created. You can later update your sources by saying

  cvs -z3 update -dPA

from within that directory.


___________________________________
STEP1: Installing FFmpeg libavcodec
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

If you are using an official (pre)release, skip this step, since official
releases include libavcodec. CVS sources and thus CVS snapshots do not include
libavcodec. To verify if you do have libavcodec or not, check if a subdirectory
named 'libavcodec' exists in the MPlayer source tree.

The FFmpeg project provides libavcodec, a very portable codec collection (among
the supported formats is MPEG4/DivX) with excellent quality and speed, that is
the preferred MPEG4/DivX codec of MPlayer. You have to get libavcodec directly
from the FFmpeg CVS server.

To get the FFmpeg sources, use the following commands in a suitable directory
outside the MPlayer source directory:

cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/ffmpeg login
cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/ffmpeg co ffmpeg/libavcodec

When asked for a password, you can just hit enter. A directory named 'ffmpeg'
with a subdirectory named 'libavcodec' inside will be created. Copy (symbolic
linking does NOT suffice) this subdirectory into the MPlayer source tree.


_______________________________
STEP2: Installing Binary Codecs
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

MPlayer and libavcodec have builtin support for the most common audio and video
formats, but some formats require external codecs. Examples include Real, Indeo
and QuickTime audio formats. Support for Windows Media formats except WMV9
exists but still has some bugs, your mileage may vary. This step is not
mandatory, but recommended for getting MPlayer to play a broader range of
formats. Please note that most codecs only work on Intel x86 compatible PCs.

Unpack the codecs archives and put the contents in a directory where MPlayer
will find them. The default directory is /usr/local/lib/codecs/ (it used to be
/usr/local/lib/win32 in the past, this also works) but you can change that to
something else by using the '--with-codecsdir=DIR' option when you run
'./configure'.


__________________________
STEP3: Configuring MPlayer
~~~~~~~~~~~~~~~~~~~~~~~~~~

MPlayer can be adapted to all kinds of needs and hardware environments. Run

  ./configure

to configure MPlayer with the default options. The codecs you installed above
should be autodetected. GUI support has to be enabled separately, run

  ./configure --enable-gui

if you want to use the GUI.

If something does not work as expected, try

  ./configure --help

to see the available options and select what you need.

The configure script prints a summary of enabled and disabled options. If you
have something installed that configure fails to detect, check the file
configure.log for errors and reasons for the failure. Repeat this step until
you are satisfied with the enabled feature set.


________________________
STEP4: Compiling MPlayer
~~~~~~~~~~~~~~~~~~~~~~~~

Now you can start the compilation by typing

  make

You can install MPlayer with

  make install

provided that you have write permission in the installation directory.

If all went well, you can run MPlayer by typing 'mplayer'. A help screen with a
summary of the most common options and keyboard shortcuts should be displayed.

If you get 'unable to load shared library' or similar errors, run
'ldd ./mplayer' to check which libraries fail and go back to STEP 3 to fix it.
Sometimes running 'ldconfig' is enough to fix the problem.

NOTE: If you run Debian you can configure, compile and build a proper Debian
.deb package with only one command:

  fakeroot debian/rules binary


____________________________________________
STEP5: Installing the onscreen display fonts
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Unpack the archive and choose one of the available font sizes. Then copy the
font files of the corresponding size into /usr/local/share/mplayer/font/ or
~/.mplayer/font/ (or whatever you set with './configure --datadir=DIR').


____________________________
STEP6: Installing a GUI skin
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Unpack the archive and put the contents in /usr/local/share/mplayer/Skin/ or
~/.mplayer/Skin/. MPlayer will use the skin in the subdirectory named default
of /usr/local/share/mplayer/Skin/ or ~/.mplayer/Skin/ unless told otherwise via
the '-skin' switch. You should therefore rename your skin subdirectory or make
a suitable symbolic link.


__________________
STEP7: Let's play!
~~~~~~~~~~~~~~~~~~

That's it for the moment. To start playing movies, open a command line and try

  mplayer <moviefile>

or for the GUI

  gmplayer <moviefile>

gmplayer is a symbolic link to mplayer created by 'make install'.
Without <moviefile>, MPlayer will come up and you will be able to use the GUI
filepicker.

To play a VCD track or a DVD title, try:

  mplayer -vcd 2 -cdrom-device /dev/hdc
  mplayer -dvd 1 -alang en -slang hu -dvd-device /dev/hdd

See 'mplayer -help' and 'man mplayer' for further options.

'mplayer -vo help' will show you the available video output drivers. Experiment
with the '-vo' switch to see which one gives you the best performance.
If you get jerky playback or no sound, experiment with the '-ao' switch (see
'-ao help') to choose between different audio drivers. Note that jerky playback
is caused by buggy audio drivers or a slow processor and video card. With a
good audio and video driver combination, one can play DVDs and 720x576 DivX
files smoothly on a Celeron 366. Slower systems may need the '-framedrop'
option.

Questions you may have are probably answered in the rest of the documentation.
The places to start reading are the man page, DOCS/documentation.html and
DOCS/faq.html. If you find a bug, read DOCS/bugreports.html first!


B4层 发表时间: 04-07-21 16:03

回复: gsxl1021 [gsxl1021]   论坛用户   登录









































































































































































长~~~~~~~~~~~~~看不懂!!!

B5层 发表时间: 04-07-26 15:08

论坛: UNIX系统

20CN网络安全小组版权所有
Copyright © 2000-2010 20CN Security Group. All Rights Reserved.
论坛程序编写:NetDemon

粤ICP备05087286号