|
一直苦于mplayer的威力不能完全发挥,在播放高码率bluray的吃力,mencoder支持的库太少,压制片子时找不到合用的库。趁着七天长假,一狠心,从官网上下了最新的mplayer-1.0-rc4和ffmpeg-mt,经过三天的苦心琢磨,编译成功使用的mencoder一组
编译成功带CoreAVC 2.0和ffmpeg-mt加速的mplayer一组作为主力播放器,编译成功只带CoreAVC 2.0加速的mplayer一组和只带ffmpeg-mt加速的mplayer各一组作为备用播放器。经测试,在开启多核加速选项后能够轻松播放以前放不流畅的1080P了,开心!
安装CoreAVC和集成ffmpeg-mt时出了太多问题,经过N次调整和重新编译,终于达到相对理想的效果,最辛苦的是我和CPU了,来回编译 mplayer和ffmpeg-mt二十多次。。。。真是痛苦。。。还好CPU比以前的C366快多啦,好歹也是双核啦 。。。
一、需要的东西
mplayer-1.0rc4( 稳定,看bluray iso不能正常加载字幕)
mpalyer-svn (新特性多看bluray可以加载字幕)
libx264 (ffmpeg-mt需要,要先于ffmpeg-mt安装)
libva (ffmpeg-mt硬件加速库,libx264后安装)
libswscale (ffmpeg-mt需要,默认的git ffmeg-mt不带此库,需要单独下载)
二、安装中主要注意几点:
1、ffmpeg-mt可以用两种方式加载进mplayer,静态和动态
2、静态方式就是把ffmpeg-mt的代码整体进mplayer,同步编译。目前只在mpayer-svn上编译成功,mplayer-1.0rc4失败。新下载的mplayer-svn不带ffmpeg库,需要将ffmpeg-mt复制进去,改名为ffmpeg即可,然后按照正式步聚配置mplayer,编译既可。ffmpeg不要配置,我是配置并单独编译ffmpeg成功,但是mplayer死活就编译不过了。libswscale也要一并复制到ffmpeg和mplayer-svn目录中。
3、动态方式把ffmpeg-mt单独编译安装,生成liba*的动态链接库,供mplayer调用。
./configure --enable-gpl --enable-shared --enable-version3 --enable-nonfree --enable-postproc --enable-pthreads --enable-x11grab --disable-vdpau --enable-libfaac --enable-libmp3lame --enable-libx264 --enable-libfaac --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libxvid
4、mplayer-1.0rc4调用时只要在配置文件中禁用ffmpeg的静态编译就可以了
./configure --prefix=/usr --enable-gui --codecsdir=/usr/lib/codecs --enable-joystick --enable-menu --enable-xvmc --disable-vdpau --disable-libavutil_a --disable-libavcodec_a --disable-libavformat_a --disable-libpostproc_a --disable-libswscale_a
5、mplayer-svn调用时只要在配置文件中增加一句--disable-ffmpeg_a就可以了
6、单独编译生成的ffmpeg-mt动态库安装路径要在ld.so.conf中并执行ldconfig才能让动态加载的mplayer找得到,否则就报错
7、单独编译生成的ffmpeg-mt动态库对mplayer静态方式安装有影响,需要将单独编译生成的ffmpeg-mt动态库移走并重新ldconfig才能防止mplayer在静态方式下加载这些库造成编译错误。
8、CoreAVC采用最新的SVN补丁可以正确在mplayer-1.0rc4上应用,对mplayer-svn部分有效,需要手动修正
$mencoder -oac help
MEncoder SVN-r32848-4.3.0 (C) 2000-2011 MPlayer Team
Available codecs:
copy - frame copy, without re-encoding (useful for AC3)
pcm - uncompressed PCM audio
mp3lame - cbr/abr/vbr MP3 using libmp3lame
lavc - FFmpeg audio encoder (MP2, AC3, ...)
faac - FAAC AAC audio encoder
mencoder -ovc help
MEncoder SVN-r32848-4.3.0 (C) 2000-2011 MPlayer Team
Available codecs:
copy - frame copy, without re-encoding. Doesn't work with filters.
frameno - special audio-only file for 3-pass encoding, see DOCS.
raw - uncompressed video. Use fourcc option to set format explicitly.
lavc - libavcodec codecs - best quality!
vfw - VfW DLLs, read DOCS/HTML/en/encoding-guide.html.
qtvideo - QuickTime DLLs, currently only SVQ1/3 are supported.
xvid - XviD encoding
x264 - H.264 encoding
~/mp_pre/mplayer
MPlayer 1.0rc4-4.3.0 (C) 2000-2010 MPlayer Team
161 audio & 352 video codecs
Usage: mplayer [options] [url|path/]filename
Basic options: (complete list in the man page)
-vo <drv> select video output driver ('-vo help' for a list)
-ao <drv> select audio output driver ('-ao help' for a list)
vcd://<trackno> play (S)VCD (Super Video CD) track (raw device, no mount)
dvd://<titleno> play DVD title from device instead of plain file
-alang/-slang select DVD audio/subtitle language (by 2-char country code)
-ss <position> seek to given (seconds or hh:mm:ss) position
-nosound do not play sound
-fs fullscreen playback (or -vm, -zoom, details in the man page)
-x <x> -y <y> set display resolution (for use with -vm or -zoom)
-sub <file> specify subtitle file to use (also see -subfps, -subdelay)
-playlist <file> specify playlist file
-vid x -aid y select video (x) and audio (y) stream to play
-fps x -srate y change video (x fps) and audio (y Hz) rate
-pp <quality> enable postprocessing filter (details in the man page)
-framedrop enable frame dropping (for slow machines)
Basic keys: (complete list in the man page, also check input.conf)
<- or -> seek backward/forward 10 seconds
down or up seek backward/forward 1 minute
pgdown or pgup seek backward/forward 10 minutes
< or > step backward/forward in playlist
p or SPACE pause movie (press any key to continue)
q or ESC stop playing and quit program
+ or - adjust audio delay by +/- 0.1 second
o cycle OSD mode: none / seekbar / seekbar + timer
* or / increase or decrease PCM volume
x or z adjust subtitle delay by +/- 0.1 second
r or t adjust subtitle position up/down, also see -vf expand
* * * SEE THE MAN PAGE FOR DETAILS, FURTHER (ADVANCED) OPTIONS AND KEYS * * * |
|