Log in

View Full Version : Media Player Classic - BE Win32/x64


Pages : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 [155] 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235

Ilovetv9
23rd September 2020, 01:40
If some trouble using madvr+lav filters - why you write here, it's not a MPC-BE trouble :)

Ok. I see the madvr thread now, I will post my question there.

Zulithe
25th September 2020, 01:20
r5540, mpc-be is not obeying the "windows size at startup" and "remember last window position" settings. I'm on a multi-monitor setup using x64 Win 10 v2004.

Aleksoid1978
25th September 2020, 02:38
r5540, mpc-be is not obeying the "windows size at startup" and "remember last window position" settings. I'm on a multi-monitor setup using x64 Win 10 v2004.

You remember position on second monitor ?

Klaus1189
26th September 2020, 12:22
I installed 1.5.6 r5545 and noticed that volume bars look strange on 200% scaling when clicking on mute, but look normal when move mouse away.

I created an video (https://drive.google.com/file/d/1HRq-_rNYnjTsTjetXGqXicBqhPPe3cE-/view?usp=sharing) which shows that issue.

Please let us translators know when you want the updated translation files for the mouse page in options ;)

Aleksoid1978
26th September 2020, 12:41
I installed 1.5.6 r5545 and noticed that volume bars look strange on 200% scaling when clicking on mute, but look normal when move mouse away.

I created an video (https://drive.google.com/file/d/1HRq-_rNYnjTsTjetXGqXicBqhPPe3cE-/view?usp=sharing) which shows that issue.

Please let us translators know when you want the updated translation files for the mouse page in options ;)

Does it's happened in previous version MPC-BE ?

