View Full Version : Media Player Classic - BE Win32/x64
v0lt
16th April 2015, 04:11
@Aleksoid1978,
I've just released a 64bit build of madVR. Unfortunately it crashes both MPC-BE and MPC-HC. I've identified the window subclassing to be at fault. However, I don't see much I can do there. The same code works in 32bit. In 64bit, after I restore the stored window proc, the crash occurs. If I don't restore it, a different crash occurs. So what can I do? Here's what the log says:
00000064 Render install new WindowProc (ParentWindow: 000000000048121E, OldWindowProc: 00007FF7B3E7ACC0, NewwindowProc: 0000000DECD50000) -> +
00001976 Render restore WindowProc, ParentWindow: 000000000048121E, current: 00000000FFFF0DC7, old: 00007FF7B3E7ACC0, ours: 0000000DECD50000
So basically when madVR starts rendering, I'm storing the old window proc of madVR's parent window, then I'm subclassing the parent window, and when madVR is finalized, I undo the subclassing. Unfortunately this crashes MPC-BE 64bit, but not in 32bit. Interestingly, at the moment when I want to undo the subclassing, the active window proc neither matches the original one, nor the one I set. So something weird is going on there, anway. But that's the case in 32bit, too, and there it still works without a crash.
There's a madVR interface "IMadVRSubclassReplacement" which you can use to replace madVR's window subclassing with a cleaner method. Using that should take care of the crash. Would that be possible to add to MPC-BE? It's the better solution for 32bit, too.
This problem was v0.87.20.
Do I need any changes in the player when using v0.87.21.
Arm3nian
16th April 2015, 04:45
The latest version of mpcbe works fine with 0.87.21
ryrynz
16th April 2015, 05:45
This problem was v0.87.20.
Do I need any changes in the player when using v0.87.21.
You don't need to but madshi recommended you use madVR's interface IMadVRSubclassReplacement as it's a cleaner solution. Kasper has added support into MPC-HC for this.
madshi
16th April 2015, 08:30
This problem was v0.87.20.
Do I need any changes in the player when using v0.87.21.
You don't need to but madshi recommended you use madVR's interface IMadVRSubclassReplacement as it's a cleaner solution. Kasper has added support into MPC-HC for this.
^
Exactly as ryrynz says: Basically I seem to have fixed the x64 crash which was caused by madVR subclassing your top level window. However, the subclassing is still done (without the crash now), and that's still kind of a dirty solution. Well, madVR has always done that in 32bit, and now still does it in 64bit, so it seems to work reasonably well. But replacing madVR's subclassing via IMadVRSubclassReplacement would be a cleaner solution. In the end it's your decision if you want to do some (small) changes to MPC-BE to make the madVR integration slightly cleaner, without getting any immediate/visible practical improvement. FWIW, both J.River MC and MPC-HC have implemented IMadVRSubclassReplacement, IIRC. But most other media players have not. So it's really your decision. I don't mind either way.
v0lt
18th April 2015, 22:27
@madshi
I do not understand this
HRESULT CFGFilterVideoRenderer::Create(IBaseFilter** ppBF, CInterfaceList<IUnknown, &IID_IUnknown>& pUnks)
{
...
if (m_clsid == CLSID_madVRAllocatorPresenter) {
if (CComQIPtr<IMadVRSubclassReplacement> pMVRSR = pCAP) {
VERIFY(SUCCEEDED(pMVRSR->DisableSubclassing()));
}
...
and that
LRESULT CMainFrame::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
{
...
LRESULT ret = 0;
bool bCallOurProc = true;
if (m_pBFmadVR) {
CComQIPtr<IMadVRSubclassReplacement> pMVRSR = m_pBFmadVR;
// call madVR window proc directly when the interface is available
switch (message) {
case WM_MOUSEMOVE:
case WM_LBUTTONDOWN:
case WM_LBUTTONUP:
// CMouseWnd will call madVR window proc
break;
default:
bCallOurProc = !pMVRSR->ParentWindowProc(m_hWnd, message, &wParam, &lParam, &ret);
}
}
if (bCallOurProc) {
ret = __super::WindowProc(message, wParam, lParam);
}
...
Why is all this necessary?
Nintendo Maniac 64
18th April 2015, 23:52
Quick question.
I'm a long time MPC-HC user and as I'm using it more and more for offline videos on my HTPC, and I'm becoming increasingly annoyed at its lack of support for ReplayGain tags.
So simply put, does MPC-BE support ReplainGain tags in videos? (such as those written by Foobar2000 which I know applies to MP4, MKV, and WebM)
bouwew
19th April 2015, 08:50
I can't seem to register the standalone filter mpcaudiorenderer.ax using regsvr32 - it registers fine but doesn't show up in MPC HC - any idea?
I had the same experience as you. I doesn't show up in the External Filter-list.
After setting it up as the audio renderer in MPC-HC, and playing a file with DTS-sound it suddenly showed up in the Filters list and I could set it up correctly :)
detmek
19th April 2015, 11:19
Quick question.
I'm a long time MPC-HC user and as I'm using it more and more for offline videos on my HTPC, and I'm becoming increasingly annoyed at its lack of support for ReplayGain tags.
So simply put, does MPC-BE support ReplainGain tags in videos? (such as those written by Foobar2000 which I know applies to MP4, MKV, and WebM)
+1
It is very useful for music videos. But, it is useful for regular movies, too.
madshi
19th April 2015, 12:42
@madshi
I do not understand this
[...]
and that
[...]
Why is all this necessary?
It's not strictly "necessary", but let me try to explain:
madVR needs to control some messages sent to your main window. One reason is that when switching to fullscreen exclusive mode, sometimes your main window gets deactivated (loses keyboard&mouse focus). So I'm sometimes blocking WM_NCACTIVATE to avoid this problem. And there are some other things like that, where I'm trying to fix some problems "behind your back".
In order for madVR to do these tweaks, I need access to all the messages sent to your main window. By default madVR does all this automatically, by subclassing your main window (which means replacing your window proc with my own using SetWindowLongPtr(GWLP_WNDPROC)). This seems to work fine, usually. However, subclassing is kind of an ugly solution. Especially if more than one person/filter subclasses the same window, all hell can break lose, if the subclassing is uninstalled in the wrong order. Because of that it's cleaner if you stop madVR from subclassing your main window. But if you would simply stop madVR from doing that, madVR's tweaks to your messages would no longer be active. So if you disable madVR's subclassing, you also have to manually feed all your messages to madVR's "IMadVRSubclassReplacement" interface.
I hope things are clear now?
Basically let me sum is up like this: You don't have to do anything. It works the way it is right now. However, if you added the code you've quoted, you'd get a cleaner solution with less risk of instability.
(The reason I've implemented "IMadVRSubclassReplacement" is that J.River MC had subclassed their own main window and madVR did that, too, and sometimes the subclassing was done in the wrong order, which caused crashes. So they asked me to create an interface which allowed them to disable madVR's subclassing without losing any functionality.)
v0lt
19th April 2015, 14:42
@madshi
Ok. Added in r312.
madshi
19th April 2015, 16:44
Thank you!
xiringu
20th April 2015, 17:36
Are there any settings to help with 50fps videos?
My laptop can't handle 50 fps very well. I've tried changing things,but I get either a jumpy (irregular, and very distracting) or a slow-mo video. Converting videos is out of the question, it would take too long.
So, what I'm asking is: is there anything else I could try? Is there any option to skip frames for example?
Thanks
Nintendo Maniac 64
20th April 2015, 23:06
Are there any settings to help with 50fps videos?
Well for what thing, what's the resolution of the content in question, and what is your CPU and GPU?
One thing you can always try is to enable "D3D Fullscreen" which helps a lot with high framerates at high resolutions on weak GPUs (read: Intel 965GMA or similar).
xiringu
21st April 2015, 14:06
Specs: AMD C50 1ghz + Radeon HD 6250 + 2 GB RAM
It runs 720p smoothly, and 1080p depending on the media player (that's why I use mpc-be).
I can't run FLAC, 10bit or 50fps. If the video has any of these, I get stuttering. Sometimes is constant frame drop, sometimes, it plays for a few seconds, then stops for a second, then plays, then stops, etc.
I've tried 50 fps videos in 480p and 720p and it doesn't matter, I get stuttering anyway.
I'll try D3D next time I get a 50fps video.
If I had a faster computer, I wouldn't mind converting to 25 fps, but it would take too long on this laptop.
Worst of all is that even mpc-be interface gets a bit sluggish when playing 50fps.
I was hoping of a settting like in console emulators, where you can select a frame skip value or something like that (eg. force 25 fps on video, instead of trying to play full 50 fps).
piquadrat
21st April 2015, 14:31
I have problems with playing youtube content recently. Can't manage any stream to be rendered. MPC-HC follows the same route. Maybe some changes on google side? Do you experience that?
Nintendo Maniac 64
21st April 2015, 23:12
AMD C50 1ghz + Radeon HD 6250 + 2 GB RAM
Oh geez, no wonder - that's a really low-end CPU (read: equivalent to ~750MHz Athlon 64 x2 or ~600MHz Core 2 Duo). I have a "notbook" with an AMD E-350 which uses the exact same architecture but runs at 1.6GHz.
So here's the deal - if you can't do hardware decoding of h.264, you're out of luck outside of 720p 30fps. That also means that 10bit h.264 is likely out of the question since that requires more CPU grunt than 8bit because it can't be decoded in hardware, though you might be able to manage it at 720p.
Also the FLAC should have nothing to do with it since FLAC is very light on the CPU and it's more likely that the encodes that use FLAC are also using 10bit h.264 (this is semi-common).
Lastly, your GPU is fine, so using D3D Fullscreen won't help with stuttering; what it will help with however is reducing the CPU load. However, no offense to the creator of MPC-BE, but exiting D3D Fullscreen is much less convenient than it is in MPC-HC.
Aleksoid1978
22nd April 2015, 00:45
I have problems with playing youtube content recently. Can't manage any stream to be rendered. MPC-HC follows the same route. Maybe some changes on google side? Do you experience that?
I check random youtube's link - open and play fine.
ryrynz
22nd April 2015, 01:33
Latest is still 265, you guys got a fresh build coming?
v0lt
22nd April 2015, 04:07
Latest is still 265, you guys got a fresh build coming?1.4.4 (build 286) final.
Added:
MPC-BE 1.4.5 (build 315) beta (http://sourceforge.net/projects/mpcbe/files/MPC-BE/Nightly%20Builds%20%28from%20svn%20trunk%29/MPC-BE%20v1.4.5%20%28build%20315%29%20beta/)
ryrynz
22nd April 2015, 04:56
I didn't word as well as I should've.
1.4.4 (build 286) final.
Added:
MPC-BE 1.4.5 (build 315) beta (http://sourceforge.net/projects/mpcbe/files/MPC-BE/Nightly%20Builds%20%28from%20svn%20trunk%29/MPC-BE%20v1.4.5%20%28build%20315%29%20beta/)
Thanks!
foxyshadis
22nd April 2015, 07:56
I can't run FLAC, 10bit or 50fps. If the video has any of these, I get stuttering. Sometimes is constant frame drop, sometimes, it plays for a few seconds, then stops for a second, then plays, then stops, etc.
The FLAC problems are probably just a proxy for high bitrate video, since CABAC becomes a significant bottleneck as bitrate goes up. (Unless you also have incredibly slow storage to go along with it.) You're more than 12 years behind the state of the art, and some tradeoffs will naturally come from that.
FFDShow has a setting to skip deblocking or whole frames if the video gets behind, you might want to look at that. Beyond that, you'll likely want some form of fast re-encoding to fix playback of high-end video.
xiringu
22nd April 2015, 11:08
Thanks for the tips :)
I'm fully aware of the limitations of my current hardware (I've had computers for 30 years now), it's just how things are at the moment.
I always skip high quality videos and stick what I know I can watch properly. Unfortunately it's starting to be more and more common to find things like sports in 50fps, and difficult to find a 25fps version.
That's my problem.
Nintendo Maniac 64
23rd April 2015, 05:00
Unfortunately it's starting to be more and more common to find things like sports in 50fps, and difficult to find a 25fps version.
That's my problem.
Make absolute sure that "DXVA (native)" is being used as the decoder in your LAVFilters settings, because I just tested with an h.264 video @ 8bit 720p 60fps on my AMD E-350 underclocked to 982MHz and I have no framedrops and only 35-50% CPU utilization with spikes around 55% via a stock copy of *gasp* MPC-HC 1.7.8 64bit, and that's with some worst-case scenario settings (accurate vsync, alternative vsync, no D3D fullscreen, bicubic upscaling to 1440p)
Now considering that your AMD C-50 uses the exact same CPU cores and architecture as my AMD E-350, your performance with DXVA enabled should be indentical to my above-mentioned test if not better considering the intensive settings I used and that my underclock was a bit below 1GHz.
By comparison, without DXVA, h.264 @ 8bit 720p 60fps is just barely a bit too much for even my AMD E-350 at its stock 1.6GHz (I reckon 50fps or 48fps would be fine though), while h.264 @ 10bit 720p 60fps is definitely too slow.
For reference, this is the video I tested with (scroll down for download links):
http://www.nostro.fr/amv-quantum-ripples/
EDIT: FYI, anothing thing you can do to lower the CPU utilization a bit is to use the "MPC Audio Renderer" (note that only the MPC-BE version of that filter works correctly), particularly in that it will use WASAPI which will bypass any post-processing and/or resampling that the Windows audio mixer does (take note however that Asus and Creative sound cards will still do their own post-processing and resampling via their according audio driver control panel).
xiringu
23rd April 2015, 20:05
Played that one perfectly, (720p 8bit 60fps with mpc-be at 20% CPU and 25-30% with sharpen), so I guess the problem is somewhere else..maybe on the videos themselves.
I'll look for more videos from different sources, and different themes, to test.
Thanks
Nintendo Maniac 64
23rd April 2015, 23:08
Like I said, it's probably an 8bit vs 10bit thing - there are several ways you can find out whether a video file is encoded with 8bit h.264 or 10bit h.264.
The most reliable method is probably doing the following in MPC:
File -> Properties -> MediaInfo (tab)
Then under "Video", look for "Bit depth".
xiringu
24th April 2015, 11:10
Thanks, I know how to check that. :P
I had to do it when I started downloading anime and had problems. I hate when people do things like 10bit, FLAC, etc and don't say it on the video info.
I can't say for all the videos I had problems with, but my guess is that is something else, because most are TV captures of live events, and I'm pretty sure they are not 10bit, but I could be wrong. :)
Nintendo Maniac 64
24th April 2015, 23:10
I had to do it when I started downloading anime and had problems. I hate when people do things like 10bit, FLAC, etc and don't say it on the video info.
Depending on how it was encoded, you can sometimes open the partially-downloaded file in MPC and look at the MediaInfo without needing to completely download the entire file.
And again, don't blame FLAC, it's just that 10bit h.264 + FLAC is quite common. Did you know that the original Nintendo DS (67MHz ARM9 + 33MHz ARM7) of all things can decode FLAC in pure software via the LMP-ng homebrew app? (Link (http://www.cecm.usp.br/~lucas/lmp-ng/))
I can't say for all the videos I had problems with, but my guess is that is something else, because most are TV captures of live events, and I'm pretty sure they are not 10bit, but I could be wrong. :)
I'm pretty sure that 99.99% of all 10bit encodings on the internet are from 8bit sources. I do know that 10bit caught on quite quickly in anime circles since it allowed you to use a lower bitrate without noticable color banding that would have been present with the same bitrate at 8bit.
huhn
24th April 2015, 23:28
on my i3 4130 mp3 and flac decoding has about the same speed.
flac is one of the less demanding codecs i have ever seen.
foxyshadis
25th April 2015, 08:09
If it's not 10 bit, it's probably too many reference frames. MediaInfo should show that as well. That said, since this is about downloaded files, we can't help you for those anymore. Too much liability.
Hypernova
26th April 2015, 15:59
Hi. I'm having orange/green artifact in seekbar preview as seen here:
http://i.imgur.com/m4Us6M2.png?1
Only happen when using madVR and the video is Hi10P. I'm using madVR 0.87.21. and MPC-BE 1.4.5 (build 315) beta from the link a couple posts above. The 32bit chain seems to give a green while x64 give an orange artifact. I'm not sure where the problem lies but since it's MPC-BE feature I started here. Any idea or suggestion? Thanks.
nijiko
26th April 2015, 18:54
MPC-BE 64 can't load any 64 bit filters.
System: Win 8.1 64
Aleksoid1978
27th April 2015, 06:41
Hi. I'm having orange/green artifact in seekbar preview as seen here:
http://i.imgur.com/m4Us6M2.png?1
Only happen when using madVR and the video is Hi10P. I'm using madVR 0.87.21. and MPC-BE 1.4.5 (build 315) beta from the link a couple posts above. The 32bit chain seems to give a green while x64 give an orange artifact. I'm not sure where the problem lies but since it's MPC-BE feature I started here. Any idea or suggestion? Thanks.
Bug in Intel drivers - video renderers accept P010/P016 input but failed renders. There is nothing to do.
huhn
27th April 2015, 12:53
so this preview is drawn using EVR?
Nintendo Maniac 64
27th April 2015, 23:28
Bug in Intel drivers - video renderers accept P010/P016 input but failed renders. There is nothing to do.
There was some discussion on this very bug in the LAVfilters thread - it seems to have been introduced with the 2015 January Intel HD drivers and I myself can vouch for this and that the issue did not occur on the driver version before that (the last Intel HD driver version of 2014).
Of course, in my infinite wisdom, I didn't keep a copy of said 2014 driver. :rolleyes: I wouldn't suppose anyone around here would have a link or a copy of it, would they?
Aleksoid1978
28th April 2015, 01:49
so this preview is drawn using EVR?
Yes. You are right.
Aleksoid1978
28th April 2015, 06:13
Hi. I'm having orange/green artifact in seekbar preview as seen here:
http://i.imgur.com/m4Us6M2.png?1
Only happen when using madVR and the video is Hi10P. I'm using madVR 0.87.21. and MPC-BE 1.4.5 (build 315) beta from the link a couple posts above. The 32bit chain seems to give a green while x64 give an orange artifact. I'm not sure where the problem lies but since it's MPC-BE feature I started here. Any idea or suggestion? Thanks.
Try this build - http://rghost.ru/7vVCK45kx
nijiko
28th April 2015, 13:24
@Aleksoid1978 ,why must I disable the UAC of OS, then I can load 64 bit .ax into the list of MPC-BE64 only?
OS:Win8.1u3 Ver:315
Hypernova
28th April 2015, 19:20
Try this build - http://rghost.ru/7vVCK45kx
Yes, this work great! :thanks:
Hopefully x64 build will come out later :)
xiringu
1st May 2015, 13:11
Weird thing (build 315).
I've always used the "play next in the folder", and never had a problem...until today.
I clicked "next" and it went to a movie in another folder. I clicked "next" again and it went back to the same movie I was watching.
Then I realised those were the last 2 files on my "recent files" list, and it's cycling between them.
They are movies from different folders, and in each folder there are more movies.
I don't know if anybody else experienced this before?
ed: I closed mpc-be, open another file manually and clicked "next" and it's doing what it's supposed to again. I can't repeat it.
Duffy Moon
2nd May 2015, 00:14
I've just switched from normal MPC-HC and I can't get MPC-BE (315) to autoswitch refresh rate. Madvr should do this, right?
sorry to ask this obvious question but you switched to madVR as the video renderer?
Duffy Moon
2nd May 2015, 22:34
sorry to ask this obvious question but you switched to madVR as the video renderer?
Yes, I always use madVR.
Edit: ahh I think I know what you mean now. I had previously thought it sufficient to have madVR in external filters and set to "prefer"
Hi devs.
Can you please treat Video Frame as Normal Size if video resolution is close to display resolution (for example 1077@1080)? Cause there is really no point to use 1,0??? scaling here just to screw picture up and load GPU with useless tasks.
I can't always keep player in Normal Size cause I use to play low res videos a lot, and I don't want to bother with hotkeys each time as some "adviced", I want it automatic. Thanks.
Should be really not hard:
If DRes/VRes < 1,1 then Video Frame = Normal Size.
@Qaq
View->Options...->Playback->Auto-zoom = 100%
@v0lt
Tried what you said. Enabled autozoom to 100% and start in fullscreen. Still the same: image upscaling 1077 > 1080 is used.
@Qaq
Example "1077> 1080" is very incorrect.
1. No increase is because the width of the frame (1920) is equal to the width of the screen (1920x1080).
2. 1077 is an odd number, it is impossible for most decoders.
Video is 1916 x 1076 (usual case for WEB-DLs), display is 1920 x 1080. Its not equal and upscaling is used if I keep player in "Touch Window From Inside". And I keep it that way cause I play a lot low res videos where upscaling is needed.
1916 is also lower than 1920 but upscaling makes no sence there. At all. Even worse - my simple Intel HD Graphics overloaded with 1916>1920 upscaling and drops frames. I have to switch between "Touch Window From Inside" and "Normal Size" back and forth all the time to fix it. Thats why I kindly ask you to ignore 1-2% of upscaling.
Width : 1 916 pixels
Height : 1 076 pixels
I recommend you use a build 189 and newer.
thanks, tested extensively and I can confirm that the Audio Decoder Settings are now stable....
an other Topic, here :
http://www.makemkv.com/forum2/viewtopic.php?f=1&t=4781&start=360#p39209
it was reported that there is a Linux build (openELEC) for Raspberry Pi which alegedly is able to play 3D-MVC mkv-Files...
can not confirm this, since I'm not in Pi and not much in Linux...
but if it is true wouldn't that mean that there is a open solution for this (Decoder and Renderer)?
Nintendo Maniac 64
4th May 2015, 23:55
Thats why I kindly ask you to ignore 1-2% of upscaling.
A better method would be a user-configurable tolerance that could be set to either an absolute pixel-count or a percentage.
There could also be a second setting that enables it to also occur with videos that are exactly half the vertical height and width of the given tolerance area - like a 1916x1076 video would be upscaled to 3832x2164 on a 3840x2160 display.
This does remind me though - would it be possible to change the desktop resolution and refresh rate based on the video content's framerate and its resolution? My TV does better upscaling than my HTPC can do since it's not particularly high-end...
wanezhiling
5th May 2015, 11:29
http://pan.baidu.com/s/1hqnIpMk
Can't show the sub.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.