View Full Version : Media Player .NET (MPDN) - D3D HQ GPU Video Renderer [v2.49.0/v1.31.0 27 Dec 2018]
Zachs
18th February 2019, 08:44
Not that simple. There's a lot of ASM code that won't be compatible.
trandoanhung1991
18th February 2019, 10:29
Hi, I've searched around for the cause of this issue but so far I haven't seen a fix.
MPDN crashes when not using DX9 rendering mode:
===================================
Operation is not valid due to the current state of the object. (Mpdn.RenderScript)
------------------------------
Error Type = System.InvalidOperationException
Error Message = Operation is not valid due to the current state of the object.
Error Source = Mpdn.RenderScript
Error Site = Void SetRenderer(Mpdn.IRenderer)
Error occurred = at Mpdn.RenderScript.Renderer.SetRenderer(IRenderer renderer)
at Mpdn.D3D9VideoRenderer.VideoRenderer.A(IWin32Window , IWin32Window , FrameComposerType , Boolean , Boolean , Boolean , Boolean )
at Mpdn.D3D9VideoRenderer.VideoRenderer..ctor(IWin32Window , IWin32Window , FrameComposerType , Int32 , Boolean , Boolean , Boolean , Boolean )
at B.M.A(Form , FrameComposerType , Int32 , Boolean , Boolean , Boolean , Boolean )
at MediaPlayerDotNet.MainForm.K()
at MediaPlayerDotNet.MainForm.g()
at MediaPlayerDotNet.MainForm.m(Object , EventArgs )
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at C.R.OnLoad(EventArgs )
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at C.R.WndProc(Message& )
at MediaPlayerDotNet.MainForm.WndProc(Message& )
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
OS Version = Microsoft Windows NT 6.3.9600.0
Total Physical Memory = 7.9 GB
Available Physical Memory = 4.2 GB
Date Time = 2/18/2019 4:22:20 PM
User Name = FX504GM-PAWNAGE\Hung
Application Startup Path = C:\Program Files\MPDN
Application Executable Path = C:\Program Files\MPDN\MediaPlayerDotNet.exe
CurrentDirectory = C:\Program Files\MPDN
SystemDirectory = C:\Windows\system32
Ran As Admin = False
HasShutdownStarted = False
MachineName = FX504GM-PAWNAGE
ProcessorCount = 12
LogicalDrives = C:\, D:\
EnvironmentVariables = COMPUTERNAME = FX504GM-PAWNAGE; USERPROFILE = C:\Users\Hung; HOMEPATH = \Users\Hung; LOCALAPPDATA = C:\Users\Hung\AppData\Local; PSModulePath = C:\Program Files (x86)\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules;C:\Program Files (x86)\AutoIt3\AutoItX; PROCESSOR_ARCHITECTURE = AMD64; CommonProgramW6432 = C:\Program Files\Common Files; CommonProgramFiles(x86) = C:\Program Files (x86)\Common Files; ProgramFiles(x86) = C:\Program Files (x86); PROCESSOR_LEVEL = 6; LOGONSERVER = \\FX504GM-PAWNAGE; PATHEXT = .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC; HOMEDRIVE = C:; SystemRoot = C:\Windows; SESSIONNAME = Console; ALLUSERSPROFILE = C:\ProgramData; DriverData = C:\Windows\System32\Drivers\DriverData; APPDATA = C:\Users\Hung\AppData\Roaming; Path = C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\iCLS\;C:\Program Files\Intel\Intel(R) Management Engine Components\iCLS\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Users\Hung\AppData\Local\Microsoft\WindowsApps;; USERNAME = Hung; OneDrive = C:\Users\Hung\OneDrive; CommonProgramFiles = C:\Program Files\Common Files; OS = Windows_NT; USERDOMAIN_ROAMINGPROFILE = FX504GM-PAWNAGE; PROCESSOR_IDENTIFIER = Intel64 Family 6 Model 158 Stepping 10, GenuineIntel; OneDriveConsumer = C:\Users\Hung\OneDrive; USERDOMAIN = FX504GM-PAWNAGE; SystemDrive = C:; TEMP = C:\Users\Hung\AppData\Local\Temp; ProgramFiles = C:\Program Files; NUMBER_OF_PROCESSORS = 12; ComSpec = C:\Windows\system32\cmd.exe; TMP = C:\Users\Hung\AppData\Local\Temp; ProgramData = C:\ProgramData; ProgramW6432 = C:\Program Files; windir = C:\Windows; PROCESSOR_REVISION = 9e0a; PUBLIC = C:\Users\Public
RuntimeVersion = 4.0.30319.42000
Thread Count = 42
Handle Count = 680
VM Size = 5.2 GB
Peak VM Size = 5.2 GB
Working Set Size = 107.3 MB
Max Working Set Size = 1.3 MB
Min Working Set Size = 200 KB
Modules = MediaPlayerDotNet.exe, ntdll.dll, MSCOREE.DLL, KERNEL32.dll, KERNELBASE.dll, ADVAPI32.dll, msvcrt.dll, sechost.dll, RPCRT4.dll, mscoreei.dll, SHLWAPI.dll, combase.dll, ucrtbase.dll, bcryptPrimitives.dll, GDI32.dll, gdi32full.dll, msvcp_win.dll, USER32.dll, win32u.dll, IMM32.DLL, kernel.appcore.dll, VERSION.dll, clr.dll, MSVCR120_CLR0400.dll, mscorlib.ni.dll, ole32.dll, uxtheme.dll, RTSSHooks64.dll, WINMM.dll, winmmbase.dll, cfgmgr32.dll, System.ni.dll, CRYPTSP.dll, rsaenh.dll, bcrypt.dll, CRYPTBASE.dll, System.Core.ni.dll, MediaPlayerDotNet.ni.exe, System.Drawing.ni.dll, System.Windows.Forms.ni.dll, Mpdn.Core.ni.dll, System.Configuration.ni.dll, System.Xml.ni.dll, shell32.dll, shcore.dll, windows.storage.dll, profapi.dll, powrprof.dll, FLTLIB.DLL, comctl32.dll, dwmapi.dll, MSCTF.dll, OLEAUT32.dll, gdiplus.dll, DWrite.dll, WindowsCodecs.dll, CommandLine.ni.dll, clrjit.dll, YAXLib.ni.dll, System.Xml.Linq.ni.dll, clbcatq.dll, dataexchange.dll, d3d11.dll, dcomp.dll, dxgi.dll, twinapi.appcore.dll, RMCLIENT.dll, VideoFrameServicesNative.dll, SharpDX.Direct3D9.ni.dll, SharpDX.ni.dll, d3d9.dll, igd9dxva64.dll, crypt32.dll, MSASN1.dll, WINTRUST.DLL, imagehlp.dll, SharpDX.DXGI.ni.dll, Mpdn.RenderScript.ni.dll, TextInputFramework.dll, CoreUIComponents.dll, CoreMessaging.dll, ntmarta.dll, wintypes.dll, D3D9NativeServices.dll, SETUPAPI.dll, AVRT.dll, WTSAPI32.dll, dxva2.dll, opencl.dll, DEVOBJ.dll, nvldumdx.dll, nvd3dumx.dll, nvspcap64.dll, dbghelp.dll, dbgcore.DLL, gpapi.dll, cryptnet.dll, igdumdim64.dll, igc64.dll, WINSTA.dll, SharpDX.Direct3D11.ni.dll, nvwgf2umx.dll, IntelOpenCL64.dll, intelocl64.dll, task_executor64.dll, cpu_device64.dll, igdrclneo64.dll, WS2_32.dll, igdfcl64.dll, Microsoft.ExceptionMessageBox.ni.dll, Microsoft.VisualBasic.ni.dll, diasymreader.dll, SspiCli.dll, psapi.dll
------------------------------
Program Location:
at Mpdn.RenderScript.Renderer.SetRenderer(IRenderer renderer)
at Mpdn.D3D9VideoRenderer.VideoRenderer.A(IWin32Window , IWin32Window , FrameComposerType , Boolean , Boolean , Boolean , Boolean )
at Mpdn.D3D9VideoRenderer.VideoRenderer..ctor(IWin32Window , IWin32Window , FrameComposerType , Int32 , Boolean , Boolean , Boolean , Boolean )
at B.M.A(Form , FrameComposerType , Int32 , Boolean , Boolean , Boolean , Boolean )
at MediaPlayerDotNet.MainForm.K()
at MediaPlayerDotNet.MainForm.g()
at MediaPlayerDotNet.MainForm.m(Object , EventArgs )
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at C.R.OnLoad(EventArgs )
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at C.R.WndProc(Message& )
at MediaPlayerDotNet.MainForm.WndProc(Message& )
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Any idea where I should begin troubleshooting?
Also, currently DX9 crashes upon playback.
hooddy
18th February 2019, 13:33
Not that simple. There's a lot of ASM code that won't be compatible.
Well... Got it. Thanks anyway, it's valuable.
Zachs
19th February 2019, 07:55
Ringing seems to be nearly non existent now
https://imgur.com/download/nPsPeCm
https://i5.yapics.com/02/19/5319Qp6a02.png
madshi
19th February 2019, 08:47
Hard to judge with all those JPEG artifacts! Ringing appears to be much better, but it's also much softer now, overall.
Zachs
19th February 2019, 09:21
Yeah didn't realise Imgur saved it as JPG. I'll re-upload later.
I was under the impression users didn't like it too sharp?
nevcairiel
19th February 2019, 09:30
Personally I would say that sharpness is good as long as it doesn't come at the expense of visible/distracting artifacts - which is often a problem with previously compressed source material, as source-based artifacts result in post-scaling artifacts as well.
madshi
19th February 2019, 09:38
I was under the impression users didn't like it too sharp?
There's no clear consensus among users. Many like it sharp, others like it a bit softer. It can also depend on the scaling factor. E.g. at 4x going very sharp can result in cartoon like images (very sharp edges but no texture detail), while at 2x that's less of a problem. And it can depend on the content, as well. If the content is extremely soft, using an algorithm which rings a bit may not hurt at all.
Among those users who like it sharp, there are some who don't like ringing, and there are some that are ok with some ringing if it results in much sharper results.
Zachs
19th February 2019, 09:44
Lol. Looks like it's best to let them decide then. I might do a few and ultimately let the user decides which is best for them.
Zachs
19th February 2019, 12:47
Updated the upsampled image with PNG one
patul
20th February 2019, 03:14
I compared it to the result of waifu2x, the difference is visible, and indeed your result is bit softer. I know waifu2x was intended for artwork, however for this particular image (castle), it gives surprisingly pleasant result (Noise Reduction: none, Style: photo, Upscaling: 2x).
Zachs
20th February 2019, 08:22
Waifu2x is impossibly slow on even modern GPUs. It wouldn't make sense to implement it in a video player.
madshi
20th February 2019, 09:45
It's definitely much better in terms of ringing now. Of course it got a bit softer, as a result, but that's the trade you probably have to make when trying to avoid ringing. On the positive side: A clean image can be post-sharpened.
Zachs
20th February 2019, 10:05
Part of the problem of the original post was the downscaled image. It had a fair bit of ringing to it so in way it was preserving all the details including the ringing noise. I had to take a high res image and downscaled it myself to produce a cleaner one. The original implementation did have a bit more ringing but the perceived sharpness was largely due to ringing in the downscaled image.
huhn
20th February 2019, 13:37
while your original small image had ringing it was heavily amplified by your scaling algorithm.
it looks like this new low ringing image can be scaled without any major issues that's a huge improvement.
Zachs
20th February 2019, 14:17
More images to test ringing.
https://i5.yapics.com/02/20/53202XuD02.png
https://i5.yapics.com/02/20/5320GyL002.png
https://i5.yapics.com/02/20/5320Vy3Z02.png
https://i4.yapics.com/02/20/4320yjPZ02.png
huhn
24th February 2019, 21:13
did you think about using FP16 which may be accurate enough and is natively supported on new nvidia GPUs and AMD vega?
i know you wanted to test it on a 970 but if this FP16 works as advertised you should get quite a performance boost.
Aurelian
24th February 2019, 22:17
Hi. I'm a new member and have been using MPDN for a while with LAV filters. Unfortunately, I can't seem to get it to work when I use the DirectX 11 presentation API. It just crashes and won't start again.
Specs:
Dell Inspiron 7559
Win 10 x64 Home Edition
Nvidia GTX 960M
MPDN ver 2.49.0.3606
Would updating to a newer version solve said issue, or is there another workaround?
Either way, where could I get the latest updated builds? I can't seem to find where the newly united team are posting builds, unless I missed something.
Sorry for the rambling post and thanks everyone for your help.
Zachs
27th February 2019, 08:28
did you think about using FP16 which may be accurate enough and is natively supported on new nvidia GPUs and AMD vega?
i know you wanted to test it on a 970 but if this FP16 works as advertised you should get quite a performance boost.
I don't have a newer card to test with. But from what I found, OpenCL on NVIDIA doesn't do fp16. But feel free to correct me.
huhn
27th February 2019, 12:37
no they just made a lot of wind with FP16 for tensor and general compute for CUDA.
so much potential wasted by simply not caring for openCL.
this type of code will run terrible on none turing/volta cards anyway.
27 Tflops hidden behind missing openCL support what a waste.
nevcairiel
27th February 2019, 13:06
NVIDIA never cared about OpenCL, and they are certainly not going to start now, especially since OpenCL is basically deprecated in favor of Vulkan Compute Shaders - which support FP16 on NVIDIA.
Honestly, any new code in OpenCL is probably a mistake, and you should look into Vulkan instead, which actually has a pretty wide support base on Windows already.
Shiandow
27th February 2019, 20:20
PS 3.0 it is then.
Zachs
1st March 2019, 10:08
Finally managed to optimise it enough to run at 13ms to do a 2x upscale of DVD res. 1080p to 4k is out for GTX 970 at 67ms but any recent cards like GTX 1070 should do just fine.
Big thanks to Shiandow for his valuable insights!
Now we just need to port it to MPDN renderscript.
Zachs
12th March 2019, 14:51
Created an extreme quality version for 3x upscale (most likely will require 2080ti and above to do 720p to 4k uspcale).
https://i2.yapics.com/03/12/2312hNDo03.png
https://i4.yapics.com/03/12/4312GhAk03.png
Normal quality version will run real time without a problem for for 720p to 4k upscale even on my old 970.
foozoor
12th March 2019, 17:38
No normal quality screen to compare?
Zachs
12th March 2019, 22:52
Normal quality is not nearly as good but for other images it's not as pronounced as this one. This one has lots of high frequency components.
https://i4.yapics.com/03/12/4312GijS03.png
ryrynz
12th March 2019, 22:56
The first thing that stands out to me with this upscale is the strength of the darkening of the lines creating an almost cartoonish appearance, can that be reigned in a little?
Zachs
12th March 2019, 22:56
That said however, it still fared very well against other state of the art scalers.
Zachs
12th March 2019, 22:57
The first thing that stands out to me with this upscale is the strength of the darkening of the lines creating an almost cartoonish appearance, can that be reigned in a little?
That's how the original image looks like. You can artificially blur it though but that would drop SSIM significantly vs ground truth.
Zachs
14th March 2019, 14:17
Finally managed to optimise it enough to run at 13ms to do a 2x upscale of DVD res. 1080p to 4k is out for GTX 970 at 67ms but any recent cards like GTX 1070 should do just fine.
Big thanks to Shiandow for his valuable insights!
Now we just need to port it to MPDN renderscript.
After many rounds of optimisations, 1080p to 2160p only needs 18ms on my GTX 970!
720p to 1440p is 9ms.
3x from 720p to 2160p is 35ms.
Zachs
14th March 2019, 14:27
3x upscale sample (720p to 2160p):
Original: http://s000.tinyupload.com/index.php?file_id=71145458854064098138
3x: http://s000.tinyupload.com/index.php?file_id=07887740499290546766
huhn
14th March 2019, 18:09
any ETA when user will get there and on it?
it's easier to find issues with the scaler this way and if proper way to reproduce are given to you you maybe able to improve on it.
Zachs
14th March 2019, 22:57
This will be the baseline model. Any improvements will be looked at after we get this one done.
Anima123
10th April 2019, 00:59
Zachs, how's it going on with incorporating your new scaling into MPDN? I'm asking since it's been a while, and am still looking forward to it.
mlauzon
20th April 2019, 22:34
https://i.imgur.com/Tqs0AdK.png
https://i.imgur.com/yQwNpb9.png
I know it's completely off topic, but that's 55 King St. W. in Toronto...wonder if anyone else from Toronto noticed that.
Was too busy with work lately to work on it. Will try to continue when I get some spare time. It just needs to be written as a renderscript.
louiebh
20th May 2019, 10:35
whats the latest version and where can we download it because your personal website is down!
im happy this project isnt folded up yet!
Could i also get help with the Reclock script? mine is basically saying "Audioscript could not initialize" and the in brackets (AMD/Intel OpenCL drivers unavailable)?
Zachs
23rd May 2019, 01:04
I've hosted it on AWS S3. The latest is on the OP. I've had no time to maintain a website so I've shut it down.
You'll need to read OP to setup OpenCL drivers so you can use audio scripts.
dave_in_gva
31st May 2019, 15:12
Zach,
Can you unpack some of your acronyms above? What is the URL for downloading the latest installer? I'm afraid it is not clear to me what you mean by:
"I've hosted it on AWS S3. The latest is on the OP."
I've been using MPDN for 3+ years and love it. My laptop died and I am setting things up on a new one and have been getting error messages with my original installer.
Thankyou if you can steer me to the latest build.
Best wishes,
Dave M
https://s3.amazonaws.com/mediaplayerdotnet-releases/Latest/Installers/MediaPlayerDotNet_x64_2_49_0_3606_Installer.exe
you can find all links and information in the first post also known as a original post (OP).
dave_in_gva
1st June 2019, 06:26
Thanks Huhn - I had seen AWS meant Amazon and so have uninstalled my prior version as it threw an error and reinstalled from AWS.
Thing is I still am getting the following error on launching MPDN. This is on my x64-based Surface Pro 4/i5:
mscorlib Error
1 is not a supported code page.
Parameter name: codepage (mscorlib)
MPDN comes up but all menus are greyed out and I can't operate the program.
This has been the same error I've been getting with installation of packages from earlier builds. In the most recent installation I removed the prior installation (including the MPDN configuration files) and reinstalled from the AWS package.
Any ideas? I would love to get back to using MPDN and it has never given me troubles before. Only thing to add is that in reinstalling things on this new laptop I have installed the most recent version (4.8) of Microsoft Net Framework.
dave_in_gva
1st June 2019, 07:10
Sorry, forgot to add one more behaviour. After launching MPDN a second error message comes up, saying:
MediaPlayerDotNet Error
Object reference not set to an instance of an object. (MediaPlayerDotNet)
Thanks again for any help on this.
sorry i had major problem getting this to work since windows 10 so not much i can help with that.
Sephiroth_FF
23rd June 2019, 08:08
So glad to see my favorite player is going to get new features!
I do know there was a couple of questions about HDR a few pages ago but, most of it was about HDR to SDR conversion and I was wandering if there is any plan to also support native HDR monitors too? In Windows 10, I can enable "Play HDR games and apps" in "Windows HD Colors settings" and VLC will output HDR video files natively to my monitor. Though, it would maybe require MPDN to have a DirectX 12 renderer?
Speaking of DX12, I have seen some of the amazing new scaler samples and since DX12 has support for explicit multi-gpu, could MPDN use multiple gpus for the rendering and shave off even more more milliseconds or even nearly halve the compute time? My computer has two 1080Ti in SLI and a 980Ti for PhysX and I would love if MPDN could use it all!
Finally, would be awesome to have Dolby Atmos and DTS:X object-based audio output to the new Windows Spatial Sound API like Windows Sonic, etc.
Sorry for making so many requests but MPDN has always been the most cutting edge player for me and I am super happy development might pick up again and a big thank to all who worked on this amazing player!
louiebh
30th October 2019, 10:13
hope this project is still going, sadly i still couldnt find a fix for th openCL audio scripts couldnt be initialised error i tried installing latest opencl drivers for intel and latest nvidia drivers and the reclockaudio script still doesnt work lost for options :(
in the op doesnt really direct someone on how to get it working too tried a bit of googling but its not a popular error
stax76
31st October 2019, 02:12
It still does not start on UHD 288 DPI.
ktsbkt
8th November 2019, 08:11
Is there a chance you will implement screenshot output of various jpeg quality ranges like MPC-HC?
I would like to recommend this player to my friends, but probably won't be able to do so since we like to share screenshots and discuss them etc.
Kein
29th November 2019, 05:50
Render Scripts are quite similar to AviSynth scripts and plugins except they run fully on the GPU. You can script Render Scripts in a similar fashion to AviSynth with a C# syntax, or an AviSynth-like syntax with the full power of JavaScript behind it. As opposed to madVR's mostly closed source nature, MPDN's Render Scripts are fully open source and are hosted on GitHub.
I have a question. AviSynth can process YUV420 "natively" in some cases, without any color conversion, for example, some fade-out effect or subtitles I can add without color conversion, but big guys like Vegas or Adobe work in RGB space for all of their effects to be available so the raw recorded in YUV420 video gets converted to RGB regardless with some data loss.
How is NP.NET's Render Script in this regard? I guess essentially I'm asking if I can use it as a replacement to AviSynth to some extent.
foxyshadis
21st December 2019, 11:05
I have a question. AviSynth can process YUV420 "natively" in some cases, without any color conversion, for example, some fade-out effect or subtitles I can add without color conversion, but big guys like Vegas or Adobe work in RGB space for all of their effects to be available so the raw recorded in YUV420 video gets converted to RGB regardless with some data loss.
How is NP.NET's Render Script in this regard? I guess essentially I'm asking if I can use it as a replacement to AviSynth to some extent.
Renderscript runs in your choice of colorspace. You can leave it as YUV or convert it to RGB, but it's ALWAYS in float with a minimum of 16-bit. You have to go out of your way to truncate it to 8-bit before going back to a 16-bit processing chain.
ashlar42
2nd May 2020, 23:56
Has development for this stopped?
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.