Log in

View Full Version : MadVR Settings For 4K UHD


Pages : [1] 2

Nullack
3rd December 2015, 07:51
Gday Doom9ers

So I have been doing allot of testing on various open source video projects, mostly on MPC-HC x64 and LAV filters x64 nightlies. My hardware is a GTX 960 with an old sandy bridge CPU, displaying in a HTPC context to a 65" curved 3D LED LCD display, it can do 10 bit colour and UHD at 3840x2160P60Hz. I'm feeding it via HDMI 2.0.

I have been up till now using the EVR-CP, as I found in native mode DXVA 2 playing back complex HEVC high bitrate 4K footage at 60 FPS, I couldnt get madVR to perform in the 16ms cadence needed for 60 FPS video. Then I discovered the xysubfilter and how it looked better than the ISR of MPC-HC and it also seemed to be more robust with correctly doing punctuation and so on in the subtitles. Upon more testing I found there is a performance problem with xysubfilter and MPC-HC, and the Developer explained to me the root cause is because currently MPC-HC does not buffer xysubfilter subtitles - only the ISR does buffering. In fact if I disabled ISR buffering in MPC-HC I see the same performance problem in MPC-HC so I'm convinced thats the cause.

He recommended I use madVR as he said that supports xysubfilter buffering and has suggested that if I configure the madVR settings properly I should have no problem with performance of madVR in 4K as a renderer.

So given I've observed maximum performance of high bitrate complex video footage in 4K @ 60 FPS is best obtained through DXVA 2 native mode, and my CPU is kinda ancient and cant deal with software decoding, what exactly do I need to set in madVR to get it working so all my frames are under 16ms and it plays back 100% smooth? Ive spent some hours on this with trial and error, and I simply cant get for example HEVC Main 10 L52 2160P60 playing back properly in madVR.

Appreciate any help

Thanks

huhn
3rd December 2015, 10:22
try this.

reset madVR to default settings.

set chroma scaler to bilinear
set image scaler to bilinear

go to rendering -> general settings and set GPU queue size to 4 and disable FSE

go to rendering -> windows mode settings and set how many video frames shall be presented in advanced to 2

go to rendering -> trade quality for performance and check both 10 bit chroma buffer and 10 bit image buffer instead of 16 bit.

and post a screen from the osd with these settings.

Nullack
4th December 2015, 03:29
Thanks but no success.

For all of this Im using the latest madVR 64 bit and the latest beta of x64 xysubfilter, along with nightly x64 MPC-HC and x64 LAV Filters.

* madVR is not mature in layout for UHD 4K high DPI.e.g. The CTRL J stats are impossible to read at default 300% DPI and UHD resolutions.
* madVR is not stable with these settings. On a 1080P H264 file it was flicking between a black blank screen and some display, then it errored out with some sort of red text that I couldnt read in the CTRL J stats
* Trying another test video file I got this one to display without the black blank screen flickering, but the performance is poor wtih dropped frames and too much time between each frame

http://i64.tinypic.com/n3kdwi.png

EDIT: I also noticed something was wrong with my display once the madvr had done the red text error. No I notice in device manager that both my intel on baord GPU and my discreet nvidia GPU have been halted with the system message of:

"Windows has stopped this device because it has reported problems. (Code 43)"

So Im gunna reboot and continue testing

I have the latest nvidia drivers. None of these problems exist with EVR-CP.

Nullack
4th December 2015, 03:49
So more testing. Ive figured out madVR doesnt work reliably when I have a 2D desktop resolution enabled in the nvidia control panel - its 3840x2160P60 HDMI 2 - , but I also have the nvidia 3d sterescopic mode enabled, but in a current 2D desktop as explained. So I have now disabled the nvidia 3d stereoscopic mode and that appears for now to have stopped madvr killing the GPU and having the kernel shut it down.

I tried an experiment with keeping the bilinear and other suggestions like no FSE, but this time to use DXVA 2 where I can on the theory that nothing is faster than the dedicated video hardware engine in the GPU.

I tried to playback some MAIN 10 L52 HEVC P 60 content but its dropping frames and stuttering in playback

Under EVR-CP its fine.

http://i67.tinypic.com/r1j41j.png

Nullack
4th December 2015, 04:09
More testing. Reset madVR to defaults. Went with DXVA2 where possible, then bilinear. Enabled DX 11 FSE mode. Now I cant paste OSD screenshots but it was a bit better than prior configs and it seems to be the best one tried so far. However the same HEVX MAIN 10 L52 UHD P 60 clip was dropping frames and stuttering.

cyberbeing
4th December 2015, 04:50
In that first screenshot, the upload queue is empty even though the decoder queue is full, so something seems wrong on the system level. What sort of results you you get when your run this (http://madshi.net/madNV12Test.zip) for the upload/download speed tests?

Try updating your motherboard BIOS if possible, disabling the Intel iGPU, ensure your TV is connected to the GTX960 HDMI on a PCI-E 3.0 slot (verify this with GPU-Z when madVR is running), and try again using DXVA2-Copyback Direct. I'd also suggest testing both H.264 DXVA2 & Software decoding as well in addition to your HEVC DXVA2 sample, just to rule that out.

Nullack
4th December 2015, 04:57
Yes in the first post set of tests it took me awhile to realise that windows had done a code 43 on both GPUs and shut them down as per my edit in that post mate. The cause and way to stop it from happening anymore was to disable the nvidia 3d stereoscopic option in the control panel, even though I was only running a 2d 4KP60Hz desktop on HDMI 2.

The CPU is an old sandy bridge, the BIOS is current, there is no PCIE 3 on that generation of motherboard. The hardware is fine, its just madVR doesnt play nice with nvidia 3d stereoscopic being on.

Ill do some more testing as you suggest not in native DXVA 2 but copy back DXVA 2.

Nullack
4th December 2015, 06:04
Well copyback is much better under madVR than native. OSD:

http://i68.tinypic.com/2lxcndw.png

Using bilinear and DXVA 2 with copyback on my problem HEVC file Im dropping allot less frames and are approaching something thats marginally allright to look at as a video

With the same FSE DX11 bilinear DVXA copy back config I tried my 127 Mbps HEVC test file that has a crowd of runners on a marathon. The EVR-CP plays that no sweat. Wih madVR, its stuttering and not smooth.

Im interested in further ideas on other settings - the testing so far has yielded good improvements if theres more to come I hope to be able to reach the sort of robustness Im seeing with the EVR-CP

QBhd
4th December 2015, 08:13
You have a modern CPU.... use CPU decoding. To this day I cannot fathom why people use any kind of Hardware/DXVA BS.... CPU is by far and away the best decoder (no hassles and same PQ), unless you have a dinosaur of CPU.

QB

Nullack
4th December 2015, 09:05
Theres no way high bitrate MAIN 10 L52 4K HEVC @ 60 FPS will in realtime be decoded in my CPU

What specifically are any real criticisms of the nvidia pure video engine? Or the implementation in LAV filters with DXVA 2 native and CB?

I just tried to test your views, and what you claim is a waste of time the CPU cant do it.....

QBhd
4th December 2015, 16:55
My bad, I was half asleep... didn't pay attention to the fact you are watching 4k@60... I thought you wanted to upscale to 4k.

Main take away from my post.... don't post when half asleep!

QB

cyberbeing
4th December 2015, 18:42
When when the stutters occur, what does the madVR OSD show? Do the stutters coincide with any of the queues dropping, or otherwise frame drops, presentation glitches increasing?

In any case, try the following settings:

Chroma upscaling: Catmull-Rom

General settings: CPU Queue - 8
General settings: GPU Queue - 6
General settings: Enable - Automaitic Fullscreen Exclusive Mode
General settings: Disable - Direct3D 11 for Presentation
General settings: Enable - Use a separate device for presentation
General settings: Enable - use a separate device for dxva

Windowed mode settings: Disable - Present several frames in advance
Windowed mode settings: Backbuffers - 8
Windowed mode settings: When and how shall GPU be flushed - 'Don't Flush' for all

Exclusive mode settings: Enable - present several frames in advance
Exclusive mode settings: Frames to be presented in advance - 6
Exclusive mode settings: When and how shall GPU be flushed - 'Don't Flush' for all

Dithering: Ordered Dithering

Trade Quality for Performance: Enable - Optimize subtitle quality for performance
Trade Quality for Performance: Enable - Don't use linear light for dithering
Trade Quality for Performance: Enable - Don't rerender frames when fade in/out is detected
Trade Quality for Performance: Enable - Don't use linear light for smooth motion blending


Try running GPU-Z logging in the background, to see if at any point you are running out of your 2GB of VRAM or otherwise maxing out GPU utilization. It's possible you could be running out of VRAM at times, in which case lowering your queues as suggested above may help.

Another thing to keep in mind, is that it's possible your GTX960 just isn't fast enough to decode 127 Mbps 2160p60 HEVC completely in real-time. If for example decoding slows down from 60fps to say 58fps for a few seconds, EVR I believe will actually slow down rendering to 58fps while madVR would instead drop frames. If this is the case, you could try forcing on smooth motion:

Smooth Motion: Enable smooth motion frame rate conversion - Always

huhn
4th December 2015, 19:09
i can easily decode way more than 127 mbit in realtime with my 960.

that'S nothing for the GPU hardware decoder.

a gpu buffer of 4 should be used or he will run out of GPU ram very fast.

Nullack
6th December 2015, 01:28
In any case, try the following settings:

Chroma upscaling: Catmull-Rom

General settings: CPU Queue - 8
General settings: GPU Queue - 6
General settings: Enable - Automaitic Fullscreen Exclusive Mode
General settings: Disable - Direct3D 11 for Presentation
General settings: Enable - Use a separate device for presentation
General settings: Enable - use a separate device for dxva

Windowed mode settings: Disable - Present several frames in advance
Windowed mode settings: Backbuffers - 8
Windowed mode settings: When and how shall GPU be flushed - 'Don't Flush' for all

Exclusive mode settings: Enable - present several frames in advance
Exclusive mode settings: Frames to be presented in advance - 6
Exclusive mode settings: When and how shall GPU be flushed - 'Don't Flush' for all

Dithering: Ordered Dithering

Trade Quality for Performance: Enable - Optimize subtitle quality for performance
Trade Quality for Performance: Enable - Don't use linear light for dithering
Trade Quality for Performance: Enable - Don't rerender frames when fade in/out is detected
Trade Quality for Performance: Enable - Don't use linear light for smooth motion blending

Another thing to keep in mind, is that it's possible your GTX960 just isn't fast enough to decode 127 Mbps 2160p60 HEVC completely in real-time. If for example decoding slows down from 60fps to say 58fps for a few seconds, EVR I believe will actually slow down rendering to 58fps while madVR would instead drop frames. If this is the case, you could try forcing on smooth motion:

Smooth Motion: Enable smooth motion frame rate conversion - Always

Thanks mate,

So I did a reset of MadVR defaults, and configured it all as per above except I took Huhn's advice of 4 for the GPU given GPU memory constraints. I also disabled deinterlacing and set DXVA2 for the non chroma stuff. I configured LAV filters to use copyback.

Im still dropping frames. I always have ran telemetry during playback. I see around 87% GPU memory utilisation on this config for my MAIN 10 L52 4K HEVC test file. Its one of the reasons why I prefer native mode DXVA 2 as that uses less GPU ram. Apart from that there is nothing suspicious about video engine load, GPU core load etcetc.

I've spent hours and hours on this and so far my testing conclusions are:

1. For my specific use case, the current madVR build does not perform well and is not in a stable lifecycle point. EVR-CP is on both counts.
2. Again in my use case, madVR is poorly useable at 4K UHD resolutions with high DPI fonts as GUI objects are too small to read and use. EVR-CP has fixed these problems in the nightlies.
3. EVR-CP is stable, and does perform well, including in DXVA 2 native mode which for memory use reasons is prefered on my 2GB graphics card.

I've tried having an alternate go with the MPDN software, but that software player wont enter into runtime and just aborts without user notice or error. Myabe Ill get somewhere with that in time or madVR will have patches applied. In the meantime EVR-CP and the ISR works in MPC-HC.

huhn
6th December 2015, 05:14
I can run a computer game in the background and can still watch the 127 mbit sample without stuttering or dropping frame.

maybe PCIe 2.0 but I don't think so.


"Windows has stopped this device because it has reported problems. (Code 43)"

sounds serious to me.

Asmodian
6th December 2015, 05:29
Have you tried disabling exclusive mode and using "enable windowed overlay" instead? Why present so many backbuffers? 3 should be plenty and more uses GPU memory unnecessarily, test all the way down to 1 backbuffer. 4 for the rendering buffer but 8 backbuffers?!

Do not change the flush settings from the defaults.

the current madVR build does not perform well and is not in a stable lifecycle point.

I do not understand how you can say madVR is not in a stable lifecycle point, you haven't reported crashes or anything. It is simply that your system is too slow for madVR, using the settings you have tried so far, so you need to use the lower quality EVR-CP. How can you blame madVR for that? :mad:

Maybe is an issue with PCI-E 2.0, are you sure you are using 16 lanes for your GPU? Others are able to use madVR with HEVC Main 10 4K60 and a 960.

Nullack
6th December 2015, 05:55
I realise madVR does cool and interesting stuff, thats why I'm spending the time testing it and trying different settings. Discussing bugs and crashes is a normal part of software development, I get your emotionally attached to madVR, cool, but the facts are, various madVR settings do result in crashing madVR, as well as the wider GPU stack such as the issue I reported with the kernel shutting down the graphics device as a result. I've figured out what causes that and I've got a workaround (disable the nvidia stereoscopic mode even though I was always in a 2D desktop resolution) but I've still got crashes within madVR as well as a general performance problem that prevents madVR from being effectively useful for my use cases in 4K and HEVC. The facts are, the test results show madVR is not robust and that EVR-CP is. Maybe its something unique about my setup (such as Im on a HTPC display running YUV not a digital sorta monitor with RGB) but the facts are in the test results nonetheless.

I've already confirmed Im on PCIE 2 with x16, that theres nothing wrong with the system / stability / thermals / power etcetc.

I'm willing to try more settings as I've proven by following suggestions from other users, but so far none of them have been effective in being able to do MAIN 10 L52 high bitrate HEVC encoded footage. If you have a suggestion on settings, please detail it. Thats exactly why I asked for help in the first place. I'm new to madVR and I would like to configure it for my setup.

Asmodian
6th December 2015, 09:07
I did suggest some settings, have you tried them? Windowed overlay and very low backbuffer queues? Windowed overlay has been working much better for me with current Nvidia drivers. Also don't use DXVA scaling, I suggest Catmull-Rom or Bicubic 75, and bilinear is at least as fast as DXVA2 scaling.

I believe your stability issues are actually due to Nvidia's drivers. Many, including me, have recently had trouble with them crashing. In my case I had to reinstall them a few times in different ways before I was able to get them to be stable (980 Ti, Win10 x64). Your stability issues and black screen flickering, etc. sound very similar to some of the other driver issues I have seen. My personal issue was a global driver crash.

I suppose my annoyance in blaming madVR for your issues is that it prevents you looking for the problem elsewhere, where I believe it actually lies.

Simply because EVR-CP works and madVR doesn't does not mean anything is wrong with madVR. Some madVR builds have had issues but the current build seems to be very stable and performance has never been better.

High DPI support for the OSD is a reasonable request but everything else you are having trouble with is probably either a technical limitation (DXVA2 Native), an issue/bug with Nvidia's drivers, or specific to your system.

cyberbeing
6th December 2015, 11:16
If you tried the exact settings I posted as well as Smooth Motion out of ideas. FWIW, I'm using Win7 x64 and don't have any issues with dropped frames on 2160p60 even with higher settings than that, but if you're using Win10 I guess that could explain the difference. It could be some kind of Win10 driver issue as Asmodian mentioned, in which case there may be nothing much you can do other than wait it out for a more stable driver. Uninstalling the current driver, running something like DDU in safe mode, and trying a clean driver install may be worth a shot. You should also avoid the DXVA scaling modes in madVR when not using DXVA Native, since they are likely hurting performance from the extra copy operations and corrections required which won't occur with the shader based methods when using DXVA2 Copyback or Software decoding.

Otherwise, yeah. You've already spent so much time on this, after a couple more attempts (like trying Overlay as Asmodian mentioned) it may be worth to just move on and try again in a few months with more mature drivers and Win10 stability patches. It's hard to say what exactly could be hurting madVR stability on your system. MPDN not even launching on your system is even more strange...

Do not change the flush settings from the defaults.
Generally speaking I would disagree with this. The default flush settings haven't been needed on NVIDIA for a few years now, and just hurt performance compared to 'Don't Flush'. I've only seen a few cases of setting combinations where extra flushing was potentially helpful but only when pushing GPU load way too hard. Beyond that, madVR already does flushing automatically based your your settings in certain cases. YMMV though I guess. I will say though, I've personally had issues getting the DX11 modes perfectly stable with my GTX770 under Win7, so this may only apply to this hybrid of DX9 old mode Windowed & DX9 new mode FSE I've been using.

Why present so many backbuffers? 3 should be plenty and more uses GPU memory unnecessarily, test all the way down to 1 backbuffer. 4 for the rendering buffer but 8 backbuffers?!
You may have missed that I said 8 backbuffers with the old window mode, not present buffers. It's more of a why not in the old windowed mode, since it doesn't eat performance or memory to the same extent as present in advance with the new windowed mode does. But yes, setting old windowed mode backbuffers to 3 or 4 or otherwise equal or below your render queue could potentially help, what's important is just that they remain full and don't fluctuate. I'm assuming he's having issues with Fullscreen Exclusive though not Windowed mode.

Nullack
7th December 2015, 06:28
Thanks to you both, I genuinely appreciate both the time and the depth of skill your both sharing. Top stuff

First I think I'll do that safe mode DDU purge and re-install just to re-baseline things in the GPU stack. Wont take long. Then I'll revisit some of the settings and try a few new settings as suggested. My only gripe with DDU is that it leaves a service hanging around in Windows but oh well I can manually delete it later on.

I am aware there was significant architectural shifts in Windows 10 across the GPU stack - for example the windows display driver model shifted to WDDM v2.0 and Directx12 and new media foundation capabilities etc etc. As well threshold hold two was just pushed outside of windows insider builds to production so all Win 10 users have whats effectively a service pack thats new recently.

Cheers fellas

Nullack
22nd December 2015, 07:04
Ok an update on this. I figured out madVR in this setup didnt work well with YUV420 as the display output. As soon as I figured out how to set my 65" UHD LED 3D display into samsungs so called UHD colour mode, it enabled me to amongst other things over HDMI 2 run the display in RGB 8 bit full colour resolution 0-255 at 60Hz. As soon as this changed, the performance of madVR greatly improved. The software really didnt like outputting in 4K at TV chroma sub sampling for some reason.

Then, with the latest GeForce drivers which now have VP9 GPU acceleration, the stability seemed better. Ontop of that with all the Windows 10 updates since TH2 its pretty much working reliably.

This is all on resetting to defaults via the .bat, so Im now going over the expertise in this thread to try and optimise the setup. I hope Madshi can fix the 4K render bug for high DPI situations cos the renderer stats are unvieweable at normal seating distances. I've had to move back to copyback instead of native to get madVR to kick in with the chosen settings - default doesnt work when in native mode under DVXA2. But theres more to come with tweaks Im sure.

nevcairiel
22nd December 2015, 11:09
DXVA Native isnt recommended with madVR in any case as it can degrade quality

Nullack
22nd December 2015, 15:02
Thanks Hendrink

Ok Ive spent hours on this. Some facts from todays testing now that its 1am and I dont want to forget it in the morning :) This is all on MAIN 10 HEVC L52 high bitrate 60 FPS footage 4K UHD.

* Win 10 with the post TH2 windows updates and Geforce 361.43 drivers as well as the current madVR has sorted out the stability problems
* Copyback needs to be configured in LAV video settings for DXVA 2
* GPU buffers of 8 ontop of copyback (it uses more memory than native) really rides a dangerous zone with gpu memory utilisation becoming very high on my 2GB card. Setting it to 4 brings it down to a nice 87% utilisation still with copyback on.
* D3D11 must be disabled. It performs badly with it on with dropped frames.
* Fullscreen exclusive must be disabled. It performs badly with it on with dropped frames.
* Windowed overlay must be on. With it off, it frame drops.
* For now Im just running bilinear on upscale/downscale/chroma and I can fiddle around with this more in later testing sessions. I assume I have some more headroom for better settings. Tonight was a marathon of just getting the basic baseline down pat with no dropped frames on the 60 FPS complex video footage.
* This is all with no subtitles and further testing is needed with those included.
*Im too tired right now to be able to say if this config in madVR looks better than the EVR-CP on this test footage or not. In time I might have something to observe there.

Cheers fellas

madshi
22nd December 2015, 16:40
From what I've seen you're switching back and forth between a dozen different setups, and never try to figure out the issues with each specific setup. Doing it this way doesn't really bring us to any conclusions. The right thing to do would be to start with a good initial setup, and then if there are problems, DON'T switch to a different setup, but analyze the problems in detail to figure out what's causing the problems. So:

- start with madVR default settings
- if you're short on GPU RAM, reduce the GPU queue size a bit
- do NOT change any other madVR settings
- set LAV to DXVA copyback
- set your GPU to 0-255 RGB output
- set all GPU control panel options to "application controlled", don't force anything on/off
- disable NVidia 3D Vision

With this setup, make a screenshot of the Ctrl+J OSD. In your previous screenshots in this thread it's sometimes queue "whatever" and sometimes "something else" which is in trouble, which indicates that you're switching settings all the time without properly analyzing one specific settings combination first. With the same setup it is usually always one specific queue which gets into trouble, and that queue tells us where the exact bottleneck is in your situation. Also don't test 10 different video files. Just pick one to test with. Then report your results here and wait for feedback before switching settings again.

If your queues are all nicely filled, playback is expected to be smooth and fluid. If you're getting stuttering then probably one or several of the queues is in trouble. And that usually has a good reason.

FYI: The NVidia GPU driver crashing is not a sign of madVR being unstable. It's a sign of the GPU driver being unstable. AMD drivers are known to be unstable with CrossFire enabled. NVidia drivers are known to be unstable with 3D Vision enabled.

P.S: The latest build v0.89.19 scaled the Ctrl+J OSD font size with the window/screen size. So the font should be quite a bit larger now when doing 4K output.

Nullack
23rd December 2015, 00:19
Hi Madshi,

From what I've seen you're switching back and forth between a dozen different setups, and never try to figure out the issues with each specific setup. Doing it this way doesn't really bring us to any conclusions. The right thing to do would be to start with a good initial setup, and then if there are problems, DON'T switch to a different setup, but analyze the problems in detail to figure out what's causing the problems

