VDPAU的混合转储加速了Ubuntu 11.10与bumblebee 3.0的video播放?
我正在尝试在安装了Bumblebee 3.0的Ubuntu 11.10上运行VDPAU加速video播放混合转储。 但是按照下面的URL中的说明,我无法使用vdpau的mplayer工作:
https://askubuntu.com/a/100812/17702
avilella@magneto:~/hybrid_graphics/hybrid-windump$ git pull Already up-to-date. avilella@magneto:~/hybrid_graphics/hybrid-windump$ make clean && make optirun true LD_LIBRARY_PATH=/usr/lib/nvidia-current DISPLAY=:8 metacity --replace & LD_LIBRARY_PATH=/usr/lib/nvidia-current DISPLAY=:8 mplayer -vo vdpau file.720p.mkv #(in the other gnome-terminal tab) LD_LIBRARY_PATH=/usr/lib/nvidia-current ~/hybrid_graphics/hybrid-windump/windump :8 :0
还尝试过:
LD_LIBRARY_PATH=/usr/lib/nvidia-current DISPLAY=:8 mplayer -vo vdpau -vc ffh264vdpau file.720p.mkv
我没有收到任何video,只有音频。 如果我删除vdpau位,我会获得video和音频,但是不需要windump:
LD_LIBRARY_PATH=/usr/lib/nvidia-current DISPLAY=:8 mplayer file.720p.mkv
如果我尝试glxspheres,它运行良好,像这样:
LD_LIBRARY_PATH=/usr/lib/nvidia-current DISPLAY=:8 glxspheres #(in the other gnome-terminal tab) LD_LIBRARY_PATH=/usr/lib/nvidia-current ~/hybrid_graphics/hybrid-windump/windump :8 :0 Polygons in scene: 62464 Visual ID of window: 0x27 Context is Direct OpenGL Renderer: GeForce 310M/PCI/SSE2
现在video播放。 按照下面的说明,我得到了一些工作:
编辑/etc/bumblebee/xorg.conf.nvidia
并添加:
Section "Screen" Identifier "Screen0" DefaultDepth 24 SubSection "Display" Depth 24 Virtual 1280 720 EndSubSection EndSection
重启bumblebeed
:
sudo restart bumblebeed
在其中一个终端中,我调用mplayer
命令:
LD_LIBRARY_PATH=/usr/lib/nvidia-current:/usr/lib/nvidia-current/vdpau DISPLAY=:8 optirun mplayer -vo vdpau -ao alsa file.720p.mkv
在另一个终端,然后我调用compiz
然后调用windump
命令:
LD_LIBRARY_PATH=/usr/lib/nvidia-current DISPLAY=:8 compiz --replace & ~/hybrid-windump/windump :8 :0
问题:我正在努力解决video窗口的大小问题。 在一个1366×768的屏幕中,我设置了1280×720的video尺寸,但图像在右侧切割了大约200像素,留下了相同大小的黑色windump
区域。
有任何想法吗?
这就是我得到vdpau
:
-
编辑
/etc/bumblebee/xorg.conf.nvidia
有Section "Screen" Identifier "Screen0" DefaultDepth 24 SubSection "Display" Depth 24 Virtual 1920 1080 EndSubSection EndSection
-
跑
LD_LIBRARY_PATH=/usr/lib/nvidia-current:/usr/lib/nvidia-current/vdpau DISPLAY=:8 optirun mplayer -vo vdpau file.720p.mkv
-
跑
LD_LIBRARY_PATH=/usr/lib/nvidia-current DISPLAY=:8 compiz --replace &
-
下载了https://github.com/gebart/hybrid-windump ,从中删除了
xorg.conf
,然后编译(只是make
命令)。 -
运行
./windump :8 :0
注意:您不需要编辑/etc/bumblebee/bumblebee.conf
并将/etc/bumblebee/bumblebee.conf
更改为true
因为我们直接使用Optirun运行MPlayer。
我可以看到你使用由Bumblebee( :8
)启动的X服务器的方法中的一个缺陷。 一旦Bumblebee守护程序检测到没有optirun客户端,它就会关闭X服务器。 即使optirun
已退出,也要使X服务器保持活动状态:
- 编辑
/etc/bumblebee/bumblebee.conf
并设置KeepUnusedXServer=true
- 使用
sudo restart bumblebeed
重启守护进程(注意:这会杀死任何现有的optirun
应用程序) - 触发X服务器的启动:
optirun true
(true
只是一个立即返回的命令,它可以是任何东西) -
在辅助X服务器上运行应用程序。 如果您使用的是nvidia驱动程序,则必须使用
LD_LIBRARY_PATH
部分:LD_LIBRARY_PATH=/usr/lib/nvidia-current DISPLAY=:8 metacity --replace &`
- 运行windump:
windump :8 :0
注意:我无法使用xorg-edgers / ppa + nouveau和使用gebarts的fork的nvidia驱动程序。 使用nvidia驱动程序,在运行glxspheres
时我得到了很多撕裂。 如果转储屏幕的分辨率与主显示分辨率不匹配,则可能需要向/etc/bumblebee/xorg.conf.nvidia
添加额外的/etc/bumblebee/xorg.conf.nvidia
。 对于1920×1080,要添加的行看起来像:
Section "Screen" Identifier "Screen0" DefaultDepth 24 SubSection "Display" Depth 24 Virtual 1920 1080 EndSubSection EndSection
我很高兴人们喜欢我的解决方案,但我想强调的是,这只是用Optimus做VDPAU的概念certificate。
gebart以一种严重受CPU限制的方式编写了hybrid-windump,因为所有内容都以相当低效的方式从“屏幕”复制到“屏幕”。
是的,您正在使用VDPAU进行解码,但是没有节省CPU使用率。
还有一个选项可以通过x窗口ID转储单个窗口。
对于键盘,您需要Option "AutoAddDevices" "true"
。
您还可以使用hybrid-windump使用您选择的DE启动整个VDPAU就绪桌面会话。
如果你仍想使用它,这里有一些结果如何的video(取决于X配置):
它应该是DISPLAY=:0; metacity --replace &
DISPLAY=:0; metacity --replace &
此外,optirun说你的显示器显然是:0.0,你为什么要在显示器上启动metacity:8? 你有一个正在运行的程序:8我们在你的post中看不到? 如果您这样做,请提供相关信息,好吗?