mplayer 编译安装

just posted @ 2008年12月27日 21:59 in linux with tags mplayer 编译 , 2745 阅读

本文推荐去 mplayer 的官方站下载最新版本.另外 mplayer 是一个媒体播放器,所有的多媒体文件都需要解码器,比如常见的 mp3 文件。mplayer 除了使用自己的解码器外,如果您还需要播放 windows 下的多媒体文件还需要 windows 下的解码器。所以我们要从 http://www.mplayerhq.hu/下载如下文件。ftp2.mplayerhq.hu/MPlayer/releases/    这里也有下载,包括mplayer 解码器包和mplayer windows 解码器包

         mplayer 源码安装包。 (我下载的文件是:MPlayer-1.0pre7try2.tar.bz2)
  mplayer 程序图形界面皮肤 (我下载的文件是:neutron-1.5.tar.bz2、Blue-1.4.tar.bz2)
  mplayer 程序图形界面字体包 (我下载的文件是:font-arial-iso-8859-1.tar.bz2)
  mplayer 解码器包 (我下载的文件是:all-20050412.tar.bz2)
  mplayer windows 解码器包 (我下载的文件是:windows-all-20050412.zip)


  推荐朋友们在“Linux”中使用图形化的方式解开压缩包。在压缩包的图标上点击鼠标右键,在弹出的右键菜单中用鼠标左键单击解压。然后在当前目录下会得到一个装着压缩包内容的文件夹。文件夹名称基本与压缩包一致。因为我们要将源代码编译成可以安装的二进制文件。我推荐将解压后的二制包复制一份粘贴到 Linux 分区。我个人喜欢将文件夹放到自己的当前用户目录下。
  然后开始我们的安装过程,打开终端,然后在终端内进入源码包目录。比如我的目录是:/root/MPlayer-1.0pre7try2。每一个用源代码发布的安装包中都会有一个叫做 configure 的 Shell 脚本文件,它是做什么的呢?我们回想一下 windows 中安装软件的过程,是不是安装向导都要求用户输入一些信息呢?没错啦,configure 的作用就是
给安装过程配置基本信息。我们用 ./configure ,命令执行它。它还有许多参数,具体参数当然随软件不同而异。如果我们想知道某个 configure 到底有哪些参数可以使用 ./configure --help 命令获得。

      天哪,真是多得不得了啊!当然,我们并不需要使用这些所有的参数,只是需要这么几个啦!如果您在执行 ./configure 时不带任何参数,那么安装时将会使用默认值。我们今天教授的安装与朋友们在网上看到的其它方式可能有所不同,也许我自己是软件开发人员的关系,我喜欢把程序需要的东西全放到一个目录里。好的,我
们开始啦。下一个命令是

  ./configure --enable-gui --prefix=/opt/MPlayer-1.0pre7try2
--with-win32libdir=/opt/MPlayer-1.0pre7try2/win32 --with-codecsdir=/opt/MPlayer-1.0pre7try2/codecs。

  我来解释一下这四个参数具体的函意:

   --enable-gui (可以使用图形界面)

   --prefix=/opt/MPlayer-1.0pre7try2 (软件安装的目的路径=/opt/MPlayer-1.0pre7try2)

   --with-codecsdir=/opt/MPlayer-1.0pre7try2/codecs (解码库的路径=/opt/MPlayer-1.0pre7try2/codecs)

   --with-win32libdir=/opt/MPlayer-1.0pre7try2/win32 (windows 解码库的路径 =/opt/MPlayer-1.0pre7try2/win32)

  
  大家是否注意到我们把要用到的一些主要的内容都放在 /opt/MPlayer-1.0pre7try2 目录里了!然后敲回车
键执行吧!等上一会屏幕上返回了一大堆的信息。

 

     Install prefix: /opt/MPlayer-1.0pre7try2 (安装目录在 /opt/MPlayer-1.0pre7try2,我们刚才输入的参数嘛!)

   Data directory: /opt/MPlayer-1.0pre7try2/share/mplayer (数据目录在 /opt/MPlayer-1.0pre7try2/share/mplayer)

   Config direct.: /opt/MPlayer-1.0pre7try2/etc/mplayer (配置目录在 /opt/MPlayer-1.0pre7try2/etc/mplayer)

  现在我们都配置完了,下面做什么呢?当然是编译啦!把源代码编译成电脑 CPU 可以看懂的二进制文件啦!命令很简单,依然是在 /root/MPlayer-1.0pre7try2 目录中执行命令 make。编译的时间有点长,我们需要等一会。这个过程中 make 命令将在源码包内不断生成许多的二进制文件,并且终端屏幕上不断有新的信息显
