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.

 

Go Back   Doom9's Forum > Hardware & Software > Software players

Reply
 
Thread Tools Search this Thread Display Modes
Old 26th September 2017, 15:29   #4521  |  Link
Zachs
Suptitle, MediaPlayer.NET
 
Join Date: Nov 2001
Posts: 1,721
Quote:
Originally Posted by sidspyker View Post
I have come across a very odd issue. Anytime I select any Upscaler/Downscaler to be Lanczos, MPDN gives an error when trying to render video.

"Specified argument was out of range of valid values."

Even if it's just luma and the video is being played at its resolution(no scaling)

Win10 x64 1703, MPDN x64

This seems to have started after Creator's Update. I think turab's issue above may be related.
Ok. Bit of an update regarding this particular bug. It's 100% on Microsoft. If you are up-to-date with your Windows Update, this bug will magically go away.
Zachs is offline   Reply With Quote
Old 27th September 2017, 02:00   #4522  |  Link
Heaud
Registered User
 
Join Date: Apr 2008
Posts: 58
Quote:
Originally Posted by Shiandow View Post
As of now that's the expected behaviour when MPDN is already running when the file opens. It would be fairly easy to change that with a player extension.

You can make MPDN stay on top while playing, which might help. You can enable this in the context menu > Window > Always on Top. And you can limit it to only stay on top while playing in Options > General > Window.
Having the Always on Top is not the best option for my use as it will still not gain focus so keyboard shortcuts will not be active until I click on the video frame. Another issue is that clicking on the video frame also pauses the video so to gain focus so that keyboard shortcuts can be used would cause the video to be paused.

You mentioned that it would be easy to remedy this inconvenience with a player extension. Is it possible for someone with basic, but inexperienced understanding of scripting such as myself be able to create an extension that enables automatic window focus upon loading a video file?
Heaud is online now   Reply With Quote
Old 27th September 2017, 08:05   #4523  |  Link
kingpage
Registered User
 
Join Date: Jun 2015
Posts: 10
Quote:
Originally Posted by Shiandow View Post
Whether NGU will be brought to MPDN, is up to Madshi, and really there's no reason for him to help improve a video player which uses a different renderer. Despite that Madshi has already helped MPDN quite a bit in various ways, but expecting him to implement all of MadVR's functionality in MPDN is just not realistic.
That's true. Can MadVR be used with MPDN? I can't seem to get it to work.
kingpage is offline   Reply With Quote
Old 27th September 2017, 08:25   #4524  |  Link
ryrynz
Registered User
 
ryrynz's Avatar
 
Join Date: Mar 2009
Posts: 3,679
No. It cannot.
ryrynz is offline   Reply With Quote
Old 27th September 2017, 08:25   #4525  |  Link
nevcairiel
Registered Developer
 
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 10,373
Quote:
Originally Posted by kingpage View Post
That's true. Can MadVR be used with MPDN? I can't seem to get it to work.
No, MPDN can only use its own renderer.
__________________
LAV Filters - open source ffmpeg based media splitter and decoders
nevcairiel is offline   Reply With Quote
Old 27th September 2017, 13:20   #4526  |  Link
Zachs
Suptitle, MediaPlayer.NET
 
Join Date: Nov 2001
Posts: 1,721
Quote:
Originally Posted by kingpage View Post
I've just been reading up on Madshi's NGU (NG1). It's very impressive. Is there any plan on bring it to MPDN? Does anyone know if it's easier to run than SSSR (SuperxBR, NNEDI3, etc)?
MPDN extension is an open source project - madshi's NGU is a closed source / proprietary algo, much like its madVR. It's inherently incompatible with MPDN extension's core concepts - our devs believe in sharing knowledge with the public with appropriate licensing - something the modern world agrees with (.net core, almost a hundred thousand nuget packages etc.).

The only thing I haven't been able to open source is the core player itself, mainly due to the strict copyright laws here where I live.

That said, it's unlikely madshi would ever make NGU compatible with open source licensing, even if we somehow know how it's done.
Zachs is offline   Reply With Quote
Old 27th September 2017, 15:06   #4527  |  Link
aufkrawall
Registered User
 
