nvidia最近推出的vdpau高清硬解码方案在其开发者的努力下不断推陈出新,显卡驱动至今总共有五款——180.06、180.08、 180.11、180.16和180.18,mplayer的vdpau patch也有了将近4个版本的更新,基本上接近稳定了,虽然还是有些小毛病。本人不像有些shell狂人,什么都喜欢用命令行,毕竟是从windows 转过来的,对于播放电影这种经常性操作还是喜欢图形界面,用鼠标点点总是方便些,smplayer作为目前最好的mplayer前端当然是不二之选。目前 smplayer没有针对于vdpau的选项,由于传递了过多的参数,而这些参数中有一部分是不兼容vdpau的,所以如果想要用smplayer作为打过vdpau patch的mplayer的前端的话,必须对smplayer的设置进行一定的调整,具体如下:
The way to make smplayer compatible with mplayer patched with vdpau
system info:
smplayer version: 0.6.5.1
vdpau version: mplayer-vdpau-3076399.tar.bz2
linux distribution: ubuntu 8.10
Nvidia Drivier version: 180.18beta
1.要选择正确的播放器路径(choose the right mplayer path)
一般来说我们使用的mplayer都是通过nvidia发布的补丁编译出来的,默认安装路径在/usr/local/bin下面,而系统自带的 mplayer的路径都统一在/usr/bin下面,所以第一步必须选择正确的播放器路径,将默认的mplayer修改为/usr/local/bin /mplayer
choose the right mplayer path, if you instll mplayer with nvidia official patch, the mplayer should be installed to the /usr/local/bin/, but the default path of official mplayer is /usr/bin/, so you must change the path field from "mplayer" to "/usr/local/bin/mplayer" in smplayer option "General > general > path"
2.选择正确的视频输出格式 (choose the right video output)
既然选择了 vdpau解码,当然要选择vdpau视频输出作为默认输出了,我刚开始还担心vdpau只能解码输出高清,而不能播放其他非高清视频,现在看来这种担心是多虑的,在播放非高清视频时,其输出是完全兼容xv的,这样只需要设置这种视频输出格式,就可以通吃所有的视频了。
vdpau video output is compatible with Xvideo when play non-hd video, so you can set the video output option to "vdpau" in smplayer option "General > Video > Video output driver", then you can play any video supported by mplayer with vdpau output.
3.清除截屏目录 (clear the field of screenshot saving path)
不知为何vdpau输出貌似不支持截屏,只要smplayer像mplayer传递了截屏参数,mplayer必然崩溃。大概是vdpau的原因吧,所以必须清除掉截屏目录的选项,就是在smplayer的选项中清除掉截图保存目录的那一栏。
vdpau does not support screenshot now, if the screenshot constant is passed to mplayer, it must crash. So you must clear the field of the screenshot saving path in smplayer option " General > General > Folder for storing screenshots".
4.关闭ssa/ass字幕支持 (disable ssa/ass subtitles)
同样由于未知原因,vdpau不支持ssa/ass字幕,只要相关参数被传递,mplayer亦会崩溃,所以还是关闭ssa/ass最支持吧。
vdpau doesn't support ssa/ass subtitles yet(?), so disable the ssa/ass subtitle and enable the normal subtitles "Subtitles > Font and colors > enable normal subtitles"
5.让mplayer优先选择vdpau的解码器
对于那些高清视频,系统中一般还存在着其他的解码器,而mplayer播放的时候会按照其默认优先级选择非高清解码器,所以我们需要传递给mplayer一些额外的参数,让其在播放高清视频是优先选择vdpau高清解码器,所以在smplayer的选项"高级 > mplayer选项 > 选项"一栏中填上:
代码: 全选
-vc ffmpeg12vdpau,ffwmv3vdpau,ffvc1vdpau,ffh264vdpau,
we should pass some extra options to mplayer to make it play the hd-video with vdpau codec, so fill the field in " Advanced > mplayer option > option" with:
代码: 全选
-vc ffmpeg12vdpau,ffwmv3vdpau,ffvc1vdpau,ffh264vdpau,
做完这些我们就可以用smplayer来播放机器上所有的视频了,而且在播放高清的时候cpu占用率只有百分之几,超爽哦,比windows上高清解码还要方便,在win上面硬解mpeg和h.264时,需要设置不同的视频混合器类型,真是麻烦哟。linux上面就轻松多了,一个vdpau视频输出加上相应的codec搞定所有,真是方便呀。
Following above steps, you can play any video with smplayer, both HD and Non-HD.
That's ALL, Enjoy :-)