示编译过程。

        终于见到提示符啦。我的笔记本用了约 10 分钟完成编译过程。现在我们要进行最后一个步骤--安装。我们
还是在 /root/MPlayer-1.0pre7try2 目录中执行 make install (要用root权限)命令。这个过程比较快!现在我们去 /opt 目录下看看,原来空荡荡的目录里是不是多了一个 MPlayer-1.0pre7try2 目录?MPlayer 的可执行文件都在 /opt/MPlayer-1.0pre7try2/bin 目录里,去看看有什么?

 mplayer 可以使用命令行和键盘播放媒体文件。

gmplayer 当然就是用图形化的方式播放媒体文件啦!
  
  现在我们进入 /opt/MPlayer-1.0pre7try2/share/mplayer 文件夹。看看是否有一 font 个文件夹,和一个
Skin 文件夹。如果你打开后没有就自己各建一个。

将您下载的字体包解压后的文件夹拷入 font 目录。再将下载的皮肤包解压后的文件夹拷入 Skin 目录。并建一个 default 目录,将任意一个皮肤文件夹中的内容拷
进去。启动 MPlayer 的图形化界面后,程序将加载 default 目录里的皮肤文件。


最后我们不应该忘了我们在配置编译参数时有这么两个参数:
  --with-win32libdir=/opt/MPlayer-1.0pre7try2/win32  
  --with-codecsdir=/opt/MPlayer-1.0pre7try2/codecs
  所以我们应该在/opt/MPlayer-1.0pre7try2 目录下新建一个 win32 文件夹,将下载的 windows 解码库包解

压后的文件拷进去。再新建一个 codecs 文件夹,将下载的 MPlayer 解码库包解压后的文件拷进去。


在播放的时候,网上很多文章介绍的命令格式是“mplayer 文件路径”,“gmplayer 文件路径”。不过现在是不行的。因为在 mplayer 使用默认参数编译的时候 mplayer、gmplayer 这两个执行文件是被装到 /usr/bin 目录中去了。/usr/bin 目录已被配置到了 Linux 的环境变量中。而我们的 mplayer、gmplayer 文件却是在安装目录
。所以我们运行 mplayer 需要进入安装目录的 bin 文件夹。运行“./mplayer 文件路径”,“./gmplayer 文件路径”。

  现在您曾经在 windows 下欣赏的所有多媒体文件 MPlayer 可以全部流畅播放。真爽!
  现在使用源代码安装 MPlayer 的方法就介绍完了。

incometaxindiaefilin 说:
2022年8月04日 01:26

The Income Tax department of India is a centralized form of association where they keep track of tax redemption from people all across India, and we have seen people surrounding us talk about Income tax refund and the status of the application most of the times. incometaxindiaefiling As you already know that the department makes a small deduction from your salaried account and sometime during December you are eligible to apply for tax refund application. Once you have applied for the refund process then the Income Tax department takes around 3-4 months and releases the status of every application basing on their calculation, but in order for all the steps to happen that we’ve mentioned it is necessary for you to apply for the tax refund in the first place.

MP Board Question Pa 说:
2022年9月07日 17:01

MP Board HSSC Exam are conducted by Madhya Pradesh Board of Secondary Education (MPBSE) Only, MP Board Provide Latest and Last Year Exam Study Material for Syllabus, Question Paper etc, Malayalam, English Medium Pdf Format, now available on the official website, MP Board Question Paper MP Board has been Announced HSSC Public Examination Time Table 2023 soon, Students can Download MPBSE 12th Previous Question Paper 2023 which is help in your study, and support in getting more marks in public exam, MP Board Model Question Papers with Solutions Available Students you can Download in Pdf format form this web page below given links.


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter