madVR black bar cropping for ultrawide not working the way I want it to

Odellus

[H]ard|Gawd
Joined
Dec 25, 2010
Messages
1,814
Hi, I'm using madVR with MPC-BE x64 (both their newest versions) and trying to get it set up to remove top and bottom black bars without losing image content on my 21:9 ultrawide AW3423DW.

With these settings I'm getting this. If I try to use the "if there are big black bars:" option, it crops the image based on the black bars on the sides, which means if I set it to "zoom the bars away completely", it has the same effect as setting video frame to "touch window from outside", i.e. it fills the canvas up horizontally with no regard for loss of content vertically; useless.
I can tweak this setting to get rid of the top and bottom black bars with a slight loss of image content for this particular show, but this isn't a good solution as I will have to change this setting manually based on the aspect ratio of whatever I'm watching.
For example, here's what The Book of Boba Fett looks like with the aforementioned "ideal" setting for The Witcher. No good.

Is there a way to get madVR/MPC-BE to automatically do what I want or is this just the kind of thing you have to deal with with an ultrawide?
 
If the encode kept the bars, naughty encoder, then your most reliable method is manually.
 
Last edited:
Can you take a screenshot of the stats output (Ctrl+J)? madvR's cropping doesn't work if you're using D3D11 hardware decoding.
 
Can you take a screenshot of the stats output (Ctrl+J)? madvR's cropping doesn't work if you're using D3D11 hardware decoding.
1647316739672.png
 
Assuming you're using LAV video decoder, change the Hardware Decoder setting to DXVA2 (copy-back, don't think it works with native):

lav settings.png

Close and reopen the file (to rebuild the filter graph) and cropping should work. You should now see a line just above the "scale" line (if present) detailing the cropping being applied.

Fun fact, if you create a file/folder named "ShowRenderSteps" in the same location as madVR.ax, you'll see much more detailed rendering steps with the OSD on, such as cropping, HDR tonemapping, scaling, etc., and how long each step takes.
 
Last edited:
I use Zoom player so I can just use the + key to zoom in incrementally till it fills the screen.
It really annoys me when they encode 21:9 content in a boxed 16:9.
 
I use Zoom player so I can just use the + key to zoom in incrementally till it fills the screen.
It really annoys me when they encode 21:9 content in a boxed 16:9.
MPC-HC and its forks have the feature as well (Num 1/9 by default), but cropping at the renderer level prevents needing to do that with each file and appropriately shifts subtitles as well.

Plus, without cropping, content that has changing aspect ratios (Interstellar comes to mind) throws a wrench in the idea of manually zooming. madVR's cropping automatically and properly takes care of content switching aspect ratios, allowing the player to "touch [the] window from inside", or whatever you have set.
 
Last edited:
MPC-HC and its forks have the feature as well (Num 1/9 by default), but cropping at the renderer level prevents needing to do that with each file and appropriately shifts subtitles as well.

Plus, without cropping, content that has changing aspect ratios (Interstellar comes to mind) throws a wrench in the idea of manually zooming. madVR's cropping automatically and properly takes care of content switching aspect ratios, allowing the player to "touch [the] window from inside", or whatever you have set.
I just glanced at Interstellar and I just zoomed it in and left it and it's fine.
If you use MadVR does that mean the Imax shots will have black borders on the left and right or does it zoom it in so no black borders anywhere? If it removes all the black borders on the Imax shots, then that is the same as just zooming in.
 
If it removes all the black borders on the Imax shots, then that is the same as just zooming in.
There are no black borders on the IMAX shots. The content of the video (16:9) matches the size of the container (16:9).

I don't have a 21:9 display but with cropping enabled, simulating it by resizing my player causes IMAX shots to have no black bars on the top/bottom and the non-IMAX shots, which are coincidentally 2.33:1 (21:9), to fill the entire screen - no black borders anywhere. No video content is lost.

Compare this to manually zooming in where IMAX shots would have the top/bottom cut off. If that's what you're doing then you're castrating the video by removing content.
 
Assuming you're using LAV video decoder, change the Hardware Decoder setting to DXVA2 (copy-back, don't think it works with native):

View attachment 453843

Close and reopen the file (to rebuild the filter graph) and cropping should work. You should now see a line just above the "scale" line (if present) detailing the cropping being applied.

Fun fact, if you create a file/folder named "ShowRenderSteps" in the same location as madVR.ax, you'll see much more detailed rendering steps with the OSD on, such as cropping, HDR tonemapping, scaling, etc., and how long each step takes.
I wasn't, I tried to set it up but forgot how. Tried using DXVA2 with the built-in MPC decoder and that didn't work, but NVDEC actually fixes it. Not your solution but you got me looking at/testing the right stuff so thank you. Is there anything wrong with NVDEC?
 
Tried using DXVA2 with the built-in MPC decoder and that didn't work, but NVDEC actually fixes it. Not your solution but you got me looking at/testing the right stuff so thank you. Is there anything wrong with NVDEC?
Can't say for certain as I haven't seen that option. At least as far as I know, MPC-HC (and maybe MPC-BE?) has come bundled with LAV Filters for many years now, so I honestly would have expected you to see that what I saw, albeit perhaps in a different place. Since I'm curious, can you share a screenshot of what you changed?

