Start process
MPlayer 是 linux 中强大的万能播放器,但是 MPlayer 官方只制作了 FC 系列的 rpm 包
,而且 FC 每出一个新版本,官方就会少出一个旧版本的 rpm 包。
但是,可能你使用的 OS 不是 FC 系列,甚至,你还可能使用著 windows,
那么?如何才能给你的电脑装上 MPlayer 这一强大的多媒体播放器呢?
下面,笔者就为大家详细讲述最全面的关于 MPlayer 编译的技术。
PART 1
创建编译环境
{
你得有一个类 unix 的环境:
至少一个 gcc,一个 shell (推荐bash或ash),一个 make,一套 binutils ---- 这是最基本的条件;
另外最好还有一系列自动化工具,比如 automake, autoconf,libtool 等等;以及一系列的 shell 程序,比如 cp 啦等等。为了能解压缩,你得有一个能解压缩原代码包的工具,比如 winrar,7zip 或者命令行上的 gzip 等。
其他软件:GTK+,GIMP,lame 等。
<1.>如果你下载并选择安装 cygwin,那么你需要下载其 setup.exe,并进行漫长的等待,以便 setup.exe能从网络下载并安装好整个开发环境,cygwin 能提供一个 shell 环境,完整的 linux 基本库,Qt/Gtk库,以及许多命令行下的软件,它虽然效率不高,编译出来的程序运行起来也比较慢,但是它的环境比较完整,更像 linux。一旦安装好,你需要确认哪些需要的东西已经安装,以便在后面的步骤中省略其安装过程。
<2.>如果你选择下载并安装 MinGW,那么至少下面这些软件包据信是必须的 :mingw-runtime, w32api,binutils , gcc, MSYS, msysDTK。另外笔者认为 mingw32-make 软件包对于编译过程也必不可少。安装过程如下:MSYS -> mingw-runtime -> w32api -> gcc -> mingw32-make -> binutils -> MSYS -> msysDTK。MSYS 共进行两次安装,第一次安装问要否配置的时候,键入 n。然后接下来的东西通通都是解压缩后把里面的 bin 啊 include 啊 那些东东拷贝到 MSYS 安装目录下的 mingw 目录里。第二次安装MSYS的时候一定要选是,并输入 mingw 目录的位置,msysDTK 一定要与 MSYS 安装目录相同。
};
PART 2
安装gtk和qt库(qt库是非必须的)
{
};
PART 3
安装各种支持功能
{
1e,下载 DirectX 7 的头文件:
http://www.mplayerhq.hu/MPlayer/releases/win32/contrib/dx7headers.tgz
然后拷贝到 include 目录里去
在 Linux 里嘛。。。是被 path 的 include
在 Windows 里嘛,应该是 mingw/include
当然,你也可以使用 wine 的头文件 :)
接下来我们讲怎么从源代码安装各种支持功能,
你得先把这些软件源代码包找到并下载回来...
喜欢 rpm, apt 或 ports 的请飘过...
2e,安装ogg(egg是鸡蛋,估计ogg是鹅蛋:)),vorbis 和 theora
这三个软件都可以从 xiph.org 找到
先安装鹅蛋:
解压缩 libogg-X.X.X.tar.gz
cd libogg-X.X.X
./configure --prefix=c:/mingw --disable-shared
make
make install
然后安装 vorbis
解压缩 libvorbis-X.X.X.tar.gz
cd libvorbis-X.X.X
./configure --prefix=c:/mingw --disable-shared
make
make install
解下来安装 theora
解压缩 libtheora-X.X.X.tar.gz
cd libtheora-X.X.X
./configure --disable-encode --prefix=C:/mingw --disable-shared
make
make install
3e,安装 freetype
解压缩 libiconv-X.X.X.tar.gz
cd libiconv-X.X.X
./configure --prefix=c:/mingw --disable-shared
make
make install
解压缩 freetype-X.X.X.tar.bz2
cd freetype-X.X.X
./configure --prefix=c:/mingw --disable-shared
make
make install
4e,安装 zlib, libregif, libpng, libjpeg
先安装 zib
解压缩 zlib-X.X.X.tar.gz
cd zlib-X.X.X
./configure --prefix=c:/mingw
make
make install
再安装 libpng
解压缩 libpng-X.X.X-config.tar.gz
cd libpng-X.X.X-config
./configure --prefix=c:/mingw --disable-shared
make
再安装 libjpeg
解压缩 jpegsrc.v6b.tar.gz
cd jpeg-6b
./configure --prefix=/mingw/ --enable-static
make
cp .libs/libjpeg.a c:/mingw/lib/
cp jpeglib.h jconfig.h jmorecfg.h c:/mingw/include/
make install
最后,安装 libregif
解压缩 libregif-X.X.X.tar.gz
cd libregif-X.X.X
./configure --prefix=c:/mingw
make
make install
5e, 安装 lame, xvid 及 x264
首先得安装一个汇编语言(如果你系统上已经安装,那就绝对不要重复安装)
下载地址http://sourceforge.net/project/showfiles.php?group_id=6208
解压缩 nasm-X.X.X.tar.gz
cd nasm-X.X.X
./configure --prefix=c:/mingw
make
mkdir c:/mingw/man/man1
make install
然后安装 lame
解压缩 lame-X.X.X.tar.gz
cd lame-X.X.X
./configure --prefix=c:/mingw --disable-shared --disable-decoder
make
make install
可恶的 lame 弄了半天都弄不好 5555 其实不装也可以的 win32codecs 里带 mp3 解码的...
再安装 xvid
解压缩 xvidcore-X.X.X.tar.gz
cd xvidcore-X.X.X/build/generic
./configure --prefix=c:/mingw --disable-shared
make
make install
mv c:/mingw/lib/xvidcore.a c:/mingw/lib/libxvidcore.a
x264 得从 svn 下载,俺也不会...不过如果你下载下来了可以:
cd x264
./configure --prefix=/mingw --enable-avis-input --enable-pthread
make
make install
6e,安装 live 软件包
网上的文章通通都是废物...
按天下文章一大抄的那篇文章根本找不到 live 库了
悄悄告诉你这个库可以从下列地址下载到:
http://live555.com/liveMedia/public/live555-latest.tar.gz
http://live555.com/liveMedia/public/live.2007.05.24.tar.gz
一个叫live555,一个叫live2007
安装方法:
./genMakefiles
find . -name 'Makefile' -exec fix-makefile {} \;
gmake 或 make
然后把 live 目录拷贝到任何地方(譬如 /usr/lib/live 或 /usr/lib)
windows上的有官方的编译方法:
比较复杂,就不再讲述了。
7e,安装 libdvdcss 库包 请注意,使用该库包在某些国家或地区是违反著作权法的 :(
安装方法不再详述
要看“全区 DVD”,请自己编译安装该库包,
Linux 用户比较爽,可以有 rpm 包直接装...
};
PART 4
编译 MPlayer
{
终于可以开始编译 MPlayer 了,好激动...
你需要先下载一个 MPlayer 的源代码包,官方最新版本的就行
当然你想当小白鼠试验试验cvs版、svn版的也行哦...
首先,应该下载一些解码包到 win32 (win32codecs)或 codecs (linux all)目录里,
呃 ... 官方那么多库包,下载哪个捏? 根据你的用途选择吧! 反正笔者一直用自己组合的解码库包。
[如果你决定使用下面方括号里的 configure 命令行,请在 MPlayer 目录下新建一个 release 目录,并在其下面新建一个 codecs 目录,将解码包放到这个 codecs 目录里]
再解压缩这个源代码包,
然后cd进去
敲下面的命令
./configure --enable-runtime-cpudetection --enable-static --enable-win32 --enable-real --enable-directx --enable-dshow --enable-largefiles --enable-gui --enable-freetype --enable-qtx-codecs --enable-qtx --enable-menu --enable-live --enable-vorbis --enable-xvid --language=zh_CN
方括号:[p.s 如果你不介意的话(或者你在 Windows 上编译的话)不妨使用下面的 configure 命令行,使用该命令行会在 当前目录下的 /release 目录里生成你想要的东西:
./configure --prefix=./release --enable-runtime-cpudetection --enable-static --enable-win32 --enable-real --enable-directx --enable-dshow --with-codecsdir=./release/codecs --with-win32libdir=./release/codecs --with-reallibdir=./release/codecs --with-livelibdir=./release/codecs --enable-largefiles --enable-gui --enable-freetype --enable-qtx-codecs --enable-qtx --enable-menu --enable-live --enable-vorbis --enable-xvid --language=zh_CN]
make
这个时候,如果你运气足够好的话...MPlayer 就已经编译好了,在该生成二进制软件的地方应该已经生成了二进制文件。
};
PART 5
编译前端
{
如果你觉得 MPlayer 自己的 GUI 不够美观或不够好用。
如果你是在 Windows 下编译(极有可能由于某些原因无法编译出 GUI)
这时候,你需要编译一个前端。
这里介绍一个很优秀的前端 ---- smplayer (下简称:smp),这个软件每天会更新一个版本,功能十分强大,是笔者见过的最强大的 MPlayer 前端。
哈哈...前面安装 QT 库就是为了编译它 :)
现分为两个部分介绍如何编译:
LINUX systèm:
QT3:smp 是在 QT3 环境下开发的,自然兼容性相当好,编译极为容易:
首先你得确保已经装了 QT3 开发库,其名为 qt3-devel 或 libqt3-dev
解压缩下载的 smp 源代码压缩包并改名为 smp 然后依次执行下列各条指令,不要打括号及其中的中文:
cd smp
make (如果这一步出错了,那一定是 QTDIR 变量没有设定为它应该指向的位置)
make install
(这一步将把 smp 安装到 /usr/local)
LINUX systèm
QT4:首先你得确保已经装了 QT4 开发库,其名为 qt4-devel 或 libqt4-dev
有些 Linux 发行版有单独的 QT3 支持软件包,你最好把他们也装上。
执行下列命令,不包括括号及其中的中文:
make prep
make (如果这一步出错了,那一定是 QT3 里的 qmake 被 QT4 里的 qmake 代替,请使用 make QMAKE=qmake-qt4 或 make QMAKE=/usr/share/qt4/bin/qmake 这一步里的 make)
make install
(这一步将把 smp 安装到 /usr/local)
QT3 和 QT4 的区别:使用 QT4 ,可以显示系统拖盘图标。
而在 QT3 下,除非你使用 kde 支持来编译,否则不能显示系统拖盘图标。(如果你使用 QT3 和 kde, 请使用 make KDE_SUPPORT=1 代替 make 来编译。)
(注意:第一次启动时由于要搜索字体会较慢,打开后,进入首选项的对话框,把 mplayer 执行文件地址指向 mplayer 二进制可执行文件)
WINDOWS systèm
在安装 QT 时,会问你关于 MinGW 的问题,选择已经安装 MinGW 并导航到安装目录。
依次打开 开始 -> 应用程序 -> Qt by Trolltech v4.2.3 (Opensource) and select
Qt 4.2.3 Command Prompt.
在打开的命令提示符里,执行
cd c:\smp\src\
conv2qt4.bat
等提示符再次出现时,执行
make
完成后smp源代码目录的 release 子目录里会出现名曰 smplayer.exe 的文件,然后通过运行找出缺的库文件,并将这些库文件分别从 mingw 和 qt/bin 目录里拷贝到 release 目录里。
然后把 release 目录里的所有文件拷贝到 mplayer 目录( mplayer.exe 所在目录)里,一个完美的 mplayer 就制作出来啦
(注意:第一次启动时由于要搜索字体会较慢,打开后,进入首选项的对话框,把 mplayer 执行文件地址改为 ./mplayer.exe)
};
END
测试环境: Fedora Core 7 (仅部分测试)
Microsoft Windows 2000 SP2 (仅部分测试)
按照本文章做,你应该知道自己在做什么
使用本文造成的一切后果读者自负,作者皆不承担任何责任及连带责任.
[ 本帖最后由 大程在CD 于 2007-6-14 22:36 编辑 ]


