Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
|
|
Thread Tools | Search this Thread | Display Modes |
1st September 2014, 08:05 | #1 | Link |
Suptitle, MediaPlayer.NET
Join Date: Nov 2001
Posts: 1,721
|
Media Player .NET (MPDN) - D3D HQ GPU Video Renderer [v2.49.0/v1.31.0 27 Dec 2018]
Hi everyone,
MPDN is a modern extensible media player written in .NET (with performance critical parts in ASM/SSE2) featuring a fully integrated high quality Direct3D 9, 10, 11 video renderer that is equally extensible. In fact, its most powerful features come from its open source community contributed extensions called MPDN Extensions hosted on GitHub. Both madVR and libretro use portions of code from MPDN Extensions. MPDN Extensions MPDN Extensions consist of Custom Linear Scalers, Render Scripts, Audio Scripts and Player Extensions. For more information, see MPDN Extensions wiki page. Custom Linear Scalers These custom linear scalers extend MPDN by adding Sinc-Blackman, Gaussian etc. scaling options. If there's a new scaler you want to add, give it a kernel function and MPDN will do the rest. The same custom scalers can also be used in the EWA scaler (via Render Script). Render Scripts 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.
Audio Scripts Audio Scripts are similar in concept to Render Scripts except they operate on audio samples. Audio Scripts can run purely on the CPU, interface with third party audio libraries or with OpenCL via Cudafy. See this 2x Audio Gain example.
Player Extensions Player Extensions allows the player to be extended via C# script. In fact MPDN's playlist is fully implemented via this extension. See this post for a getting started example.
Full UI Mode Minimal UI Mode Minimal UI Mode with Playlist Features:
Pre-requisites:
Troubleshooting:
User contributed articles: Special thanks:
Downloads (Latest version MPDN v2.49.0 / Extensions v2.0.0):
Changelogs Code:
Extensions ---------- v1.31.0 Changelog: Render Scripts Revised tag system again Deband experimental: Handle Luma and Chroma separately to improve quality SSIMDownscaling: Improvements Audio Scripts [NEW] Crossfeed: Helps reduce listening fatigue caused by the unnatural stereo image provided by headphones Player Extensions [NEW] OnScreenDisplay Framework Speedup disposing tremendously (noticeable when changing scripts) v1.30.0 Changelog: Render Scripts Revised tag system ImageProcessor: Add option to do all processing in YUV SSSR improvements Fix Conditionals causing scripts to fail to load on some systems Bilateral: Krig more fine tuning Deband improvements Player Scripts TextPainter: Allow it to work in windowed mode Code:
MPDN ---- v2.49.0 Changelog: Show more informative error messages Fix: Some usage paths may lead to old ditherers being used instead of the new ones v2.48.0 Changelog: Improved fluid motion by timing frames more accurately Improved dithering methods (especially ordered dithering) Fixed: Pixels were misaligned when there was an unequal number of blank lines on either side of the image. v2.47.0 Changelog: MPDN is now signed with a commercial code-signing certificate Cheers. Last edited by Zachs; 18th October 2024 at 13:34. |
1st September 2014, 11:00 | #2 | Link |
Registered User
Join Date: Oct 2012
Posts: 8,192
|
first of all it is work totally fine. it is missing a lot of totally basic stuff like subtitle support, audio volume.
why did you start with 4 taps not 3? 4 is usually way to sharp in my eyes. I haven't done any picture quality comparison but does it use high bit deep and/or dither? does it really use the GPU? gpu-z doesn't show anything |
1st September 2014, 12:29 | #3 | Link | |
Suptitle, MediaPlayer.NET
Join Date: Nov 2001
Posts: 1,721
|
Quote:
I don't know what madvr's 3 tap really is. But in my renderer 4 taps means it takes 4x4 texels to calculate the resulting scaled pixel. GPUs calculate in 32 bit floats by default and that's what my renderer uses. What exactly does high bit depth and dithering do? Dithering I assume is to do with conversion from yuv to rgb? Are u using an amd card? On my amd card Gpu-z seems to show no gpu usage until a certain threshold. But yes it's definitely using gpu for scaling and yuv to grb conversion. I don't think the cpu is near enough for 60fps full screen 1080p jinc |
|
1st September 2014, 12:41 | #4 | Link |
Registered Developer
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 10,369
|
4x4 is two taps (ie 2 pixels in each direction), or also called bicubic.
__________________
LAV Filters - open source ffmpeg based media splitter and decoders |
1st September 2014, 13:02 | #6 | Link |
Registered Developer
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 10,369
|
If you go from a center point (ie. your target pixel), its 2 pixels to each edge, for a full grid of 4x4
The naming of these things is kinda inconsistent among different tools, but madVRs 3/4-tap filters function like I outlined here, bicubic is basically 2-tap, and the other filters with 3/4 tap configuration use more pixels.
__________________
LAV Filters - open source ffmpeg based media splitter and decoders |
1st September 2014, 13:22 | #7 | Link | |
Suptitle, MediaPlayer.NET
Join Date: Nov 2001
Posts: 1,721
|
Quote:
EDIT: MPDN's 'tap' counting is based on AviSynth's as documented here: http://avisynth.nl/index.php/Lanczos_lobs/taps Last edited by Zachs; 13th October 2014 at 08:17. |
|
2nd September 2014, 06:39 | #9 | Link |
Suptitle, MediaPlayer.NET
Join Date: Nov 2001
Posts: 1,721
|
Does anyone know where I could find a sample mkv/mp4 with multi-track audio for testing purposes?
*Edit: Nevermind. I found a sample and I've released v1.1. Last edited by Zachs; 2nd September 2014 at 07:29. |
2nd September 2014, 21:24 | #10 | Link |
Registered Developer
Join Date: Sep 2006
Posts: 9,140
|
You may want to sign your exe file to avoid AV false alarms. Virustotal reports 2/54 for your x86 download. Usually signing your exe helps with this problem.
FWIW, on my development PC (win8.1 x64) playback with your software doesn't seem to work. I'm getting the exception "An unexpected error 'System.Reflection.TargetInvocationException' has occurred". Also, I have to use the "File -> Open" dialog. Drag&Drop is rejected by the media player. How to count taps? Different people have different opinions on that. What madVR calls 2 taps, and you call 4 taps, some marketing guys even call 16 taps (4x4 = 16). In the end it doesn't matter much, I guess. On a side note, personally I find Lanczos, Spline and Jinc with 2 taps (in your case 4 taps) to be not worth the effort. They don't look better than Bicubic to my eyes. That's why madVR starts at 3 taps with those algorithms (which you count as 6 taps). If you want to know what dithering is for, try playing the "colors.ytp" test pattern with madVR with dithering turned off vs. on. Then try playing it with your media player. If you don't do dithering, it will probably look quite ugly. Or alternatively try zooming the "smallramp.ytp" pattern up to fullscreen, then turn dithering off vs. on. With dithering off, you should see faint vertical bands in madVR. With dithering on, the gray ramp should be perfectly smooth. The problem is that your final rendering result should be 32bit, while the GPU really only outputs 8bit. If you round to 8bit, you're introducing quantization artifacts. So you *have* to dither, to avoid those artifacts. This is a concept well known from the audio processing world. I've introduced this concept to the HTPC video processing world a couple of years ago, when madVR was introduced. At that time (to my best knowledge) nobody else used dithering in video processing. Dithering is well known when trying to convert gray scale images to black & white. E.g. see here: http://en.wikipedia.org/wiki/Dither Basically converting gray scale -> black & white means reducing bitdepth from 8bit to 1bit. When doing that, using dithering produces much better results than simple rounding. The same principle still applies when reducing the bitdepth from 32bit to 8bit, although the benefits of dithering are much smaller there compared to 8bit -> 1bit. Here's the download of the "colors.ytp" test pattern with the DirectShow filter needed for that test pattern: http://madshi.net/madTestPatternSource.zip Last edited by madshi; 2nd September 2014 at 21:27. |
3rd September 2014, 13:37 | #11 | Link |
Registered Developer
Join Date: Sep 2006
Posts: 9,140
|
See here:
Code:
=================================== An unexpected error 'System.Reflection.TargetInvocationException' has occurred. ------------------------------ Error Type = System.Reflection.TargetInvocationException Error Message = Ein Aufrufziel hat einen Ausnahmefehler verursacht. Error Source = Mpdn.Threading Error Site = Void InternalInvoke(WorkItem, Boolean) Error occurred = bei Mpdn.Threading.TaskThread.InternalInvoke(WorkItem work, Boolean wait) bei Mpdn.Threading.TaskThread.Invoke(WaitCallback work, Object state) bei Mpdn.VideoPlayer.DirectShowVideo.GetAudioTracks() bei MediaPlayerDotNet.MainForm. () bei MediaPlayerDotNet.MainForm. (String , Boolean ) bei MediaPlayerDotNet.MainForm. () bei MediaPlayerDotNet.MainForm. (Object , MouseEventArgs ) bei System.Windows.Forms.Control.OnMouseDown(MouseEventArgs e) bei System.Windows.Forms.UserControl.OnMouseDown(MouseEventArgs e) bei System.Windows.Forms.Control.WmMouseDown(Message& m, MouseButtons button, Int32 clicks) bei System.Windows.Forms.Control.WndProc(Message& m) bei System.Windows.Forms.ScrollableControl.WndProc(Message& m) bei System.Windows.Forms.ContainerControl.WndProc(Message& m) bei System.Windows.Forms.UserControl.WndProc(Message& m) bei System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) bei System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) bei 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 = 31,9 GB Available Physical Memory = 28,1 GB Date Time = 03.09.2014 14:33:55 User Name = Dev-PC\madshi Application Startup Path = D:\Desktop\MediaPlayerDotNet_x86_1_1_2_438 Application Executable Path = D:\Desktop\MediaPlayerDotNet_x86_1_1_2_438\MediaPlayerDotNet.exe CurrentDirectory = D:\Desktop\MediaPlayerDotNet_x86_1_1_2_438 SystemDirectory = C:\WINDOWS\system32 Ran As Admin = False HasShutdownStarted = False MachineName = DEV-PC ProcessorCount = 8 LogicalDrives = C:\, D:\, W:\, Y:\ EnvironmentVariables = PROCESSOR_ARCHITEW6432 = AMD64; COMPUTERNAME = DEV-PC; CommonProgramFiles(x86) = C:\Program Files (x86)\Common Files; VS80COMNTOOLS = C:\Program Files (x86)\Microsoft Visual Studio 8\Common7\Tools\; HOMEPATH = \Users\madshi; CG_BOOST_ROOT = C:\Program Files (x86)\Embarcadero\RAD Studio\7.0\include\boost_1_39; PROCESSOR_REVISION = 3a09; VS100COMNTOOLS = C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools\; PATHEXT = .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC; USERDOMAIN_ROAMINGPROFILE = Dev-PC; TEMP = C:\Users\madshi\AppData\Local\Temp; LOCALAPPDATA = C:\Users\madshi\AppData\Local; PUBLIC = C:\Users\Public; IBREDISTDIR = C:\Users\Public\Documents\InterBase\redist\InterBaseXE3; windir = C:\WINDOWS; USERDOMAIN = Dev-PC; ProgramFiles(x86) = C:\Program Files (x86); Path = C:\Program Files (x86)\Embarcadero\Studio\14.0\bin;C:\Users\Public\Documents\Embarcadero\Studio\14.0\Bpl;C:\Program Files (x86)\Embarcadero\Studio\14.0\bin64;C:\Users\Public\Documents\Embarcadero\Studio\14.0\Bpl\Win64;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Users\madshi\AMD APP SDK\2.9\bin\x86_64;C:\Users\madshi\AMD APP SDK\2.9\bin\x86;C:\Program Files (x86)\AMD APP SDK\2.9\bin\x86_64;C:\Program Files (x86)\AMD APP SDK\2.9\bin\x86;C:\Program Files (x86)\Embarcadero\RAD Studio\12.0\bin;C:\Users\Public\Documents\RAD Studio\12.0\Bpl;C:\Program Files (x86)\Embarcadero\RAD Studio\12.0\bin64;C:\Users\Public\Documents\RAD Studio\12.0\Bpl\Win64;C:\Program Files (x86)\Borland\Delphi 7\Bin;C:\Program Files (x86)\Borland\Delphi 7\Projects\Bpl\;C:\Program Files (x86)\Embarcadero\RAD Studio\11.0\bin;C:\Users\Public\Documents\RAD Studio\11.0\Bpl;C:\Program Files (x86)\Embarcadero\RAD Studio\11.0\bin64;C:\Users\Public\Documents\RAD Studio\11.0\Bpl\Win64;C:\Program Files (x86)\CollabNet;C:\Program Files (x86)\Embarcadero\RAD Studio\10.0\bin;C:\Users\Public\Documents\RAD Studio\10.0\Bpl;C:\Program Files (x86)\Embarcadero\RAD Studio\10.0\bin64;C:\Users\Public\Documents\RAD Studio\10.0\Bpl\Win64;C:\Program Files (x86)\Embarcadero\RAD Studio\9.0\bin;C:\Users\Public\Documents\RAD Studio\9.0\Bpl;C:\Program Files (x86)\Embarcadero\RAD Studio\9.0\bin64;C:\Users\Public\Documents\RAD Studio\9.0\Bpl\Win64;C:\Program Files (x86)\Embarcadero\RAD Studio\8.0\bin;C:\Users\Public\Documents\RAD Studio\8.0\Bpl;C:\Program Files (x86)\Embarcadero\RAD Studio\7.0\bin;C:\Users\Public\Documents\RAD Studio\7.0\Bpl;C:\Program Files (x86)\CodeGear\RAD Studio\6.0\bin;C:\Users\Public\Documents\RAD Studio\6.0\Bpl;C:\Program Files (x86)\CodeGear\RAD Studio\5.0\bin;C:\Users\Public\Documents\RAD Studio\5.0\Bpl;C:\Windows\Microsoft.NET\Framework\v1.1.4322\;C:\Program Files (x86)\Borland\BDS\4.0\Bin;C:\Program Files (x86)\Borland\Shared\BDE\;C:\Program Files (x86)\Borland\BDS\3.0\Bin;C:\PROGRA~2\Borland\CBUILD~2\Bin;C:\PROGRA~2\Borland\CBUILD~2\Projects\Bpl;C:\PROGRA~2\Borland\DELPHI~2\Projects\Bpl;C:\PROGRA~2\Borland\DELPHI~2\Bin;C:\PROGRA~2\Borland\Delphi5\Projects\Bpl;C:\PROGRA~2\Borland\Delphi5\Bin;C:\PROGRA~2\Borland\CBUILD~1\Projects\Bpl;C:\PROGRA~2\Borland\CBUILD~1\Bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Common Files\Roxio Shared\DLLShared\;C:\Program Files\EmEditor;C:\PROGRA~2\Borland\DELPHI~4\Bin;C:\PROGRA~2\Borland\DELPHI~4\Projects\Bpl;C:\Sources\eac3to;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\Windows Kits\8.0\Windows Performance Toolkit\;C:\Program Files (x86)\CineForm\Tools;C:\Program Files (x86)\Intel\OpenCL SDK\3.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\3.0\bin\x64;C:\Program Files (x86)\Intel\OpenCL SDK\3.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\3.0\bin\x64;C:\Program Files (x86)\Intel\OpenCL SDK\3.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\3.0\bin\x64;C:\Program Files (x86)\Intel\OpenCL SDK\3.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\3.0\bin\x64;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Users\madshi\Documents\Borland Studio Projects\Bpl;C:\PROGRA~2\Borland\DELPHI~3\Bin;C:\Program Files (x86)\Python27;C:\Program Files (x86)\Python27\Scripts; MINGW = C:\mingw; PROCESSOR_LEVEL = 6; PROCESSOR_IDENTIFIER = Intel64 Family 6 Model 58 Stepping 9, GenuineIntel; DXROOT = C:\Program Files (x86)\Visual Studio 2005 SDK\2007.02\VisualStudioIntegration\Tools\Sandcastle\; PSModulePath = C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\; NUMBER_OF_PROCESSORS = 8; CommonProgramFiles = C:\Program Files (x86)\Common Files; JAM_TOOLSET = MINGW; ProgramData = C:\ProgramData; ProgramW6432 = C:\Program Files; ProgramFiles = C:\Program Files (x86); BDSCOMMONDIR = C:\Users\Public\Documents\RAD Studio\5.0; FP_NO_HOST_CHECK = NO; TMP = C:\Users\madshi\AppData\Local\Temp; SESSIONNAME = Console; SystemRoot = C:\WINDOWS; CommonProgramW6432 = C:\Program Files\Common Files; LOGONSERVER = \\DEV-PC; USERPROFILE = C:\Users\madshi; APPDATA = D:\Eigene Dateien\AppData; HOMEDRIVE = C:; VS110COMNTOOLS = C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\Tools\; USERNAME = madshi; PROCESSOR_ARCHITECTURE = x86; OS = Windows_NT; ComSpec = C:\WINDOWS\system32\cmd.exe; SystemDrive = C:; AMDAPPSDKROOT = C:\Program Files (x86)\AMD APP SDK\2.9\; INTELOCLSDKROOT = C:\Program Files (x86)\Intel\OpenCL SDK\3.0\; ALLUSERSPROFILE = C:\ProgramData RuntimeVersion = 4.0.30319.34014 Thread Count = 50 Handle Count = 882 VM Size = 474,1 MB Peak VM Size = 474,1 MB Working Set Size = 165,2 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, SspiCli.dll, CRYPTBASE.dll, bcryptPrimitives.dll, mscoreei.dll, SHLWAPI.dll, combase.dll, USER32.dll, GDI32.dll, IMM32.DLL, MSCTF.dll, clr.dll, MSVCR120_CLR0400.dll, mscorlib.ni.dll, ole32.dll, kernel.appcore.dll, uxtheme.dll, ADvdDiscHlp1.dll, clrjit.dll, OLEAUT32.dll, System.ni.dll, System.Drawing.ni.dll, System.Windows.Forms.ni.dll, bcrypt.dll, CRYPTSP.dll, rsaenh.dll, comctl32.dll, dwmapi.dll, gdiplus.dll, DWrite.dll, WindowsCodecs.dll, System.Core.ni.dll, shell32.dll, SHCORE.dll, System.Xml.Linq.ni.dll, System.Xml.ni.dll, VideoFrameServicesNative.dll, d3d9.dll, VERSION.dll, aticfx32.dll, atiu9pag.dll, atiumdag.dll, atiumdva.dll, dcomp.dll, winmm.dll, WINMMBASE.dll, cfgmgr32.dll, DEVOBJ.dll, d3dx9_43.dll, D3D9NativeServices.dll, SETUPAPI.dll, WTSAPI32.dll, powrprof.dll, WINSTA.dll, usp10.dll, clbcatq.dll, quartz.dll, LAVSplitter.ax, avformat-lav-55.dll, avutil-lav-52.dll, avcodec-lav-55.dll, libbluray.dll, WS2_32.dll, NSI.dll, sxs.dll, LAVVideo.ax, swscale-lav-2.dll, avfilter-lav-4.dll, qedit.dll, MSVFW32.dll, COMDLG32.dll, CallbackFilter.ax, Microsoft.VisualBasic.ni.dll, System.Management.ni.dll, diasymreader.dll, psapi.dll =================================== Ein Aufrufziel hat einen Ausnahmefehler verursacht. (Mpdn.Threading) ------------------------------ Program Location: bei Mpdn.Threading.TaskThread.InternalInvoke(WorkItem work, Boolean wait) bei Mpdn.Threading.TaskThread.Invoke(WaitCallback work, Object state) bei Mpdn.VideoPlayer.DirectShowVideo.GetAudioTracks() bei MediaPlayerDotNet.MainForm. () bei MediaPlayerDotNet.MainForm. (String , Boolean ) bei MediaPlayerDotNet.MainForm. () bei MediaPlayerDotNet.MainForm. (Object , MouseEventArgs ) bei System.Windows.Forms.Control.OnMouseDown(MouseEventArgs e) bei System.Windows.Forms.UserControl.OnMouseDown(MouseEventArgs e) bei System.Windows.Forms.Control.WmMouseDown(Message& m, MouseButtons button, Int32 clicks) |
3rd September 2014, 15:16 | #12 | Link |
Suptitle, MediaPlayer.NET
Join Date: Nov 2001
Posts: 1,721
|
Ah thanks for the stack trace!
I wasn't checking for media files without audio in one of my methods. Will be fixed in next release. As for the actual use, I needed a relatively high quality 64-bit (because the host app which I can't say what it is deals with a huge amount of data) video player with support for custom text/bitmap overlays (event driven). |
4th September 2014, 01:37 | #14 | Link | |
Suptitle, MediaPlayer.NET
Join Date: Nov 2001
Posts: 1,721
|
Quote:
Anyway it turned out to be a good learning experience. This way I could fix any bugs that we encounter in the field too. There was another concern with regards to madVR -- what is its licensing terms in regards to using it in a commercial product? (not that it matters now but I'm just curious...) |
|
4th September 2014, 06:36 | #15 | Link |
Registered Developer
Join Date: Sep 2006
Posts: 9,140
|
My plan is to maybe create a "pro" version at some point with some cool extra features. The normal madVR version would still contain all important features and stay freeware, but to get the extra features, users would have to license the pro version. This means that I would benefit from commercial software using/distributing the freeware madVR version (without even paying me anything), because it would improve my chances to get more pro licenses sold to end users.
That's just an idea at this point, though, and not something I plan to do before I reach v1.0. |
4th September 2014, 14:10 | #17 | Link |
Registered Developer
Join Date: Sep 2006
Posts: 9,140
|
Well, basically what I was saying is that I'm generally open to commercial software using madVR, under certain circumstances even without payment. Of course the details would have to be discussed privately and agreed upon.
|
4th September 2014, 15:10 | #19 | Link |
Suptitle, MediaPlayer.NET
Join Date: Nov 2001
Posts: 1,721
|
You can request features here.
Yes it's portable. No it doesn't support capture card. It supports additional directshow filters for audio only. E.g. ac3filter for postprocessing. You can opt for reclock audio renderer too if you have it installed. |
4th September 2014, 16:27 | #20 | Link |
Registered User
Join Date: Nov 2008
Posts: 140
|
Thanks for replying. I guess, may i request for using 3rd party video directshow filters, and capture card support, specifically a card i have which is not supported by any known media player, it's the roxio game capture hd pro.
|
Tags |
direct3d, mpdn, nnedi3, opencl, reclock |
Thread Tools | Search this Thread |
Display Modes | |
|
|