I welcome insights into how to do further analysis. At the moment its largely based on monitoring systems telemetry data, and what madVR renderer stats are saying. Short of having the code in some sort of debug build and doing program level stuff, I don't see what else can be done but nonetheless I welcome further analytic approaches. I will do whatever I can do to provide meaningful bug reports :) I want to get to a place where I'm benefiting from madVRs cool stuff in a reliable and working setup.

Also don't test 10 different video files. Just pick one to test with. Then report your results here and wait for feedback before switching settings again.

Ok. I'll settle on my MAIN 10 HEVC L52 60 FPS 4K video footage. That allows for 16.67ms for each frame. I also settle for now on RGB 0-255 8 bit colour @ 60Hz through HDMI 2.0 for the display.

With this setup, make a screenshot of the Ctrl+J OSD.

Will do thanks. Ill do this as soon as I have access to the display today.

FYI: The NVidia GPU driver crashing is not a sign of madVR being unstable. It's a sign of the GPU driver being unstable. AMD drivers are known to be unstable with CrossFire enabled. NVidia drivers are known to be unstable with 3D Vision enabled.

I guess its a difference of cause vs effect. If any of the various layers of abstraction/dependencies are unstable, the *effect* is that madVR in turn becomes unreliable and its usefulness goes. I understand that finding the cause involves many different parts - the driver, WDDM 2.0, middleware API's etcetc and that finding the root cause may not necessarily involve a single change to madVR code at all. Ultimately the effect of an unstable graphics stack is the same to madVR irrespective of it not being caused by madVR. I'm pleased that now with all the post Win 10 TH2 updates and the new drivers, the stability problems are gone. That is, with 3D Nvision off.

P.S: The latest build v0.89.19 scaled the Ctrl+J OSD font size with the window/screen size. So the font should be quite a bit larger now when doing 4K output.

Thanks for the patch. There's a particular use case here. As its a 65" monitor, Microsoft defaults to a 300% DPI scaling size. So its not just a 4K resolution situation. Its both a 4K resolution situation and a high DPI situation. Based on the test results, something is still wrong in that build number. There is three cases where the text is way too small that I have observed so far:

* The renderer stats
* The version number when you go in MPC-BE filters > madVR
* The onscreen font that displays "pause", and "play" etcetc

Cheers

Nullack
23rd December 2015, 01:16
Hi Madshi,

Here is the info

********************
Test Setup

LAV Filters x64 Nightly build config: DXVA2 Copyback. RGB Output levels untouched same as input.

Nvidia Settings: 3840x2160. 60Hz. 32 bit colour depth. RGB. 8Bpc. Full dynamic range. HDMI 2.0. Stereoscopic 3D vision disabled. All control panel items set to app controlled/let the 3D application decide/use video player setting. Driver v361.43. All 3D settings restored to global defaults.

Test Video. 4K resolution progressive MAIN 10 HEVC L52 constant 51.5 Mbps bitrate 60 FPS YUV 420 BT.709

MadVR Settings (current build v0.89.19)
- start with madVR default settings
- if you're short on GPU RAM, reduce the GPU queue size a bit

(Set to 4 from default of 8. GPU memory utilisation peaks at 94% on the test video at 4 buffers)

- do NOT change any other madVR settings
- set LAV to DXVA copyback

********************
Test Results

GPU Telemetry

http://i67.tinypic.com/x1adl1.png

Here is a picture showing the high DPI / 4K bug with the font sizes. MPC-BE understands high DPI and the difference in the madVR version string is obvious in the pic.

http://i67.tinypic.com/2irss3o.png

With the video playback, I got dropped frames and stuttering in the first say 10 seconds of playback but then it seemed to settle down for the next few minutes. In the next few minutes it would drop frames with stutter but irregularly. I think I should enable the option to buffer up before playback commences? I tried taking a screenshot with these settings full screen but it was just a black picture with no video or OSD info. I always watch videos fullscreen and MPC-BE is configured to auto execute in full screen for videos.

Another bug report: When in 4K high DPI and using the default auto fullscreen exclusive mode, the seek bar and the stop/skip/pause buttons are all way too small to use. Like the CTRL J renderer stats.

A test observation. The default 8 GPU buffers is too much for my setup and my chosen 4K test video. Setting it to 4 as per the above test config is essential to it working on my setup.

So with not being able to take a screenshot fullscreen what I did was pause the video, exit full screen and then take a screenshot that way. Here is a link for it:

http://i63.tinypic.com/24wev87.png

Thanks

Nullack
23rd December 2015, 02:56
Ok so some more study on the same config as above. During the initial 10 seconds of playback or so, when the most frame drops are happening, I struggle to see the renderer stats with the high dpi bug but if I try and squint real close I see that during initial playback the present que is hovering around 0-2/8 and other times 0-4/8.

When the video settles down and just drops/stutters irregularly after this, I observe the present que showing 1-3/8 and 1--5/8, rarely it hits 2-3/8.

madshi
23rd December 2015, 09:22
Yeah, I forgot that you can't do a screenshot in fullscreen exclusive mode. Could you make a photo with your phone/digicam? The screenshot from windowed mode isn't too helpful - unless it happens to show *exactly* the same numbers as in FSE mode *everywhere*.

In FSE mode, is the present queue also the first/only one which is near empty? If so, it shows a problem with presentation for some reason. The present queue is supposed to be nearly full.

Looking at your screenshot it seems that the Ctrl+J stats are covering about half of your video height. Is that the case in fullscreen playback, too? If so, that seems to be a fair size to me. How much larger do you want the text to be? At least the font should be much larger than it was with previous madVR builds, no?

Nullack
23rd December 2015, 12:19
Gday Madshi

Ill get to testing later when I have more access to the display and do mobile phone photos of what the renderer stats say in full screen. Ive noticed its totally different stats in full screen exclusive to being out of it so Ill have to do it via external photo.