68.11.123.* 于 2007-09-07 02:06:33发表:
5ad57a96f2f4a7646e577ae542d79376 http://pallaalbalzoalfonsogatto.dlqpew.org/blocca-file/ http://leopardi-lettera-giordani.vozlau.org/ http://asse-simmetria.odiioj.org/ http://deposito-temporaneo-and-ravenna.hhidlx.org/ http://ufficio-norma-igienico-sanitaria.odiioj.org/ http://manuale-dell-assistente-amministrativo-scuola.oxibnl.org/ http://irishcoffee-pompei.yavpvy.org/ http://permesso-retribuito-metalmeccanico-artigiano.odiioj.org/ http://vita-smeralda.ufftiy.org/ http://sat-elettronica-software.yavpvy.org/ ef5da0821261872f3a177fbd4ce2e9fc
24.200.181.* 于 2007-09-06 08:55:20发表:
385aa585a7391fda35e6a8930d1062dc techeval http://www.rstm.edu/phpBB/viewtopic.php?t=1450 http://iris.lib.virginia.edu/phpBB2/viewtopic.php?t=7689 forum audasaforum audasaforum http://iris.lib.virginia.edu/phpBB2/viewtopic.php?t=7689 phpBB http://www.international.ucf.edu/myphp/community/viewtopic.php?t=124 http://iris.lib.virginia.edu/phpBB2/viewtopic.php?t=7689 d950163e2bc04fe30175aa17834ab13d
218.51.69.* 于 2007-09-05 20:04:51发表:
5caf17c60c2dab0265677474219d9af1 ~chaversa http://myweb.msoe.edu/~chaversa/phpBB2/viewtopic.php?t=2012 http://myweb.msoe.edu/~chaversa/phpBB2/viewtopic.php?t=2012 http://www.grahi.upc.edu/ERAD2006/phpBB2/viewtopic.php?t=6839 http://www.grahi.upc.edu/ERAD2006/phpBB2/viewtopic.php?t=6839 http://www.grahi.upc.edu/ERAD2006/phpBB2/viewtopic.php?t=6839 forum ~chaversa https://www.cslu.ogi.edu/forum/viewtopic.php?t=2656 ERAD2006 db62d9d137e7999ef0c8bbd27991ea41
24.255.163.* 于 2007-09-05 05:44:00发表:
9ea5f95aa008548efb30db75452496e9 http://troia-vecchia-it.dfmviz.info/ http://beppe-grillo-reset.dfmviz.info/ http://nomadi-augusto.dfmviz.info/ http://rassegna-teatrale-conegliano.dfmviz.info/ http://scheda-madri-a-64-bit.dfmviz.info/ http://aspirapolvere-severin.dfmviz.info/ http://ginecologi-roma.dfmviz.info/ http://art-63-disp-att-cc.dfmviz.info/ http://estinzione-societa-preesistente-nascita-nuova-societa.dfmviz.info/ http://roma-zona-san-pietro.dfmviz.info/ 21817dd0dbd87cb119a7471ab31fd121
66.130.138.* 于 2007-08-15 23:55:50发表:
6d7e1534b37d8d54a25affee3f6c37b7 http://giocatore-turco-nazionale-calcio.akrmtn.com/ http://cerco-lavoro-sammichele-bari.flroxk.com/ http://cessione-autovettura-parte-professionista.flroxk.com/ http://espositore-prezzo-carburante.akrmtn.com/ http://camicia-seta.flroxk.com/ http://astor-torino.ddxsak.com/ http://scuola-privata-giovanni-pascoli.akrmtn.com/ http://agenzia-marittima-offerta-lavoro.akrmtn.com/ http://bicchieri-nutella.flroxk.com/ http://offerta-lavoro-lido-iesolo.zpvztz.com/ f79720dbd018955dfd9068d527cd2031
190.74.148.* 于 2007-07-26 00:55:50发表:
9fba5d326a4db7906788be3e375a9bce http://succhiatrice-cazzo-video.sfupeh.biz/ http://lasciate-ogni-speranza-o-entrata.sfupeh.biz/ http://sciopero-actv-dicembre-2006.txcbmz.biz/ http://enzo-bianco-tributo-santa-lucia.smtpld.biz/ http://sblocco-sony-ericsson-sim-lock.sfupeh.biz/ http://anselmo-cardelli.ftgmns.biz/ http://compravendita-cavallo-emilia-romagna.sfupeh.biz/ http://andrea-pozzoli-conto-economico.zqemjp.biz/ http://nuovo-contratto-lavoro.txcbmz.biz/ http://stock-abbigliamento-modena.cuxojo.biz/ f0bd15bc4c04b02533089147dbde4c5b
222.115.105.* 于 2007-07-25 18:47:30发表:
078c613c147051e1288b7f1ebbbf8590 http://posto-barca-friuli.ytxxxk.biz/ http://franchising-benessere.gohktw.biz/ http://nevicata-giosue-carducci.ytxxxk.biz/ http://aliquota-iva-manutenzione-ordinaria.mbgzfn.biz/ http://ufficio-in-vendita-a-milano.ytxxxk.biz/ http://asl-careggi.hdywtl.biz/ http://manifattura-paf.hdywtl.biz/ http://25-giugno.mbgzfn.biz/ http://masterizzatore-dvd-nec-3520.mbgzfn.biz/ http://misure-antropometriche.mbgzfn.biz/ bfdd7bec9230a10317341e982495b689
121.139.168.* 于 2007-07-25 15:59:30发表:
4056a09bf225566d960b238da4a1a73f http://d-lgs-251-2004-contratto-appalto.zibtye.biz/ http://commento-al-vangelo-san-matteo.zibtye.biz/ http://la-sposa-di-firenze.tzlnou.biz/ http://programma-integrati.iuatju.biz/ http://stampa-colora-principessa-disney.iuatju.biz/ http://rimuovere-downloader-agent.zibtye.biz/ http://boys-palmi.ppdpwx.biz/ http://lorenzo-milano-it.iuatju.biz/ http://dipartimenti-francia.ppdpwx.biz/ http://foto-annuncio-coppia-scambista.enadzh.biz/ 69fae163d26a9b1682339a4eb6fc4ad9
200.91.198.* 于 2007-07-24 06:17:55发表:
03ffc14f1b3bd812601621cf5a1a967a http://circolare-dlgs-267-articolo-80.vywyuh.org/ http://frase-x-augurio-battesimo.hdpwsk.org/ http://banca-popolare-bergamo-1-luglio-2003.jnbwct.org/ http://pianta-oliva.vywyuh.org/ http://soglia-dolore-it.pvaeyo.org/ http://economia-ucraina.cqhnnx.org/ http://donna-matura-perverse.cqhnnx.org/ http://automazione-industriale.pvaeyo.org/ http://sito-produzione-serra-hobby.vywyuh.org/ http://cazzi-nudi.mnkcbe.org/ eb89aa2351bfb8dd061b0dc25061dcdb
190.0.95.* 于 2007-07-21 13:57:33发表:
3f1e307375fe3c068e61ae1caaceb667 http://ultimapuntatacarabinieri.pehabe.org/serramenti-alluminio-roma/ http://giannottiangeli.ghoouy.org/gay-masturbazione/ http://4wdscoppio.nfnzro.org/enrico-silvestrin-forum/ http://cucinaconpietraollare.rozdha.org/sms-compleanno-18-anno/ http://downloadsoftwareturnoservizio.pehabe.org/opinioni-tv-lcd/ http://bijouxparticolare.chohqh.org/sigla-passaparola/ http://giocogiocareweb.nfnzro.org/sistema-calibrazione-cappello/ http://giocogiocareweb.nfnzro.org/immobile-imposta-indirette-accertamento/ http://casiraghiviaggi.rozdha.org/puja-prata/ http://bloccocircolazionenapoli19.qemqrg.org/libere-gp-malesia/ b8fb7d84153cc5c69600cbe1497734b2
84.55.179.* 于 2007-07-20 04:58:14发表:
bcf5ba802edd57e0b240251255afb5aa http://nome-dei-dell-olimpo.iznvge.in/ http://cucina-ciesse.miwcjz.com/ http://concorezzo-milano.qeshtw.in/ http://turismo-norvegese.aoknmm.in/ http://bearshare-italiano-free.vbglda.com/ http://appartamento-porto-cervo.uylqdg.com/ http://sito-didattico-docente-lettera-scuola-media.fzhoas.in/ http://testo-contratto-base.vbglda.com/ http://tarocco-amore.aezqpa.com/ http://flaccovio-and-and-scerbanenco.jnesky.in/ b8a12f78e2ab8d9c8e5e94f78e975725
221.153.240.* 于 2007-07-18 17:51:39发表:
http://1d0361e1997b132c924f49e07e4ba73f-t.xkktxb.org 1d0361e1997b132c924f49e07e4ba73f http://1d0361e1997b132c924f49e07e4ba73f-b1.xkktxb.org 1d0361e1997b132c924f49e07e4ba73f http://1d0361e1997b132c924f49e07e4ba73f-b3.xkktxb.org 8d1f2bfe3cbc5359328d95464cab8b7c
80.32.120.* 于 2007-07-18 17:29:20发表:
d21e2584b380425414fc094e1f225865 http://piazzapopoloromacapodanno2007.copdkj.org/villa-ducale-parma/ http://lupodellasteppa.nxaqjj.org/cus-padova/ http://casasrlrete.jpwypc.org/signora-cerca-schiavo-tel/ http://supposteglicerina.eebsig.org/top-per-cucina/ http://paginebianchesalerno.vniybd.org/d-p-r-n-495-92/ http://smsgratuiti.nxaqjj.org/qtek-prezzo/ http://piazzapopoloromacapodanno2007.copdkj.org/mechanical-nailing-macchina/ http://modelloricorsosequestroconservativo.cdvduz.org/allevamento-lagotti/ http://liceoscientificofilolao.lgyeas.org/tribunale-diritti-malato/ http://meteovr.ppnxyq.org/centro-mens-sana-pontedera/ 8ea4fcdde1a965ef95e68187f350c6f6
201.243.173.* 于 2007-07-06 00:42:20发表:
http://709aeeac3136eb4ff7bbdb5b9891ed43-t.lwgmrw.org 709aeeac3136eb4ff7bbdb5b9891ed43 http://709aeeac3136eb4ff7bbdb5b9891ed43-b1.lwgmrw.org 709aeeac3136eb4ff7bbdb5b9891ed43 http://709aeeac3136eb4ff7bbdb5b9891ed43-b3.lwgmrw.org 7323937625928ec2c2b389a5c949efe8