Join Date: Dec 2011
Posts: 1,812
I really like MPDN and especially the open render scripts, so please don't stone me to death.
However, there's also mpv, which is 100% open source, cross platform and constantly developing at a fast pace.
Sure MPDN still has its unique features, but I think it would be more helpful for more users to directly offer shaders, knowledge etc. to the mpv project in one or the other way (even though open source scene atmosphere might be a bit difficult, but dunno).
aufkrawall is offline   Reply With Quote
Old 27th September 2017, 23:44   #4528  |  Link
Zachs
Suptitle, MediaPlayer.NET
 
Join Date: Nov 2001
Posts: 1,721
I believe there's no reason why contributing to MPV wouldn't directly benefited MPDN or vice versa. That's the whole point of the open source initiative.
Zachs is offline   Reply With Quote
Old 28th September 2017, 16:56   #4529  |  Link
Shiandow
Registered User
 
Join Date: Dec 2013
Posts: 753
Quote:
Originally Posted by Heaud View Post
You mentioned that it would be easy to remedy this inconvenience with a player extension. Is it possible for someone with basic, but inexperienced understanding of scripting such as myself be able to create an extension that enables automatic window focus upon loading a video file?
Should be pretty doable. If you're up for it I would strongly recommend trying it yourself. Some things will be easier if you download Visual Studio (the community edition is free for personal use) but it's not necessary (it'll just be slightly harder to figure out what went wrong). You might want to go to Options > General > Debugging and enable the debugging dialog, because otherwise you're not going to get any useful information if it fails.

Anyway, here's a rough guid to what you'd need to do. If you're unsure about anything you can probably google the answer, or if not come back and ask in this thread.

To start I'd recommend basically copying the GoTo script. Just copy that file somewhere and open it up in your favorite text editor.

That extension already checks when a new file opens in order to enable / disable its item in the menu (try to figure out how it does this), so we can just reuse that to do something else (like bring the window to the front). The rest we don't need, you can remove everything but the "Descriptor" and the "Initialize", "Destroy" and "PlayerStateChanged" methods.

Then you need to fill out the descriptor with new information (most of this is optional, but you do need to change the GUID to another one, otherwise MPDN can't tell it apart from the GoTo extension). And be sure to rename the GoTO class and anything else that says "GoTo" to something more sensible.

After that bit of bookkeeping is over you can change the PlayerStateChanged method to actually bring the window into focus. You'll probably need to start with checking if the player started playing, using something like "if (e.NewState == PlayerState.Playing)". And then bring the window to the front. Some quick googling suggests calling "Activate()" on the window form (which is "Player.ActiveForm"), but not everyone got this to work apparently. There are a lot of other suggestions on google or stackoverflow on how to get window to the front in C# so you should probably try one of those if the simple method doesn't work.

After that you can copy the file containing your extension to MPDN / Extensions and it should work (although don't be too disheartened if it doesn't, try the debugging dialog and see if you can figure out what's wrong). Best of luck!

Quote:
Originally Posted by aufkrawall View Post
I really like MPDN and especially the open render scripts, so please don't stone me to death.
However, there's also mpv, which is 100% open source, cross platform and constantly developing at a fast pace.
Sure MPDN still has its unique features, but I think it would be more helpful for more users to directly offer shaders, knowledge etc. to the mpv project in one or the other way (even though open source scene atmosphere might be a bit difficult, but dunno).
I might be a tad biased, but in MPV their equivalent to "renderscripts" is some weird combination of GLSL with some 'special comments'. In MPDN you can use the whole of C# as your 'special comments' and use that to manipulate HLSL / OpenCL / DirectCompute shaders. Sure their API does allow people to port scripts to MPV, but it doesn't give you a lot of support for actually developing them. It also makes it very hard to tell what's happening, which isn't great for sharing ideas.

It's possible there's a more advanced API somewhere that I'm not aware of.
Shiandow is offline   Reply With Quote
Old 28th September 2017, 18:04   #4530  |  Link
pirlouy
_
 
Join Date: May 2008
Location: France
Posts: 701
Quote:
Originally Posted by Zachs View Post
That's the whole point of the open source initiative.
Exactly: split/fork as soon as possible, in order to lose potential users, instead of trying to have one unique project, easier for newcomers. Total Linux Fork users < 1%. Sorry for this grievance.

I don't know why you're still mad at Madshi. Sometimes you don't want someone to tell you what to do, you want to do it your way, so closed source is an option. Or another example, imagine some company wanna buy his NGU algorithm. You have billion reasons to want closed-source project, the same as open-source. As good as your player is, whatever the reasons, it is still closed-source, and nobody will blame you for that.

Ahah it's fun, it was a long time since we had a discussion about Open/Closed Source.
I hope I didn't piss you off. I let you have the final word in the end.

@Shiandow: maybe you could ask a request on MPV tracker. I'm sure they would be interested in a "shader coder" (sorry if it's an approximate description).
pirlouy is offline   Reply With Quote
Old 28th September 2017, 19:15   #4531  |  Link
madshi
Registered Developer
 
Join Date: Sep 2006
Posts: 9,140
I'm not sure if Zachs is mad at me. FWIW, there was a time when I wasn't very friendly to him, and I kinda regret that. Sadly, in forums one often writes things without really thinking it through, and then it's hard to take it back, because it's all "written in stone", so to say.
madshi is offline   Reply With Quote
Old 30th September 2017, 15:43   #4532  |  Link
jkauff
Registered User
 
Join Date: Oct 2012
Location: Akron, OH
Posts: 491
There are pluses and minuses to both open and closed source applications (Richard Stallman notwithstanding). Microsoft, for example, recently has been open sourcing a lot of their work, but you're not going to get the source code for Windows or Office anytime soon. Too many salaried people working on those products.

madshi, bless him, has been sharing the fruits of his labor for many years now for free--and in fact won't take donations. For my part, I wouldn't want madVR to be a community project. It's nice to have one person in charge, especially one who takes as much user feedback as madshi does. I look forward to the day when I can give him my money.

There's plenty of room for madVR with its large base of supported media players, MPDN, mpv, and any other innovative video solution that comes along. The real shame is that most people still use Windows Media Player or VLC because they don't know or care that there are superior alternatives.
jkauff is offline   Reply With Quote
Old 30th September 2017, 19:02   #4533  |  Link
aufkrawall
Registered User
 
Join Date: Dec 2011
Posts: 1,812
Quote:
Originally Posted by Shiandow View Post
It's possible there's a more advanced API somewhere that I'm not aware of.
I must confess that I got a bit lazy and got satisfied with good ol' Jinc scaling (and mpv's ewa_lanczossharp looks quite sharp for downscaling if scaling factor isn't too high).
But there also is e.g. NNEDI3 available as a usershader, doesn't seem like GLSL is a showstopper (I gues there is nothing with OGL without annoyance ).
Like I said, MPDN still has its very own unique features, which is totally fine and great.
It's just that, afterall, it's only about watching videos. Refining scaling quality etc. is cool, but it's just annoying how hard it is to use MPDN or madVR (+ players) for e.g. online streaming. It just doesn't meet my media habits anymore. With mpv + youtube-dl I basically can watch anything which is available for free by just pointing the URL to the player (YouTube, YouTube live, YouTube HDR, general HLS, files located online...).
aufkrawall is offline   Reply With Quote
Old 30th September 2017, 19:52   #4534  |  Link
Anime Viewer
Troubleshooter
 
Anime Viewer's Avatar
 
Join Date: Feb 2014
Posts: 339
Specified argument was out of the range of valid values.

After updating to the most recent version I'm getting the following error message:

===================================

Specified argument was out of the range of valid values. (MediaPlayerDotNet)

------------------------------
Error Type = System.ArgumentOutOfRangeException
Error Message = Specified argument was out of the range of valid values.
Error Source = MediaPlayerDotNet
Error Site = Mpdn.IScaler C(Mpdn.IScaler)
Error occurred = at a.C.C(IScaler )
at a.C.b(IScaler )
at Mpdn.D3D9VideoRenderer.VideoRenderer.ag()
at Mpdn.D3D9VideoRenderer.VideoRenderer.aG()
at Mpdn.D3D9VideoRenderer.VideoRenderer.e(Boolean )
at Mpdn.D3D9VideoRenderer.VideoRenderer.A(String , FrameBufferInputFormat , Int32 , Int32 , Int32 , Int32 , InterlaceFlags , Double )
at B.M.A(String , FrameBufferInputFormat , Int32 , Int32 , YuvColorimetric , InterlaceFlags , PointF )
at B.M.A(IMedia )
at MediaPlayerDotNet.MainForm.A(IMedia , Boolean , Boolean , Boolean )
at MediaPlayerDotNet.MainForm.OpenMedia(IMedia , Boolean , Boolean , Boolean , Boolean )
at MediaPlayerDotNet.MainForm.OpenMedia(String , Boolean , Boolean , Boolean , Boolean )
at MediaPlayerDotNet.MainForm.P(Object , EventArgs )
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ToolStrip.WndProc(Message& m)
at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
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 = 15.9 GB
Available Physical Memory = 11.2 GB
Date Time = 9/30/2017 11:50:13 AM

I've checked and applied the one Windows Update I didn't have, but even after applying that and restarting the computer I still get the error.
__________________
System specs: Sager NP9150 SE with i7-3630QM 2.40GHz, 16 GB RAM, 64-bit Windows 10 Pro, NVidia GTX 680M/Intel 4000 HD optimus dual GPU system. Video viewed on LG notebook screen and LG 3D passive TV.
Anime Viewer is offline   Reply With Quote
Old 30th September 2017, 20:33   #4535  |  Link
Shiandow
Registered User
 
Join Date: Dec 2013
Posts: 753
Quote:
Originally Posted by aufkrawall View Post
But there also is e.g. NNEDI3 available as a usershader, doesn't seem like GLSL is a showstopper (I gues there is nothing with OGL without annoyance ).
GLSL isn't the problem. It's just that MPV's usershaders aren't much more than GLSL with some extra metadata. In MPDN the metadata is replaced with C#, which is a heck of a lot more powerful.

The only reason it's unfortunate that they use GLSL (although portability kind of forced that decision on them) is that this means you can't just automatically convert MPDN's renderchains into usershaders.

Quote:
Originally Posted by aufkrawall View Post
It's just that, afterall, it's only about watching videos. Refining scaling quality etc. is cool, but it's just annoying how hard it is to use MPDN or madVR (+ players) for e.g. online streaming. It just doesn't meet my media habits anymore. With mpv + youtube-dl I basically can watch anything which is available for free by just pointing the URL to the player (YouTube, YouTube live, YouTube HDR, general HLS, files located online...).
You don't like the 3DYD Youtube filter?

For what it's worth, I have my old player extension that downloads a stream using youtube-dl and loads it into MPDN. I didn't work on it much because I didn't think it was too useful when there's a nice DirectShow filter for youtube urls. But if there's a demand for it I could see if I could polish it up a bit.
Shiandow is offline   Reply With Quote
Old 30th September 2017, 20:50   #4536  |  Link
aufkrawall
Registered User
 
Join Date: Dec 2011
Posts: 1,812
Quote:
Originally Posted by Shiandow View Post
You don't like the 3DYD Youtube filter?
It doesn't work reliably for me with 4k 60fps video, playback often stalls after some time because it's not streaming fast enough.
So far I can only achieve stable playback with mpv + youtube-dl (and browsers, of course).

Quote:
Originally Posted by Shiandow View Post
For what it's worth, I have my old player extension that downloads a stream using youtube-dl and loads it into MPDN. I didn't work on it much because I didn't think it was too useful when there's a nice DirectShow filter for youtube urls. But if there's a demand for it I could see if I could polish it up a bit.
I already made a fuss about it in the MPC HC thread.
It has several advantages like expanding general HSL functionality, special media site functionality or allowing streaming of YouTube live.
I'd think if more users knew about this, they'd find it quite useful.

Though I'm not sure if some basic youtube-dl integration alone is the holy grail. I also tried piping youtube-dl's output to MPC HC and it's still limited in terms of e.g. seeking compared to mpv.
aufkrawall is offline   Reply With Quote
Old 1st October 2017, 00:31   #4537  |  Link
Shiandow
Registered User
 
Join Date: Dec 2013
Posts: 753
Quote:
Originally Posted by aufkrawall View Post
Though I'm not sure if some basic youtube-dl integration alone is the holy grail. I also tried piping youtube-dl's output to MPC HC and it's still limited in terms of e.g. seeking compared to mpv.
Out of interest, how exactly do you use youtube-dl with mpv? Do you just pipe the output from youtube-dl into mpv?
Shiandow is offline   Reply With Quote
Old 1st October 2017, 02:05   #4538  |  Link
aufkrawall
Registered User
 
Join Date: Dec 2011
Posts: 1,812
You drop its executable into mpv's folder (or install it as a dependency on Linux) and it's automatically used when opening URLs with mpv.
It's not used for the actual streaming but for source discovery. At least that's my conclusion from seeing its process closing after playback start.
aufkrawall is offline   Reply With Quote
Old 2nd October 2017, 09:49   #4539  |  Link
Cy4n1d3
Registered User
 
Join Date: Mar 2016
Posts: 3
Quote:
Originally Posted by Zachs View Post
Ok. Bit of an update regarding this particular bug. It's 100% on Microsoft. If you are up-to-date with your Windows Update, this bug will magically go away.
I am fully updated using latest Win10 (1703) and still get this error.
After downgrading the player from 2.49 to 2.48 (still using 1.31 renderscripts) the error goes away and everything is working as before.
So even if this error / bug is somehow occuring due to Windows malfunctioning, some code change inbetween 2.48 and 2.49 seems to trigger it.

Regards
Cy4n1d3 is offline   Reply With Quote
Old 5th October 2017, 14:25   #4540  |  Link
mringis
Registered User
 
Join Date: Sep 2017
Location: Indonesia
Posts: 3
Quote:
Originally Posted by Anime Viewer View Post
After updating to the most recent version I'm getting the following error message:

===================================

Specified argument was out of the range of valid values. (MediaPlayerDotNet)

------------------------------
Error Type = System.ArgumentOutOfRangeException
Error Message = Specified argument was out of the range of valid values.
Error Source = MediaPlayerDotNet
Error Site = Mpdn.IScaler C(Mpdn.IScaler)
Error occurred = at a.C.C(IScaler )
at a.C.b(IScaler )
at Mpdn.D3D9VideoRenderer.VideoRenderer.ag()
at Mpdn.D3D9VideoRenderer.VideoRenderer.aG()
at Mpdn.D3D9VideoRenderer.VideoRenderer.e(Boolean )
at Mpdn.D3D9VideoRenderer.VideoRenderer.A(String , FrameBufferInputFormat , Int32 , Int32 , Int32 , Int32 , InterlaceFlags , Double )
at B.M.A(String , FrameBufferInputFormat , Int32 , Int32 , YuvColorimetric , InterlaceFlags , PointF )
at B.M.A(IMedia )
at MediaPlayerDotNet.MainForm.A(IMedia , Boolean , Boolean , Boolean )
at MediaPlayerDotNet.MainForm.OpenMedia(IMedia , Boolean , Boolean , Boolean , Boolean )
at MediaPlayerDotNet.MainForm.OpenMedia(String , Boolean , Boolean , Boolean , Boolean )
at MediaPlayerDotNet.MainForm.P(Object , EventArgs )
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ToolStrip.WndProc(Message& m)
at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
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 = 15.9 GB
Available Physical Memory = 11.2 GB
Date Time = 9/30/2017 11:50:13 AM

I've checked and applied the one Windows Update I didn't have, but even after applying that and restarting the computer I still get the error.
same with me

I'm on win 7 64. go back to 2.48 for now

Last edited by mringis; 5th October 2017 at 14:27.
mringis is offline   Reply With Quote
Reply

Tags
direct3d, mpdn, nnedi3, opencl, reclock

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:18.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.