ubuntu8.10下mplayer+win32codecs+Coreavc编译安装详解
<script type="text/javascript"> document.body.oncopy = function() { if (window.clipboardData) { setTimeout(function() { var text = clipboardData.getData("text"); if (text && text.length>300) { text = text + "/r/n/n本文來自CSDN博客,轉(zhuǎn)載請標(biāo)明出處:" + location.href; clipboardData.setData("text", text); } }, 100); } } </script> <script class="blogstory">function StorePage(){d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getSelection?d.getSelection():'');void(keyit=window.open('http://www.365key.com/storeit.aspx?t='+escape(d.title)+'&u='+escape(d.location.href)+'&c='+escape(t),'keyit','scrollbars=no,width=475,height=575,left=75,top=20,status=no,resizable=yes'));keyit.focus();}</script>
1. 如何安裝win32codecs
 比起手動(dòng)安裝來,我更推薦加源安裝的方法。medibuntu是目前最好的源。
 以ubuntu8.10為例
 先加源
 然后加GPG Key
 這一步時(shí)可能會有未驗(yàn)證之類的錯(cuò)誤提示,回答yes,或y讓它繼續(xù)進(jìn)行即可。
 
 安裝win32codecs包
 如果是intel的CPU
 如果是64位 CPU
 
 OK,完成win32codecs的安裝
 
 2. 從源里安裝mplayer。這一步很重要,因?yàn)槲覀冃枰迷蠢锏膍player來確定依賴關(guān)系,要不然,編譯的mplayer很可能會缺少某些功能。
 8.10源里的mplayer仍是1.0rc2,有點(diǎn)老。我們可以加個(gè)源用新的
 在末尾加上
deb-src http://ppa.launchpad.net/rvm/ubuntu intrepid main
 保存后
 執(zhí)行到這一步,不想編譯的同學(xué)就可以止步了。你將得到一個(gè)版本比較新的mplayer和smplayer。但有可能mplayer會有問題。源里的mplayer要穩(wěn)定得多。
 
 ---------------------------------------編譯mplayer的快樂分隔線------------------------------------------------------
 
 3. 準(zhǔn)備編譯mplayer+Coreavc。
 第一步(重要)
 
 第二步 下載mplayer,下載Coreavc,以及破解版的CoreAVCDecoder.ax。
 下載SVN版的mplayer(只有SVN版的mplayer才能安上Coreavc)
 
 用SVN版下載Coreavc
 
 下載CoreAVCDecoder.ax破解包 。內(nèi)有安裝說明。解壓后將CoreAVCDecoder.ax拷貝到/usr/lib/codecs目錄中,然后更改此文件權(quán)限為所有用戶可讀。
 
 第三步 順序是:處理Coreavc---注冊CoreAVCDecoder.ax--配置mplayer--打補(bǔ)丁--編譯--完成
 a. 處理Coreavc(以intel CPU為例 )
make -C dshowserver
 然后
sudo cp dshowserver/registercodec /usr/local/bin
 對于64位CPU,應(yīng)該到http://code.google.com/p/coreavc-for-linux/downloads/list 下載最新的包。然后把dshowserver和registercodec拷貝到/usr/local/bin目錄中。
 
 b. 注冊CoreAVCDecoder.ax
 然后驗(yàn)證dshowserver是否工作:
 如果輸出信息如下,那就表示解碼器工作正常。
Opening device
len: 992
ProductVersion: 1.7.0Decoder supports the following YUV formats: YUY2 UYVY YV12 I420
Decoder is capable of YUV output (flags 0x2b)
Setting fmt
Starting
Initialization is complete
 
 c. 配置mplayer和打補(bǔ)丁,在打補(bǔ)丁之前,一定要先./configure, 要不然是打不上補(bǔ)丁的。
./configure --enable-gui --enable-freetype --codecsdir=/usr/lib/codecs --language=zh_CN
 打補(bǔ)丁
 然后編譯安裝
sudo make install
 
 最后還有一步
 編輯~/.mplayer/中的codecs.conf文件。如果沒有這個(gè)文件,就拷貝一個(gè)過去
gedit codecs.conf
 把下面這一段拷貝到codecs.conf中,VIDEO CODECS部分的最前面。
? info "CoreAVC DShow H264 decoder 1.3 for x86 - http://corecodec.org/"
? status working
? format 0x10000005
? fourcc H264,h264 H264
? fourcc X264,x264
? fourcc avc1,AVC1 AVC1
? fourcc davc,DAVC
? fourcc VSSH
? driver dshowserver
? dll "CoreAVCDecoder.ax"
? guid 0x09571a4b, 0xf1fe, 0x4c60, 0x97, 0x60, 0xde, 0x6d, 0x31, 0x0c, 0x7c, 0x31
? out YV12,IYUV,I420,YUY2
 
 最后,把從源里安裝的mplayer改個(gè)名,保證以后調(diào)用的都是編譯的mplayer。
 好,現(xiàn)在,大功告成。哪怕是Atom CPU,也能基本流暢地播放720P視頻了。
 
 注:以上編譯過程在Eeepc 1000H、ubuntu8.10上完成。不敢保證其他機(jī)型也能順利成功完成。
 另外,6樓的兄弟提供了更簡潔的安裝辦法和更高版本的CoreAVCDecoder.ax,值得參考。 
 
 附:參考資料
 coreavc地址及官方教程
 http://code.google.com/p/coreavc-for-li ... stallation 
 http://code.google.com/p/coreavc-for-li ... verInstall 
 mplayer的普通編譯安裝
 http://blog.chinaunix.net/u2/81801/showart_1330801.html 
 medibuntu官方指南
 https://help.ubuntu.com/community/Medibuntu 
總結(jié)
以上是生活随笔為你收集整理的ubuntu8.10下mplayer+win32codecs+Coreavc编译安装详解的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
                            
                        - 上一篇: C++中如何读取一个数的位数_求1000
 - 下一篇: oracle数据库主键自增序列_orac