(SOLVED) New in Forums but been using KLite for several years
3 posters
Page 1 of 1
(SOLVED) New in Forums but been using KLite for several years
I've been using KLite codecs to allow AdventureMaker Gaming Software MP4 video types in the games I build for at least 10 years. Just joined the forum. Not sure what I can add, but I can start out with a question maybe?
AdventureMaker no longer works with the latest graphics cards unless I can turn off the hardware acceleration or disable the graphics card while the game is running. I'm not sure why this is, but I think it is the change in Windows Media player. I've tried to find ways around it, but no such luck. AdventureMaker hasn't had updates in many years, but there isn't a better software out there for building adventure games unless you can shell out tons of money for Unity!
Anyway, if anyone is curious I'll share the code that calls Windows Media player from AdventureMaker to run the video. Maybe someone might have an idea of what to try.
I appreciate KLite for all they have done and of course anyone here that takes the time to read this!
AdventureMaker no longer works with the latest graphics cards unless I can turn off the hardware acceleration or disable the graphics card while the game is running. I'm not sure why this is, but I think it is the change in Windows Media player. I've tried to find ways around it, but no such luck. AdventureMaker hasn't had updates in many years, but there isn't a better software out there for building adventure games unless you can shell out tons of money for Unity!
Anyway, if anyone is curious I'll share the code that calls Windows Media player from AdventureMaker to run the video. Maybe someone might have an idea of what to try.
I appreciate KLite for all they have done and of course anyone here that takes the time to read this!
- Code:
Sub PlayVideo(VideoFile, NumRepeat, ChannelNumber)
If ChannelNumber < 9 Then
'With VBScript it is currently not possible to interact with the 8 first video channels.
MsgBox "The specified video channel is invalid.", vbCritical, "Error"
Exit Sub
End If
If Action.IsComponentInstalled("NSPlay.NSPlayCtl.1") = False Then
MsgBox "Unable to find the media player component.", vbCritical, "Error"
Else
If Action.DoesComponentExist("MediaPlayer" + CStr(ChannelNumber)) = false Then
AddComponent "NSPlay.NSPlayCtl.1", "MediaPlayer" + CStr(ChannelNumber)
End If
Component("MediaPlayer" + CStr(ChannelNumber)).Object.FileName = VideoFile
Component("MediaPlayer" + CStr(ChannelNumber)).Object.PlayCount = NumRepeat
Component("MediaPlayer" + CStr(ChannelNumber)).Object.Play
End If
End Sub
Last edited by Gone2TheDogs on Wed Jul 28, 2021 4:12 am; edited 1 time in total
Gone2TheDogs- Posts : 5
Join date : 2021-07-15
Re: (SOLVED) New in Forums but been using KLite for several years
I assume the problem is that the video appears as black? And that sound works normally.
There is a compatibility issue between Windows 10 and some modern graphics drivers when using the ancient VMR7 video renderer. This render can use legacy overlay mode, which isn't supported anymore by newer drivers. Windows still uses that old renderer by default in basic DirectShow players. I know it is a common issue with NVIDIA drivers. I am not sure if it also happens with Intel and AMD.
If you open two instances of your game and play video in both a same time, then second instance will most likely have working video. This is because only the first instance uses the "broken" overlay mode.
What you can try is this:
Grab the latest version of the codec pack. During installation, on the "Additional task and options" page, enable the option to set VMR9 as the default renderer.
That will hopefully solve the problem.
It is interesting that you mention that disabling hardware acceleration also solves it. Were you using the default setting of "DXVA2 copy-back" or does it only fail with "dxva2 native"?
There is a compatibility issue between Windows 10 and some modern graphics drivers when using the ancient VMR7 video renderer. This render can use legacy overlay mode, which isn't supported anymore by newer drivers. Windows still uses that old renderer by default in basic DirectShow players. I know it is a common issue with NVIDIA drivers. I am not sure if it also happens with Intel and AMD.
If you open two instances of your game and play video in both a same time, then second instance will most likely have working video. This is because only the first instance uses the "broken" overlay mode.
What you can try is this:
Grab the latest version of the codec pack. During installation, on the "Additional task and options" page, enable the option to set VMR9 as the default renderer.
That will hopefully solve the problem.
It is interesting that you mention that disabling hardware acceleration also solves it. Were you using the default setting of "DXVA2 copy-back" or does it only fail with "dxva2 native"?
Re: (SOLVED) New in Forums but been using KLite for several years
Sorry for interfering, but how do you change it back to VMR7.
keeperofbalance.nos- Posts : 37
Join date : 2015-11-21
Re: (SOLVED) New in Forums but been using KLite for several years
Run the installer again and uncheck the option.
Did you have any problems with VMR9?
Did you have any problems with VMR9?
Re: (SOLVED) New in Forums but been using KLite for several years
No. I just wanted to be sure, that i don't accidentally switch it back in codec tweak tool by using some tweak,fix or reset.
keeperofbalance.nos- Posts : 37
Join date : 2015-11-21
Re: (SOLVED) New in Forums but been using KLite for several years
The "re-register base DirectShow filters" fix in CTT will also reset to VMR7.
I plan to add an option in CTT to change the default renderer. Then everyone can switch between VMR7 and VMR9 at any time.
Did VMR9 solve a black screen issue for you? For everyone who has tried the VMR9 option, I am curious to know the following information:
1) Which application had a problem
2) Did VMR9 solve it or not
3) Which graphics card do you have
4) If disabling hardware acceleration in the video decoder also solves the problem
If there are many situations where VMR9 has a positive effect, then I can consider enabling the option by default in the future. It also useful to know which programs have issues with VMR7.
I plan to add an option in CTT to change the default renderer. Then everyone can switch between VMR7 and VMR9 at any time.
Did VMR9 solve a black screen issue for you? For everyone who has tried the VMR9 option, I am curious to know the following information:
1) Which application had a problem
2) Did VMR9 solve it or not
3) Which graphics card do you have
4) If disabling hardware acceleration in the video decoder also solves the problem
If there are many situations where VMR9 has a positive effect, then I can consider enabling the option by default in the future. It also useful to know which programs have issues with VMR7.
Re: (SOLVED) New in Forums but been using KLite for several years
Sorry for the late response. I was out of town.
What you can try is this:
Grab the latest version of the codec pack. During installation, on the "Additional task and options" page, enable the option to set VMR9 as the default renderer.
That will hopefully solve the problem.
I look at the media players in the KLite folder, they were set at VMR9.
The next thing I will try is to reinstall KLite and set VMR9 as the default.
I'll report back soon!
- This is correctAdmin wrote:I assume the problem is that the video appears as black? And that sound works normally.
- I tested this and you are correct!Admin wrote:If you open two instances of your game and play video in both a same time, then second instance will most likely have working video. This is because only the first instance uses the "broken" overlay mode.
What you can try is this:
Grab the latest version of the codec pack. During installation, on the "Additional task and options" page, enable the option to set VMR9 as the default renderer.
That will hopefully solve the problem.
- I'm a bit illiterate when it comes to A/V settings. It reminds me of talking to a network guy and he's talking about rings, tokens, and the like!Admin wrote:It is interesting that you mention that disabling hardware acceleration also solves it. Were you using the default setting of "DXVA2 copy-back" or does it only fail with "dxva2 native"?