With the font size problems in 4K and large DPI situations, I wish I was rich so I could buy you your own large 4K display to see for yourself :) The root of the problem seems to me that madVR is not a high DPI aware application. It needs to be aware of high DPI - Im running 300% DPI. Its totally different use cases in say "case a" with just 2160P resolution, and "case b" with 2160P resolution at 300% DPI. The renderer stats are way too small to read. Mine is a 65" display, so its large, and it's a so called "10 foot GUI" setup in a HTPC situation - to get a THX recommended viewing angle of 36 degrees.

Here's a link to how the nightly MPC-BE renderer stats look. It works really well for 65" displays with high DPI and 4K. The graph is also useful for seeing the temporal state over time.

http://s12.postimg.org/hdqrhecbx/EVR_Stats.png

What I think needs fixing so it is visible/useful in high DPI / 4K situations:

* The renderer stats
* The version number when you go in MPC-BE filters > madVR like the screenshot I provided in the previous post
* The onscreen font that displays "pause", "exclusive" and "play" etcetc
* The seekbar is too small
* The pause/stop/que icons

Thanks

madshi
23rd December 2015, 12:37
1) renderer stats: As I said, I've already made the fonts for the renderer stats much bigger for 4K. You should see a quite big difference between madVR v0.89.18 and v0.89.19. If you don't, something is wrong.

2) version number: Not very important at all, IMHO. I've more pressing issues to work on atm than the size of a version number... ;)

3) pause/play + seekbar: Ok, fair enough.

4) Not sure what you mean, but madVR doesn't create pause/drop/start icons. They must be coming from your media player, so it's the responsibility of the media player to draw them in a bigger size.

Nullack
23rd December 2015, 12:53
Hi

1. Yes something is wrong, and its your app :) I cant comment on builds prior to .19 as I didnt keep a record of how it looked prior. Here is some info on high DPI and the issues surrounding it. I dont think you can fix this by just tweaking with font sizes - I believe you need to make madVR a high DPI aware application. I'm not an expert in this field so I cant give code level help but I'm certainly seeing the same sort of symptoms Ive seen on dozens of apps which arent high DPI aware. Microsoft defaults my display to an OS level setting of 300% DPI.

https://software.intel.com/en-us/blogs/2014/04/14/dpi-scaling-issues

Heres a snapshot of the default Microsoft DPI scaling:

http://s2.postimg.org/xbryzecft/high_dpi.png

2. Sure :) Im merely providing the test results your the master of the madVR project and its priorities. And I'll say Im very thankful for your efforts the project does great stuff for HTPC folk.

4. That was my mistake - apologies mate.

madshi
23rd December 2015, 13:02
There's no magical switch I can activate to make everything work great with high DPI settings. It's a lot of custom work, especially with "hand drawn" items like seekbar, stats screen etc. So far I've only tried to make the stats screen adjust to higher resolution. It should work. If it doesn't could you please make a screenshot (unscaled, 3820x2160 pixels) with v0.89.19 and v0.89.18 so that I can see for myself? I don't have a 4K screen, so I can't try it on my PC. You can get v0.89.18 here:

http://www.videohelp.com/software/madVR/old-versions#download

Nullack
23rd December 2015, 13:42
I'm sorry that it's allot of work to support high DPI. Since Im not rich and cant donate you a high DPI large screen perhaps the best way I can help you is to do stuff like helping out testing between different versions. :)

I've done as youve asked, and your dead right its much improved from .18 to .19. Theres no way .18 would ever work for my setup at 4K and high DPI of 300%. Build .19 is kinda like squinting hard and sorta read it, but its pretty tough to use like how I was wrong that the video timer actually looked like play/pause/cue buttons to me from a 10 foot gui perspective. In the test results I offer below, Ive tried to include the player menus so you can see what readable fonts that are high dpi aware looks like. Also please note the seek bar sizes in both.

V .19
http://i63.tinypic.com/34rdlhi.png

V .18
http://i66.tinypic.com/2hnuutj.png

madshi
23rd December 2015, 14:36
Yeah, I'll make the seekbar bigger. I guess I can increase the font size of the screen stats once more in the next build, but I don't think I'll reach the size of your player menus. Anyway, the stats are only meant for debugging purposes, not to be used during normal playback use. So I think they're not as important as e.g. the seekbar.

Nullack
23rd December 2015, 16:44
Thanks.

So Im going to wrap this thread up cos its pretty much sorted now. To playback 4K content on madVR x64 I found:

* Its critical to use copyback DXVA 2 in lav filters
* Setting the gpu buffers to 4 is critical for graphics cards having 2GB of gpu ram as otherwise it'll be unstable as the gpu wont have enough memory. My next HTPC GPU will have more than 2GB of RAM.
* On Windows 10 you need the latest post TH2 updates and the latest nvidia drivers if your on Nvidia for madVR to have the stability it needs in all the middleware / os / device layers

Everything else is all just a matter of how fast a given GPU is and what type of video your playing. EVR-CP is faster than madVR when using default settings, but madVR does more things when using default settings. On a GTX 960 the standard madVR settings pretty much does 4K HEVC 8 bit colour stuff no problem including 60 FPS footage, it gets borderline with MAIN 10 ontop of it in say L52 60 FPS and then its again another step up when you start dealing with HDR encoded material. Fiddling around with lowering settings helps with the more complex footage.

Thanks fellas for all the help Im pretty happy now with having got basically my whole test video library working under different madVR settings. madVR looks good and it goes well with xysubfilter, and unlike EVR-CP, xysubfilter has buffered subtitle performance under madVR.

madshi
23rd December 2015, 17:00
So all queues are nicely filled now?

