Debian sequeeze编译coreavc 2.0+mplayer
Debian sequeeze編譯coreavc 2.0+mplayer
- 好不容易終于編譯出了sequeeze下的coreavc2.0+mplayer(2011-03-06),應(yīng)該要比1.0 rc4更新吧。
- 為什么要用coreavc
- 下載源代碼
- mplayer源代碼
- coreavc源代碼
- 其他
- 編譯準(zhǔn)備工作
- 編譯coreavc-for-linux
- 安裝coreavc 2.0
- 注冊(cè)測(cè)試CoreAVCDecoder.ax
- 編譯
- configure
- patch
- compile
- configuration
- 測(cè)試
好不容易終于編譯出了sequeeze下的coreavc2.0+mplayer(2011-03-06),應(yīng)該要比1.0 rc4更新吧。
這里記錄以下整個(gè)編譯過(guò)程,以防遺忘。
為什么要用coreavc
手上一臺(tái)dell的筆記本,但是CPU不是很好,即使用mplayer+mepg-mt,播放720P,cpu基本100%,畫(huà)面一卡一卡,所以決定用coreavc,雖然畫(huà)質(zhì)有損失,但是只要放著不卡就好。:)
下載源代碼
mplayer源代碼
http://www.mplayerhq.hu/MPlayer/releases/mplayer-checkout-snapshot.tar.bz2coreavc源代碼
svn checkout http://coreavc-for-linux.googlecode.com/svn/trunk/ coreavc-for-linux-read-only其他
當(dāng)然準(zhǔn)備好你的coreavc 2.0也是必須的。當(dāng)前的coreavc-for-linux需要wine運(yùn)行,所以需要安裝wine。 在/etc/apt/sources.list里增加如下:
deb http://www.lamaresh.net/apt squeeze main安裝wine
sudo aptitude install wine wine-dev安裝一些必要的編譯包
編譯準(zhǔn)備工作
編譯coreavc-for-linux
cd /dshowserver make sudo make install安裝coreavc 2.0
cd wine setup.exe我在運(yùn)行過(guò)程中得到一個(gè)錯(cuò),這時(shí)按Ctrl+c,就跳出安裝界面了。輸入序列號(hào)完成安裝。
注冊(cè)測(cè)試CoreAVCDecoder.ax
拷貝CoreAVCDecoder.ax到 /usr/lib/codecs
sudo cp ~/.wine/drive_c/Program Files/CoreCodec/CoreAVC Professional Edition/CoreAVCDecoder.ax /usr/lib/codecs/測(cè)試是否成功
dshowserver -c CoreAVCDecoder.ax -s 1280x720 -g 09571a4b-f1fe-4c60-9760de6d310c7c31 -b 12 -f 0x34363248 -o 0x30323449成功的話輸出如下
Starting wine dshowserver.exe.so No id specified, assuming test mode Opening device (port is 0) len: 992 ProductVersion: 2.0.0 fixme:thread:SetThreadIdealProcessor (0x4c): stub fixme:thread:SetThreadIdealProcessor (0x50): stub Decoder supports the following YUV formats: YUY2 UYVY YV12 I420 Decoder is capable of YUV output (flags 0x2b) Setting fmt Starting Initialization is complete編譯
configure
cd CC=gcc-4.3 ./configure --enable-menu --enable-freetype --enable-debug --codecsdir=/usr/lib/codecs這里使用gcc-4.3,第一次使用gcc4.4編譯出來(lái)了好像不能用,改成4.3就好了,不知原因
patch
patch -p0 < ../coreavc-for-linux/mplayer/dshowserver.patch #安裝dshowserver補(bǔ)丁這個(gè)補(bǔ)丁打的時(shí)候會(huì)失敗,主要是Makefile打補(bǔ)丁時(shí),沒(méi)打上,所以我修改了以下Makefile相關(guān)的地方
--- Makefile.orig 2011-03-06 13:15:09.000000000 +0800 +++ Makefile 2011-03-07 23:38:51.000000000 +0800 @@ -20,6 +20,7 @@# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.include config.mak +EXTRALIBS += -lrt###### variable declarations #######@@ -476,6 +477,7 @@ SRCS_COMMON = asxparser.c \stream/stream_mf.c \stream/stream_null.c \stream/url.c \ + libmpcodecs/vd_dshowserver.c \sub/eosd.c \sub/find_sub.c \sub/osd.c \ @@ -859,6 +861,7 @@ gui/%: CFLAGS += -Wno-strict-prototypeslibdvdcss/%: CFLAGS := -Ilibdvdcss -D_GNU_SOURCE -DVERSION=\"1.2.10\" $(CFLAGS_LIBDVDCSS) $(CFLAGS)libdvdnav/%: CFLAGS := -Ilibdvdnav -D_GNU_SOURCE -DHAVE_CONFIG_H -DVERSION=\"MPlayer-custom\" $(CFLAGS)libdvdread4/%: CFLAGS := -Ilibdvdread4 -D_GNU_SOURCE $(CFLAGS_LIBDVDCSS_DVDREAD) $(CFLAGS) +libmpcodecs/%: CFLAGS := $(CFLAGS) -g -O0loader/%: CFLAGS += -fno-omit-frame-pointer $(CFLAGS_NO_OMIT_LEAF_FRAME_POINTER)#loader/%: CFLAGS += -Ddbg_printf=__vprintf -DTRACE=__vprintf -DDETAILED_OUT用上班這一段,替換原來(lái)補(bǔ)丁的中的Makefile那段內(nèi)容
compile
這下應(yīng)該沒(méi)有問(wèn)題了,開(kāi)始編譯,安裝
make sudo make installconfiguration
在一切都完成后還要修改mplayer的配置文件
mkdir ~/.mplayer cp /etc/codecs.conf ~/.mplayer/并且在~/.mplayer/codecs.conf中增加如下內(nèi)容
videocodec coreserveinfo "CoreAVC DShow H264 decoder x.x for x86 - http://corecodec.org/"status workingformat 0x10000005fourcc H264,h264 H264fourcc X264,x264fourcc avc1,AVC1 AVC1fourcc davc,DAVCfourcc VSSHdriver dshowserverdll "CoreAVCDecoder.ax"guid 0x09571a4b, 0xf1fe, 0x4c60, 0x97, 0x60, 0xde, 0x6d, 0x31, 0x0c, 0x7c, 0x31out YV12,IYUV,I420,YUY2這段內(nèi)容可以寫(xiě)在文件的最后。
測(cè)試
現(xiàn)在運(yùn)行一個(gè)720p的mkv看看,運(yùn)行是需要加“-demuxer mkv”參數(shù)
$ mplayer Hereafter.2010.BluRay.720p.DTS.x264-CHD.mkv -demuxer mkv MPlayer SVN-r33030-4.4.5 (C) 2000-2011 MPlayer Team 162 audio & 353 video codecsPlaying Hereafter.2010.BluRay.720p.DTS.x264-CHD.mkv. [mkv] Track ID 1: video (V_MPEG4/ISO/AVC) "Hereafter.2010.BluRay.720p.DTS.x264-CHD", -vid 0 [mkv] Track ID 2: audio (A_DTS) "DTS 5.1 1510kbps", -aid 0, -alang eng [mkv] Will play video track 1. Matroska file format detected. VIDEO: [avc1] 1280x534 24bpp 23.976 fps 0.0 kbps ( 0.0 kbyte/s) Load subtitles in ./ ========================================================================== Opening video decoder: [dshowserver] DirectShowServer video codecs [PP] Using codec's postprocessing, max q = 4. Movie-Aspect is 2.40:1 - prescaling to correct movie aspect. VO: [xv] 1280x534 => 1280x534 Planar YV12 dshowserver --codec CoreAVCDecoder.ax --size 1280x534 --guid 09571a4b-f1fe-4c60-9760de6d310c7c31 --fourc 0x31637661 --bits 12 --outfmt 0x32315659 --pid 5769 --id b6e62700 --numpages 10 --port 45788 & Starting wine dshowserver.exe.so Opening device (port is 45788) len: 992 ProductVersion: 2.0.0 fixme:thread:SetThreadIdealProcessor (0x50): stub fixme:thread:SetThreadIdealProcessor (0x54): stub Decoder supports the following YUV formats: YUY2 UYVY YV12 I420 Decoder is capable of YUV output (flags 0x2b) Setting fmt Starting Initialization is complete Using socket based mutex Found DirectShow filterSelected video codec: [coreserve] vfm: dshowserver (CoreAVC DShow H264 decoder x.x for x86 - http://corecodec.org/) ========================================================================== ========================================================================== Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders EINPROGRESS in connect() - selecting Dshowserver Connected to host AUDIO: 48000 Hz, 2 ch, s16le, 1536.0 kbit/100.00% (ratio: 192000->192000) Selected audio codec: [ffdca] afm: ffmpeg (FFmpeg DTS) ========================================================================== AO: [oss] 48000Hz 2ch s16le (2 bytes per sample) Starting playback...一切順利,成功,開(kāi)心~~
Date: 2011-03-08 10:34:18 CST
HTML generated by org-mode 7.4 in emacs 23
來(lái)自 “ ITPUB博客 ” ,鏈接:http://blog.itpub.net/737564/viewspace-688611/,如需轉(zhuǎn)載,請(qǐng)注明出處,否則將追究法律責(zé)任。
轉(zhuǎn)載于:http://blog.itpub.net/737564/viewspace-688611/
總結(jié)
以上是生活随笔為你收集整理的Debian sequeeze编译coreavc 2.0+mplayer的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: Linux:程序员必备的21条Linux
- 下一篇: 注册码