Klaus1189
26th September 2020, 14:29
I installed 1.5.6 r5543 and it is fine, seems to be introduced in r5544.
I created a video (https://drive.google.com/file/d/1AovtVmx6SNV51Wqp9hb7JqnangqthsJ6/view?usp=sharing)which shows that r5543 is fine.

v0lt
26th September 2020, 19:37
@Klaus1189
Thanks. Fixed in r5546.

Zulithe
27th September 2020, 00:52
You remember position on second monitor ?

can no longer reproduce in today's build. Thanks, sorry for the late reply. Mentioned multi-monitors because it was opening on different monitor from where I last closed it, fwiw.

megapro17
27th September 2020, 17:21
MPC-BE is crashing when i'm trying to open one mp3 file: https://yadi.sk/d/9L3w-zIWTIaHMw
This bug exist for a long time, tested in r5546
This file can be played in any other player. I think it's because of broken metadata.
Also, can you make more clear what different "Custom presenter" supports like it's done in clsid2 fork?

SeeMoreDigital
27th September 2020, 18:28
MPC-BE is crashing when i'm trying to open one mp3 file: https://yadi.sk/d/9L3w-zIWTIaHMw
This bug exist for a long time, tested in r5546
This file can be played in any other player. I think it's because of broken metadata.
The "issue" is more likely to be a borked mp3 audio stream

v0lt
27th September 2020, 18:39
MPC-BE is crashing when i'm trying to open one mp3 file: https://yadi.sk/d/9L3w-zIWTIaHMw
Thanks. Fixed in r5549.

chros
28th September 2020, 10:57
Hi devs and @clsid, how hard would it be to implement such thing, if it can't be done already somehow?

In short, madvr doesn't have API to manage its settings but provide keyboard shortcuts. 2 of us already came up with similar solutions (https://github.com/chros73/madvr-js-remote/blob/master/webroot/sendkeys.vbs#L23) for it.
The problem with this is that you can't (easily?) send keyboard shortcuts to apps in the background.

So, what we would need is:
- an endpoint in the web API
- that receives a keyboard shortcut (e.g. in the form of sendkeys (https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.sendkeys?view=netcore-3.1): "^+%i")
- and triggers it on itself (mpc window)

What do you think?
Thanks!

v0lt
28th September 2020, 17:48
In short, madvr doesn't have API to manage its settings but provide keyboard shortcuts.
You are wrong.
madVR.zip\developers\interfaces\mvrInterfaces.h see IMadVRSettings2.
madVR.zip\developers\net-protocol.txt see GetSettings/SetSettings

SirMaster
28th September 2020, 20:10
You are wrong.
madVR.zip\developers\interfaces\mvrInterfaces.h see IMadVRSettings2.
madVR.zip\developers\net-protocol.txt see GetSettings/SetSettings

Unfortunately IMadVRSettings2 API only allows for changing settings on disk. It does not affect the live setting of the running instance of madVR.

You have (re)start madVR after changing settings with the API before they apply.

The IP control interface is an option, but it is out of date and missing some options such as NGU scaling I think. Unfortunately I can't even figure out how to use the IP control protocol.

The documentation in that text file is just too sparse and hard for me to understand when I am not very familiar with networking protocols.

v0lt
29th September 2020, 18:19
Unfortunately IMadVRSettings2 API only allows for changing settings on disk. It does not affect the live setting of the running instance of madVR.
There are other interfaces in the mvrInterfaces.h file. For example, IMadVRCommand.

SirMaster
29th September 2020, 18:27
There are other interfaces in the mvrInterfaces.h file. For example, IMadVRCommand.

Yes and that only allows changing madVR settings on disk, not for your media player's active madVR session instance.

Madshi has already talked about this on a post years ago in the madVR thread.

I already wrote a program using the IMadVRCommand API and confirmed this exact behavior.

http://forum.doom9.net/showpost.php?p=1741801&postcount=33401

There's a catch though. You won't be able to access a madVR object that has been created in another process, directly controlling madVR in MPC-HC from an external Python script for instance.

http://forum.doom9.net/showpost.php?p=1742175&postcount=33438

madHcCtrl.exe (which is the exe responsible for drawing the madVR tray icon, showing the madVR settings editor etc) does all this by using madHcNet32.dll and mvrSettings32.dll. I've not made the interfaces for those dlls available yet because I didn't think they would be useful. But I suppose it wouldn't harm making them available. It would allow you to remotely access settings, without having to reimplement the whole network protocol yourself again.

The above applies if you want to actually affect an already running instance of a media player / madVR. If you just want to change the settings on harddisk, and if you don't care if already running madVR instances are updated, then things are much easier: Just instantiate a madVR instance yourself and use the interfaces in "mvrInterfaces.h" to modify the settings.

As far as I can see, he ever made the the madHcNet32.dll and mvrSettings32.dll interfaces available.

v0lt
29th September 2020, 18:57
Yes and that only allows changing madVR settings on disk, not for your media player's active madVR session instance.
You are confusing something. The IMadVRCommand interface is not for settings. It allows you to send madVR commands that are executed immediately. It has been used in various players (including MPC-BE) for a long time.
There's a catch though. You won't be able to access a madVR object that has been created in another process, directly controlling madVR in MPC-HC from an external Python script for instance.
This is a strange observation. Various utilities such as GraphStudioNext can manipulate the DirectShow graph and the filters in it.

SirMaster
29th September 2020, 19:14
You are confusing something. The IMadVRCommand interface is not for settings. It allows you to send madVR commands that are executed immediately. It has been used in various players (including MPC-BE) for a long time.


That's fair, but we want to change all the madVR settings (up-scaling, enhancements, color, gamma, hdr, etc) for the active media-player on the fly.

v0lt
30th September 2020, 03:40
That's fair, but we want to change all the madVR settings (up-scaling, enhancements, color, gamma, hdr, etc) for the active media-player on the fly.
We are not planning to do something like this for madVR in the player.

chros
30th September 2020, 15:29
There's a bug: the Deploy button under Webserver doesn't save the internal webpages (works fine in MPC-HC).

We are not planning to do something like this for madVR in the player.
No worries if you will still think so, but I quickly took a look at the current implementation of various endpoints, e.g. command.html:
- the CWebClientSocket::OnCommand() method (https://sourceforge.net/p/mpcbe/code/HEAD/tree/trunk/src/apps/mplayerc/WebClient.cpp#l315) is responsible for that (and this is in MPC-HC (https://github.com/clsid2/mpc-hc/blob/develop/src/mpc-hc/WebClientSocket.cpp#L373))

E.g. the following urls can be used:

http://localhost:13579/command.html?wm_command=948
http://localhost:13579/command.html?wm_command=-2&volume=50 // set volume
http://localhost:13579/command.html?wm_command=-1&percent=60 // set position


So:
- either a new endpoint could be set (e.g. keys.html -> OnKeys())
- or a new "command" could be set for keys (e.g. -3) with a keys parameter:

http://localhost:13579/command.html?wm_command=-3&keys=i

We can send any type of characters for the "keys" param.

Thanks

Grimsdyke
3rd October 2020, 21:06
When using mpc audio renderer for both devices in a dual-audio-out situation the settings seem to be not saved !! Even within a session each time a file is loaded the second device switches back to default.
Can this be improved/fixed ?
Thanks for all your amazing work.

v0lt
4th October 2020, 15:52
@Grimsdyke
MPC Audio Renderer does not support more than one instance running simultaneously. Use DirectSound.

Klaus1189
6th October 2020, 16:42
Updated german translation (https://drive.google.com/file/d/1NwBzp70DqbsN-NeKUsrorOgUedPyb_nu/view?usp=sharing), since r5566 added the new page.

s0meone_new
7th October 2020, 08:53
What is the new text?
Need to translation?

Klaus1189
7th October 2020, 10:01
This is the new text:
https://sourceforge.net/p/mpcbe/code/5480/tree//trunk/src/apps/mpcresources/text/mplayerc.hu.rc.txt?diff=5472

But I was wrong, not needed now.

s0meone_new
7th October 2020, 10:09
Klaus1189: thanks

Authors: is it okay if i translate that text?

v0lt
7th October 2020, 16:06
@Klaus1189, @s0meone_new
The new mouse settings are not ready yet. There is only the Mouse preference panel, which is disabled. During testing, the text of the settings panel can be changed and any translation will be lost.

s0meone_new
7th October 2020, 16:22
Then i won't translate it yet.

But a small correction in the Hungarian translation: https://www74.zippyshare.com/v/5ZoF2ptO/file.html
Thank :)

PCU
8th October 2020, 02:27
MPC-BE's audio renderer: input: 32 bit float, output: 32 bit integer, why?

Aleksoid1978
8th October 2020, 03:01
MPC-BE's audio renderer: input: 32 bit float, output: 32 bit integer, why?

Using Exclusive ? That's right - device support only "integer input" format.

PCU
8th October 2020, 14:21
Using Exclusive ? That's right - device support only "integer input" format.

:thanks:
Yes, exclusive. Is there any BE's audio renderer source code available?

v0lt
8th October 2020, 18:03
:thanks:
Yes, exclusive. Is there any BE's audio renderer source code available?
Yes. The audio renderer source code is part of the MPC-BE source code.

butterw2
13th October 2020, 08:49
2 slots available in register(c1) for user pixel shaders ?

float4 p1: register(c1);
From what I've seen, p1[2] and p1[3] are currently unused in mpc-hc/be hlsl pixel shaders:
https://github.com/mpc-hc/mpc-hc/blob/7f14b47cf225102b162d61c9cfa74186e1fe5e80/src/mpc-hc/res/shaders/empty.psh

If this is correct, would it be possible to populate them to improve pixel shader features?

What I would like to be available (current limitations):
- Current file playtime in seconds (it enables transition effects on loading of a new file in a playlist)

- A pseudo-random number between [0, 1.0] updated every frame, like random in mpv .hook. Useful for pixel shader filmgrain and many other effects. Good/cheap implementations of PRNG exist for cpu.

- Source video (W, H) Resolution or Aspect Ratio (not currently available for post resize shaders). I can't really think of any case where it would be genuinely useful (you can use a pre-resize shader instead and conditions based on source resolution would be better handled in a processing profile (as in mpv, madVR) rather than in a pixel shader.

v0lt
16th October 2020, 13:42
2 slots available in register(c1) for user pixel shaders ?
No, not available.

butterw2
16th October 2020, 15:21
Do you know what p1[2] and p1[3] contain ?

Can adding a c2 register for improving user-shader features be considered ?

v0lt
16th October 2020, 16:29
Can adding a c2 register for improving user-shader features be considered ?
Show examples of real useful shaders used in video players that need additional parameters (except for the case of resizing).

butterw2
16th October 2020, 17:20
- Filmgrain. On a low-setting improves perceptual quality of most videos.
- Transitions

- For Filmgrain, VLC uses less ressources and Mpv uses the approach I described (no noise patterning issues). Mpc used to rely on ffdshow for this and still doesn't provide the feature by default. The workarounds in mpc are costly. AFAIK cheapest way costs about 30 gpu arithmetic ops per pixel (currently available third party shaders: semi-random grayscale noise.hlsl: 38, port of SweetFx.FilmGrain: 46), so there would be room for improvement if a random number was provided instead of having to generate one for each single pixel in shaders.

- Shaded Transitions in a Playlist is a nice feature, which isn't possible currently.

v0lt
17th October 2020, 04:56
- For Filmgrain, VLC uses less ressources and Mpv uses the approach I described (no noise patterning issues). Mpc used to rely on ffdshow for this and still doesn't provide the feature by default. The workarounds in mpc are costly. AFAIK cheapest way costs about 30 gpu arithmetic ops per pixel (currently available third party shaders: semi-random grayscale noise.hlsl: 38, port of SweetFx.FilmGrain: 46), so there would be room for improvement if a random number was provided instead of having to generate one for each single pixel in shaders.
Can I have an example of a Filmgrain shader that uses an external random number?

butterw2
17th October 2020, 12:11
https://github.com/haasn/gentoo-conf/blob/xor/home/nand/.mpv/shaders/filmgrain.glsl
It's (dynamic) grayscale filmgrain (uses random, can run on Luma or RGB in mpv). The hlsl port runs at 30 instructions.
Further analysis would be required to determine whether this total could be reduced without creating a pattern and whether random is ultimately needed.

EDIT:
https://github.com/haasn/gentoo-conf/blob/xor/home/nand/.mpv/shaders/noise.glsl
hlsl port runs at (1 texture, 27 arithmetic).


Currently to generate a cheap 2D static noise pattern in mpc:
frac(43758.5453 * sin(dot(tex.xy, float2(12.9898, 78.233)))); //(15 arithmetic, with similar perf for 1D).

Filmgrain has to run after any sharpener, meaning it may have to run post-resize.

v0lt
17th October 2020, 18:04
@butterw2
I have not seen the HLSL shader that can be loaded into MPC-BE.

butterw2
17th October 2020, 21:14
I've uploaded a different bNoise.hlsl (1 texture, 12 arithmetic) that should work with current mpc-be:
https://github.com/butterw/bShaders/blob/master/FilmGrain_Noise/bNoise.hlsl

You'll find my hlsl port of mpv Filmgrain in the same dir. The problem is that its not trivial to test the quality of this type of shaders.

Cineaste
17th October 2020, 23:54
Is there a way to remove the MPC-BE splash screen upon starting playback? I have this set as an external player in Kodi so the less visual clutter, the better.

ryrynz
18th October 2020, 04:20
You're using the wrong term. A splash screen comes up before the main program. MPC-BE has never used a splash screen. Do you mean the background image?

v0lt
18th October 2020, 05:23
I've uploaded a different bNoise.hlsl (1 texture, 12 arithmetic) that should work with current mpc-be:
https://github.com/butterw/bShaders/blob/master/FilmGrain_Noise/bNoise.hlsl

You'll find my hlsl port of mpv Filmgrain in the same dir. The problem is that its not trivial to test the quality of this type of shaders.
Thanks. Shaders work well.

Cineaste
18th October 2020, 07:05
You're using the wrong term. A splash screen comes up before the main program. MPC-BE has never used a splash screen. Do you mean the background image?

That's what I meant, yes. When you open a file the background image pops up for a second or two. Ideally would like it turn black straight away. Is that possible?

ryrynz
18th October 2020, 07:13
Options-Player-Logo, 'Internal' is selected by default, press the right arrow so that the background image goes blank, click OK.

Cineaste
18th October 2020, 08:23
Options-Player-Logo, 'Internal' is selected by default, press the right arrow so that the background image goes blank, click OK.

Legend, thanks.

butterw2
18th October 2020, 13:15
Thanks. Shaders work well.

I haven't done much real testing yet, but I'm happy that they are lightweight. Currently the main reason not to use Filmgrain is the performance hit on lower end systems. You are welcome to include these shaders with mpc, as it is a missing feature in my view.

From what I've seen, different approaches (with presumably different quality, speed) are used depending on available features, some involving the use of an external noise texture.
Analysing the noise statistics would help with giving an objective quality assessment of the different implementations and whether using Clock instead of random is acceptable.

I will point out one case that does causes issue:
Noise/Filmgrain has to run after any sharpener, meaning it may have to run post-resize. In fullscreen post-resize, the shader also gets applied to the black bars (which is not desireable at all here).
Currently, no work around is possible because only the screen resolution is accessible to the shader ?

v0lt
18th October 2020, 15:39
I will point out one case that does causes issue:
Noise/Filmgrain has to run after any sharpener, meaning it may have to run post-resize. In fullscreen post-resize, the shader also gets applied to the black bars (which is not desireable at all here).
Currently, no work around is possible because only the screen resolution is accessible to the shader ?
1. If you want to reduce the load on the GPU by using a condition in the pixel shader code, then this may not work. The GPU doesn't like branching in code.
2. The input parameters of pixel shaders are made the same for different renderers and players. If we change something, then there will be incompatibility, this is bad.

PS: The Post-Resize shader in MPC VR does not have access to the added black boxes.

butterw2
18th October 2020, 17:21
1. If you want to reduce the load on the GPU by using a condition in the pixel shader code, then this may not work. The GPU doesn't like branching in code.
2. The input parameters of pixel shaders are made the same for different renderers and players. If we change something, then there will be incompatibility, this is bad.

PS: The Post-Resize shader in MPC VR does not have access to the added black boxes.

Applying an output mask costs 5 extra shader operations (with the mask option enabled). It's not great, but the real problem is that you have to enter the mask size manually because the black bar size (or the source AR) is not currently available to the shader.

In most cases I agree that user shaders don't need to access the black bar space. There will always be exceptions however, ex: display an output histogram calculated by a compute shader at the bottom of the screen.