Nullack
23rd December 2015, 17:09
Yes, that particular 10 bit colour video file took my GTX 960 over the edge on the default settings. Default settings gobble up the 8 bit HEVC stuff including 60 FPS. When I reduced settings to give more headroom for the 10 bit test file, the video ran smooth without drops and the ques were ok. Then I had another round of the same sort of thing when I tried my HDR encoded HEVC L52 MAIN 10 60 FPS, cos I discovered the BT.2020 colour space adds more demand on madVR beyond just having 10 bit colour depth. Again fiddling with lowering settings fixed that too. The key things are copyback, 4 GPU buffers, and not having Microsoft and/or Nvidia stuff up the remainder of the stack :) All the rest is just performance tuning for particular video / systems. The cool thing is with profiles a user can accommodate these different videos with different settings. Thats a great feature.

madshi
23rd December 2015, 17:15
Ok, glad to hear that. FWIW, support for native 10bit HEVC DXVA decoding will probably come soon. But I don't think it will change much for you. Copyback is usually the better option.

JamPS
16th June 2016, 19:08
Hello!

With my 4K display, Fullscreen exclusive mode doesn't work - just gives a black screen with audio. When I disable it, everything works as it should.

Asmodian
17th June 2016, 05:39
Do not use Fullscreen Exclusive. ;)

ashlar42
17th June 2016, 13:07
You have a modern CPU.... use CPU decoding. To this day I cannot fathom why people use any kind of Hardware/DXVA BS.... CPU is by far and away the best decoder (no hassles and same PQ), unless you have a dinosaur of CPU.For me it mainly boils down to the CPU requiring higher fan settings (using Speedfan automatic adjusting) than the GPU for the same job. HTPC does not rhyme well with noise. :)

huhn
17th June 2016, 14:11
For me it mainly boils down to the CPU requiring higher fan settings (using Speedfan automatic adjusting) than the GPU for the same job. HTPC does not rhyme well with noise. :)

you can passive cool an i5 these days and i'm pretty sure my system can passive cool an skylake i7.

i'm passive cooling an i3 for over 2.5 years now.

the only thing that needs a fan in an HTPC these days is a GPU with over 75 Watt TDP.

mikeyjeff
2nd July 2018, 04:00
From what I've seen you're switching back and forth between a dozen different setups, and never try to figure out the issues with each specific setup. Doing it this way doesn't really bring us to any conclusions. The right thing to do would be to start with a good initial setup, and then if there are problems, DON'T switch to a different setup, but analyze the problems in detail to figure out what's causing the problems. So:

- start with madVR default settings
- if you're short on GPU RAM, reduce the GPU queue size a bit
- do NOT change any other madVR settings
- set LAV to DXVA copyback
- set your GPU to 0-255 RGB output
- set all GPU control panel options to "application controlled", don't force anything on/off
- disable NVidia 3D Vision

With this setup, make a screenshot of the Ctrl+J OSD. In your previous screenshots in this thread it's sometimes queue "whatever" and sometimes "something else" which is in trouble, which indicates that you're switching settings all the time without properly analyzing one specific settings combination first. With the same setup it is usually always one specific queue which gets into trouble, and that queue tells us where the exact bottleneck is in your situation. Also don't test 10 different video files. Just pick one to test with. Then report your results here and wait for feedback before switching settings again.

If your queues are all nicely filled, playback is expected to be smooth and fluid. If you're getting stuttering then probably one or several of the queues is in trouble. And that usually has a good reason.

FYI: The NVidia GPU driver crashing is not a sign of madVR being unstable. It's a sign of the GPU driver being unstable. AMD drivers are known to be unstable with CrossFire enabled. NVidia drivers are known to be unstable with 3D Vision enabled.

P.S: The latest build v0.89.19 scaled the Ctrl+J OSD font size with the window/screen size. So the font should be quite a bit larger now when doing 4K output.

Folks, in line with the above and many other discussion topics on this, I am really looking for some insight regarding 4K HDR playback using MPC-HC, MadVR and LAV codecs (all latest versions as at 2nd July 2018).

The picture reproduction I am getting from my new LG OLED 65C7T panel is truly magnificent, so I have no issues with the quality I am getting from this combination, but my issue is related to very occasional frame drops.

Whilst it is very mild, and seems to only occur every 10-15 minutes, sometimes longer, it is still irritating to the flow of the movie, and just wondering whether there is any insight as to why this is occurring.

My system configuration is brand new, I built this HTPC to replace my old one in order to watch 4K HDR content:

• Intel i7 8700 CPU (coffee lake) with Intel Graphics HD 630 built in
• Gigabyte Z370 motherboard complete with HDMI 2.0a
• LG OLED 65C7T (HDMI 2.0a)
• AVR is Yamaha RX-A3070 (HDMI 2.0a)

Software is a combination of MPC-HC, LAV Audio/Video/Splitter (latest version from KLite) and MadVR as the video renderer for HDR
I’m running Windows 10 Professional build 1803 with HDR/WCG settings on. I am also using hardware decoding using D3D11.
MPC-HC shows “Playing [H/W]” in the bottom left corner, so I’m certain decoding is on, and like I say, almost all the time the video reproduction is perfect.
Bitstream audio in this scenario is perfect – it plays Dolby Atmos/TrueHD, DTS-X or any other lower format perfectly.

MadVR statistics are attached playing an HDR 4K file. Some points of interest:
• Dropped frames mostly are when you start the file – after that it’s very occasional, but as I say, still noticeable when it happens – it is this that I wish to eliminate
• I’ve set my refresh rate to 23Hz to match 23.976 fps. If I don’t do this (i.e. if I set it to 50 Hz or similar), I get bitstream audio drop outs occasionally (another issue I can’t reconcile) – I don’t know why this is happening so therefore, matching the frame rate to refresh rate for this reason
• Matching refresh rate means I get basically zero frame repeats (see attached – 1 frame repeat every 5.7 hrs - if I keep it running long enough, it becomes days) yet even with these great stats, I get the frame drops as I mentioned
• Average rendering stats are basically never above 35ms – I understand that you want it to be less than 40ms – I can confirm this is always the case regardless of the file type – i.e. 4K, 1080p, etc.
• The queuing stats are almost always as they are as per the screenshot – I’m not altogether sure whether having a full queue or empty one is good, bad or indifferent.
• All my MadVR settings are basically as per “out of the box” except I’ve told it to pass HDR data to the TV – rest is basically as per standard installation