I look at the media players in the KLite folder, they were set at VMR9.
The next thing I will try is to reinstall KLite and set VMR9 as the default.
I'll report back soon!
Gone2TheDogs- Posts : 5
Join date : 2021-07-15
Re: (SOLVED) New in Forums but been using KLite for several years
You should NOT change the renderer to VMR9 in Media Player Classic. You should use "Enhanced Video Renderer (Custom Presenter)" or "MPC Video Renderer".
You should only change the installer option I mentioned. Nothing else.
VMR9 is not the best renderer. But it is better than VMR7 and it is a standard renderer from Windows, which makes it a good alternative.
You should only change the installer option I mentioned. Nothing else.
VMR9 is not the best renderer. But it is better than VMR7 and it is a standard renderer from Windows, which makes it a good alternative.
Re: (SOLVED) New in Forums but been using KLite for several years
Magic!
I'm in your debt!
VMR9 did the trick.
You had asked about the decoding method I was using. It was set to DXVA2 copy-back. I kept this setting based on what I read on the KLite documentation.
Very much appreciated.
I'm in your debt!
VMR9 did the trick.
You had asked about the decoding method I was using. It was set to DXVA2 copy-back. I kept this setting based on what I read on the KLite documentation.
Very much appreciated.
Gone2TheDogs- Posts : 5
Join date : 2021-07-15
Re: (SOLVED) New in Forums but been using KLite for several years
Okay...so it is working great...but there is just one thing...
Now after the video is finished, the screen doesn't clear. Not sure if this is solvable from KLite or not, but thought I should check.
I normally wouldn't have to, but I tried using the Stop routine in AdventureMaker. See code below. (just in case it might help solve this issue):
Now after the video is finished, the screen doesn't clear. Not sure if this is solvable from KLite or not, but thought I should check.
I normally wouldn't have to, but I tried using the Stop routine in AdventureMaker. See code below. (just in case it might help solve this issue):
- Code:
Sub StopVideoWin7(ChannelNumber)
If ChannelNumber < 9 Then
'With VBScript it is currently not possible to interact with the 8 first video channels.
MsgBox "The specified video channel is invalid.", vbCritical, "Error"
Exit Sub
End If
If Action.DoesComponentExist("MediaPlayer" + CStr(ChannelNumber)) = true Then
Component("MediaPlayer" + CStr(ChannelNumber)).Object.Stop
RemoveComponent "MediaPlayer" + CStr(ChannelNumber)
End If
End Sub
Last edited by Gone2TheDogs on Fri Jul 30, 2021 12:42 am; edited 1 time in total (Reason for editing : added code)
Gone2TheDogs- Posts : 5
Join date : 2021-07-15
Re: (SOLVED) New in Forums but been using KLite for several years
After removing the player object, you need to redraw that area (or the whole window). For example with InvalidateRect or something similar.
Re: (SOLVED) New in Forums but been using KLite for several years
You got me thinking and after a bit of digging I found the "RemoveComponent" command. I added it to the stop video routine and now it works. Many thanks!!
Gone2TheDogs- Posts : 5
Join date : 2021-07-15
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|