How to turn off Video Acceleration programmatically

陌路散爱 提交于 2019-12-06 07:31:45

问题


I'm using the Windows Media Player OCX in a program runned on hundreds of computers (dedicated).

I have found out that when video acceleration is turned on to "full", on some computers it will cause the video to fail to play correct, with green squares between movies and so on. Turn the acceleration to "None" and everything is fine.

This program is runned on ~800 computers that will autoupdate my program. So I want to add to the startup to my program that it turns off the video acceleration.

The question is, how do I turn off video Acceleration programmatically?

All computers are running XP and at least the second service pack. It would take me ages to manually logg in to all those computers and change that setting so thats why I want the program to be able to do it automagically for me.


回答1:


Using the suggested process of running procmon, and filtering out unnecessary data, I was able to determine the changes in the registry when this value changed:

Full Video Acceleration:

[HKEY_CURRENT_USER\Software\Microsoft\MediaPlayer\Preferences\VideoSettings]
"PerformanceSettings"=dword:00000002
"UseVMR"=dword:00000001
"UseVMROverlay"=dword:00000001
"UseRGB"=dword:00000001
"UseYUV"=dword:00000001
"UseFullScrMS"=dword:00000000
"DontUseFrameInterpolation"=dword:00000000
"DVDUseVMR"=dword:00000001
"DVDUseVMROverlay"=dword:00000001
"DVDUseVMRFSMS"=dword:00000001
"DVDUseSWDecoder"=dword:00000001

No Video Acceleration:

[HKEY_CURRENT_USER\Software\Microsoft\MediaPlayer\Preferences\VideoSettings]
"PerformanceSettings"=dword:00000000
"UseVMR"=dword:00000000
"UseVMROverlay"=dword:00000000
"UseRGB"=dword:00000000
"UseYUV"=dword:00000000
"UseFullScrMS"=dword:00000001
"DontUseFrameInterpolation"=dword:00000001
"DVDUseVMR"=dword:00000000
"DVDUseVMROverlay"=dword:00000000
"DVDUseVMRFSMS"=dword:00000000
"DVDUseSWDecoder"=dword:00000000

So, in short, set

  • PerformanceSettings
  • UseVMR
  • UseVMROverlay
  • UserRGB
  • UseYUV
  • DVDUseVMR
  • DVDUseVMROverlay
  • DVDUseVMRFSMS
  • DVDUseSWDecoder

to 0, and set

  • UseFullScrMS
  • DontUseFrameInterpolation

to 1.




回答2:


It seems you're not the only one with this problem. Here's a link to a blog - the author solves his problem by lowering the hardware acceleration level. Tested on Media Player 9, 10 and 11 with REG script to set appropriate settings.

http://thebackroomtech.com/2009/04/15/global-fix-windows-media-player-audio-works-video-does-not/

As well as applying this fix, you might check the affected machines have the latest drivers and codec versions. Finally, if possible, you may consider re-coding the content to a format that doesn't produce the display problems (if the bug is codec related.)

Using hardware acceleration is certainly more energy-efficient - according to this Intel report, almost twice as much energy is used without acceleration, and as there are 800 machines, there's reason to seek out a green solution.



来源:https://stackoverflow.com/questions/2913052/how-to-turn-off-video-acceleration-programmatically

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!