Ultimately what I’m trying to figure out is whether I need to calibrate my MadVR settings to avoid dropped frames given my configuration, or whether I simply need a better graphics capability such as a GeForce GTX 1050 or something. It seems to me that this might be overkill but I’d rather ask the brains trust before committing to additional hardware. Note, I’m just playing video files (MKV) – I’m not playing any games.

For what it’s worth, my GPU is never working above 70% in task manager and my CPU never gets above 5% - the PC seems to be hardly working, and the temperature of the CPU never goes above 45C.

I gratefully welcome any thoughts or suggested configurations for MadVR (or anything else!) to ensure perfect video/audio reproduction and minimal or zero frame drops.

Best wishes,
Mike

Asmodian
2nd July 2018, 06:52
One thing to check, try with average rendering stats at 30ms or below. With a reported frame repeat every >5hrs after running for a long time you should not see dropped frames unless for performance.

Another thing is try with smaller buffers, maybe 6 GPU buffers and only 3 frames presented in advance, or even 4 GPU buffers. Do you have debanding enabled? Any trade quality for performance options?

Also, don't attach images here, it is better to use a separate hosting site and link them. Attachments usually take a while to get approved.

Dorohedoro
4th July 2018, 18:00
mikeyjeff are you using reclock?

mikeyjeff
6th July 2018, 03:45
One thing to check, try with average rendering stats at 30ms or below. With a reported frame repeat every >5hrs after running for a long time you should not see dropped frames unless for performance.

Another thing is try with smaller buffers, maybe 6 GPU buffers and only 3 frames presented in advance, or even 4 GPU buffers. Do you have debanding enabled? Any trade quality for performance options?

Also, don't attach images here, it is better to use a separate hosting site and link them. Attachments usually take a while to get approved.

Thanks so much for your advice on this - I went away and implemented all those changes. I turned on all the performance options except the bottom two (which it says I shouldn't) I get about 15-20 minutes of perfectly uninterrupted 4K HDR video but then, alas, I get about 10-15 frames lost (they are always in one hit, rather than one frame here, then one frame there, lending support to your 'performance' scenario as the reason for dropping frames) - I wonder if that's because a buffer is flushed out or something similar, and it causes a small performance "blip". The rendering times are now consistently under 30ms - 21 to 22ms - certainly better than they were, yet this still happens.

I'll try again to embed some screenshots without attaching as per your advice - hopefully these links work. If not, the first image shows 41 dropped frames (this is purely the dropped frames as I open the file and go to full screen). The second image shows 57 - i.e. it has dropped 16 due to whatever is causing this.

https://drive.google.com/open?id=19J9_7Bywb6m_sP29tuM7_LsMxerS5AZG

https://drive.google.com/open?id=1kJwP3rq-yPdNS_Yv3jTOrIzcIZL6k1jv

This is my "Ctrl-J" during playback and you can see how the clock deviation gets better and better - from 1.48 hrs to 5.95 hours, but honestly I cannot figure out why it has to then drop frames.

I realise that I'm probably in the minority here in that I am using the Intel built in GPU, rather than a dedicated GPU but it is a brand new Coffee Lake i7 8700 with Intel graphics HD 630, and the system utilisation of the GPU never gets above 70% and the PC isn't doing anything else apart from running standard background processes. The CPU never gets above 5% utilisation as the GPU is obviously doing all the work using D3D11 hardware acceleration.

Again, if the consensus is that I need to get a GeForce GTX 1050i or something (with HDMI 2.0b) then I'll do it but I want to be absolutely sure it's not my configuration before I drop a few extra $ on a dedicated GPU.

Thanks a lot everyone, your assistance in this conundrum is much appreciated!

Best wishes
Mike.

mikeyjeff
6th July 2018, 03:48
mikeyjeff are you using reclock?

Hi @Dorohedoro - I'm not using reclock as I want to use bitstream audio to play Dolby Atmos, DTS-X etc. and have my Yamaha RX-A3070 do all the decoding. My understanding is that you cannot use reclock with bitstream audio.

Best wishes,
mike.

jmartinr
9th July 2018, 11:09
Do you have "don't rerender frames when fade in/out detected" in "trade quality for performance" unchecked? Try with it checked.

mikeyjeff
11th July 2018, 05:13
Do you have "don't rerender frames when fade in/out detected" in "trade quality for performance" unchecked? Try with it checked.

Hi @jmartinr - thanks for your feedback!
I have tried all those checkboxes in "trade quality for performance" - and switching them all to 'checked'. It drastically lowers my rendering times - from ~25ms to 10-12ms or thereabouts, however, unfortunately, I still get the scenario where after about 10-20 minutes of screentime, I get 10-15 dropped frames which is visibly noticeable when watching a movie. If it was only 1 or 2 frames every so often, it would be imperceptible but when you lose 10-15 frames it interrupts your viewing of the film.

I'm really at a loss on this one - I have directed away from the GPU acceleration back to the CPU via software decoding, and it improves my render times even more (I have an i7 8700 - brand new) but still, every 10-20 min or so, I lose 10-15 frames and it interrupts the movie flow. During those 10-20 minutes though, the playback is absolutely perfect.

I honestly can't figure this out guys. Would really love some insight!

Best wishes,
Mike.

Asmodian
11th July 2018, 06:04
It seems like something else must be running every 10-20 minutes. That is way too many frames for it to be the normal suspects.

Is anything using your hard drive? What if you keep a monitoring program open, like Task Manager, Resource Monitor, and/or hwinfo?

Edit:
Do you have f.lux (https://justgetflux.com/) or something that might be like it? Anything that changes the color of your display?