Edit: Just checked myself and it looks like MPC-BE isn't bundled with LAV Filters. For MPC-BE, it's recommended to use D3D11cb (cb being copy-back) as it gives better performance and has better decoding support. Glad it's working though!
 
Last edited:
I have exactly the same issue playing some videos and also see it in some games when video is playing as part of the game.
Because of this I figure its down to the parameters of the video and the monitors resolution being read incorrectly by the video player, or the native res is incorrectly reported by the monitor.

ie
My monitor supports 5120x1440 and 3840x1080 ultrawide resolutions.
Some video playback sees the default res as 3840x1080 and downscales the video for that lower res, making it appear a lot smaller when using native 5120x1440 res.
The size difference looks to be correct for this assumption.

Using MPC HC or MPC BE. for normal video playback I can press the 9 key on my keypad to size it up to the screens height, it doesnt look resized either, it looks like it is playing at that resolution as native.
But during games this isnt possible because the video player used doesnt support this feature.
 
Last edited:
There are no black borders on the IMAX shots. The content of the video (16:9) matches the size of the container (16:9).

I don't have a 21:9 display but with cropping enabled, simulating it by resizing my player causes IMAX shots to have no black bars on the top/bottom and the non-IMAX shots, which are coincidentally 2.33:1 (21:9), to fill the entire screen - no black borders anywhere. No video content is lost.

Compare this to manually zooming in where IMAX shots would have the top/bottom cut off. If that's what you're doing then you're castrating the video by removing content.
Well, Imax is 16:9 so if you have a 16:9 screen and you see no black bars at all during the non-Imax scenes, then you are cropping off the sides of the 2.35:1 scenes which is most of the movie..
And the OP is using a 21:9 screen.
 
Well, Imax is 16:9 so if you have a 16:9 screen and you see no black bars at all during the non-Imax scenes, then you are cropping off the sides of the 2.35:1 scenes which is most of the movie..
And the OP is using a 21:9 screen.
I think there's some misunderstanding of how madVR's black bar detection feature works. It dynamically removes black bars from the video stream by cropping them on frame-by-frame basis. With the feature enabled, videos that contain black bars will have the black bars removed. It doesn't remove whatever empty space ("black bars") remains after scaling the video to fit your display.
 
I think there's some misunderstanding of how madVR's black bar detection feature works. It dynamically removes black bars from the video stream by cropping them on frame-by-frame basis. With the feature enabled, videos that contain black bars will have the black bars removed. It doesn't remove whatever empty space ("black bars") remains after scaling the video to fit your display.
Oh, so it's not scaling the video up and removing the black bars from the display?
 
Oh, so it's not scaling the video up and removing the black bars from the display?
That's up to the video player and how you have it configured. If you use MPC-HC's equivalent of "touch window from inside", the player will scale the video up/down but only after madVR's cropping has already been applied, ensuring that no actual video content (post-black bar detection) is lost.

Examples:
Note that the video contrast has been increased so that you can see the black bars that are part of the video stream itself.

No black bar detection:
no cropping - anamorphic.png no cropping - full.png

Black bar detection:
cropping - anamorphic.png cropping - full.png

No video content is lost. You get the best of both worlds no matter the video AR or display AR.
 
That's up to the video player and how you have it configured. If you use MPC-HC's equivalent of "touch window from inside", the player will scale the video up/down but only after madVR's cropping has already been applied, ensuring that no actual video content (post-black bar detection) is lost.

Examples:
Note that the video contrast has been increased so that you can see the black bars that are part of the video stream itself.

No black bar detection:
View attachment 453999 View attachment 454000

Black bar detection:
View attachment 454001 View attachment 454002

No video content is lost. You get the best of both worlds no matter the video AR or display AR.
Ok, I understand now.
 
In the context of MPC, I find manual zoom (while preserving aspect ratio) is the easiest way to solve OP's problem. Tap Num+9 a few times and Num+5 to reset it if tapped too many times.

Works for 99% of the material I watch. Never had a problem with soft sub positioning either. Then again, that may depend on your filter chain.

Didn't realize Interstellar had mixed AR.
 
In the context of MPC, I find manual zoom (while preserving aspect ratio) is the easiest way to solve OP's problem. Tap Num+9 a few times and Num+5 to reset it if tapped too many times.

Works for 99% of the material I watch. Never had a problem with soft sub positioning either. Then again, that may depend on your filter chain.

Didn't realize Interstellar had mixed AR.
I didn't realize it either since it starts in 2.35:1 in a 16:9 container so I just zoomed it to fill my screen from the get go and watched it like that.
 
That's up to the video player and how you have it configured. If you use MPC-HC's equivalent of "touch window from inside", the player will scale the video up/down but only after madVR's cropping has already been applied, ensuring that no actual video content (post-black bar detection) is lost.

Examples:
Note that the video contrast has been increased so that you can see the black bars that are part of the video stream itself.

No black bar detection:
View attachment 453999 View attachment 454000

Black bar detection:
View attachment 454001 View attachment 454002

No video content is lost. You get the best of both worlds no matter the video AR or display AR.

what settings did you use for this? no matter what settings I use it will either crop the 16:9 content to 21:9 or ignore the black bars in the 21:9 content
 
Back
Top