Log in

View Full Version : Windows Media Player has Memory Leak Playing Avisynth Files


MysteryX
10th May 2018, 04:50
I have written a .NET software to tune music to 432hz via Avisynth and play it in a Windows Media Player ActiveX control.
https://github.com/mysteryx93/NaturalGroundingPlayer

It's working fine. HOWEVER, it has a serious memory leak! Over time, playing Avisynth files in Windows Media Player causes the system to freeze and stall -- to a point where Task Manager stops displaying processes, and sometimes Reboot doesn't even work anymore.

Obviously I'm not hoping for an updated version of Windows Media Player that will fix this issue.

Is there another alternative for playing AVS files (audio) within a .NET application that won't cause the system to stall over time?


It was a more serious issue with another application that was playing 30 audios at a time. Now that I think of it, this app wasn't using Avisynth to play the audio files, and it caused more serious system stalls -- so perhaps it's WMP control as a whole that is bugged, and not related to Avisynth. In this case, I switched to using NAudio for playing the files and it worked perfectly -- but it won't support playing AVS files.

Mounir
11th May 2018, 20:47
TRy MPC HC, should be bug free

MysteryX
11th May 2018, 21:44
There is no such thing as a MPC-HC ActiveX control. AFAIK it only exists as a stand-alone application with poor API support.

LemMotlow
12th May 2018, 03:33
Windows Media is crap. Has been crap for years. Will be crap tomorrow.

MysteryX
12th May 2018, 03:41
Windows Media is crap. Has been crap for years. Will be crap tomorrow.
Now what's the alternative in this case?

Just did a bit of research. As alternative media player components, there is this .NET wrapper of VLC, but VLC doesn't support AVS files.
https://forum.videolan.org/viewtopic.php?f=32&t=58438

There is also DirectShow.Net library, but this might be too low-level for my needs, and probably would require a lot of coding around it
http://directshownet.sourceforge.net/

As for MPC-HC ActiveX support... (8 years ago)
https://trac.mpc-hc.org/ticket/709

If I remember correctly, someone had written a way to play or preview Avisynth scripts in .NET, but I'd have to find that code again to see what it supports.

tormento
12th May 2018, 09:32
Now what's the alternative in this case?
Have you tried https://forum.doom9.org/showthread.php?p=1692023#post1692023 ?

MysteryX
12th May 2018, 18:08
AFAIK it doesn't have support for embedded player within an application, but I can ask them if there's any plan for such support -- that would be the ideal option, native .NET player without hacked interface.

hello_hello
14th May 2018, 19:05
Much of what you're asking is over my head, but SMPlayer opens Avisynth scripts on my PC, which I assume means MPlayer can. Is something like this of any use?
https://github.com/majorsilence/MPlayerControl/wiki
https://www.codeproject.com/Articles/176354/Simple-Mplayer-Front-End-in-C

MysteryX
14th May 2018, 20:39
Much of what you're asking is over my head
For being way above your head you posted the most relevant answer.

This MPlayer thing actually looks like a really good option. Will explore it further.