Giter VIP home page Giter VIP logo

videorenderer's People

Contributors

adipose avatar aleksoid1978 avatar clsid2 avatar kg7x avatar v0lt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

videorenderer's Issues

multiple rendere per instance not possible

hi, i need multiple renderer per instance.
could you remove g_nInstance Check in CMpcVideoRenderer::CMpcVideoRenderer.
Simply remove g_nInstance++.
or could you make an option to disable that (maybe in registry).
regards, onur

MPC Video Renderer "ruins" HDR in 16.4.5

https://i.servimg.com/u/f61/20/37/12/61/mpc_vi10.jpg
https://i.servimg.com/u/f61/20/37/12/61/mpc_vi11.jpg

Please excuse my english, and noob skills explaing my issue, but here we go. :)

HDR doesn't work out of the box, with K-lite codec ver. 16.4.5 compared to 16.4.0, because of the new setting under HDR. See pics.
This because, with 16.4.5, it's not possible to save the settings in "Auto Display HDR On/Off".
It always reverts to "not used" the next time you open MPC HC.
So you need to change manually to "always used", everytime you play a mkv with HDR support for example.

I rolled back to 16.4.0 where it works flawlessly, with just the option "on/off". (not the three "not used" / "used for fullscreen" / "always used" options)

DX11 and put_Owner not working?

I'm not sure what the cause is, here, but I can confirm in D3D9, rendering to a window assigned with put_Owner() works. But upon switching to D3D11, it does not.

See thread here:

clsid2/mpc-hc#1614

Any chance this could be a bug in MPCVR?

Deinterlacing not working well on high frequency displays (144 Hz)

I am a user of MPC-HC and one gripe I have with the now default MPC Video Renderer is how unsmooth the deinterlacing is still looking. I "tested" this with a nvidia 1060 and 3060 mobile on a 144 Hz Screen (monitor and laptop). The result is always the same, with EVR(CP) it is much smoother. I wish we could get some progress with that.

The output seems to be a little green

After testing enough videos, I found the strange output of MPCVR.
The output shows a little green. And it is easy to be perceived if the the background of the picture is pure or light.
Compared with other video-renderers, I think it shows the incorrect output.
Another important problem is that, d3d11 seems to be more unstable (it creates many bandings)

be d9
be d11
madvr
mpv

Distorted video

When playing 10bit 4: 2: 0 movie with Use Direct3D11 checked, the color will be strange if Texture Format is other than 8bit integer

enabling d3d11 causes subtitle to disappear in potplayer

potplayer loses the ability to show information when pressing the tab button as well as subtitles no longer show when playing a video with subtitles but all the above problems occur only when d3d11 is enabled in mpc video renderer otherwise this renederer is amazing thanks also can you tell me which settings you use for the best quality image in mpc video renderer i would greatly appreciate that

Please add HDR support

i have a hdr screen,
Do you plan to add hdr support?
Just like the hdr metadata passthrough of madvr
i dont use madvr because high overhead.

A green line appears at the bottom when inputting with D3D11 Decoder

Occurs in combination with D3D11 Decoder and D3D11 Shader Video Processor

LAV Video Decoder Hardware Decoder to use None
a

LAV Video Decoder Hardware Decoder to use D3D11
b

MPC-BE 1.5.5.5148
MPCVideoRenderer v0.4.3.1215
LAVFilters-0.74.1-34
Radeon Pro Software Enterprise 20.Q1.1
Windows10 1909

Source
jellyfish-90-mbps-hd-hevc-10bit

DX11 dithering and mpc-be shaders

Hi, when I use dx11 and 10bit integer + dithering, post-resize pixel shader (sharpen complex 2) stops working. When I disable dithering, sharpen shader works again. This is working together in dx9 no problem, so I use dx9 for now. Is there perhaps some incompatibility between dithering and post-resize shaders in dx11? I need dithering to avoid banding when converting from 10bit internal to 8bit display.
Setup: mpc-be 1.5.6.6000, mpc VR 0.5.2.1607, win10 (1909), gpu RTX2080 (driver 456.71)

Rotation "bug"

In madVR, when changing rotation, it seems to redraw automatically. If MPCVR, it does not seem to. mpc-be code calls "MoveVideoWindow()" after for all renderers except madVR (states it is for EVRcp and Sync). In my testing, this was also required for MPCVR.

This is not a problem, but I wondered if it was intentional, or a "regression" compared to madVR.

Thanks!

Pre-size pixel shaders

mpc-hc supports pre and post-size shaders. madVR supports both, but mpc-vr only supports post resize shaders.

This leads to a result that in mpc-hc, mpc-vr only honors one kind of shader, which is confusing as both are possible to choose and add.

Is there any chance for support in the future?

Dithering from 10-bit to 8-bit is not working well.

Hi

I encoded the 8-bit video (from BD) to 10-bit x265 using the following command of ffmpeg.
ffmpeg -i input.m2ts -pix_fmt yuv420p10le -c:v libx265 out.mp4
When I play it with MPC-xx+MPC-VR, there is a slight but noticeable color problem. (A little strong green-color)
I've tried changing settings Texture format: and Use dithering but that doesn't fix the problem.
I don't have the GPU that have the hardware decoder for HEVC, so I use software decoding for playback.
The following is an example, but I have tried it with several Blu-rays I own, and they all gave the same result.

Original, 8-bit H.264

00000 m2ts_snapshot_10 23 845

10-bit HEVC, MPC-HC/MPC-BE with MPC-VR

MPC-VR

10-bit HEVC, MPC-BE with built-in EVR-CP

MPC-BE

10-bit HEVC, MPC-HC with built-in EVR-CP

MPC-HC

My system environment:
MPC Video Renderer 0.5.7.1811 (git-2021.12.21-f448e90) x64
MPC-BE 1.6.1.6845 x64
MPC-HC 1.9.19 x64
NVIDIA GeForce GTX 750 Ti with 472.12 driver
8-bit monitor (Dell AW3418DW)

UPDATE: I have tried 8-bit and 12-bit encoding, and both seem to play fine.

8-bit HEVC, MPC-HC/MPC-BE with MPC-VR

whitout any -pix_fmt option
test_8bit mp4_snapshot_02 10 408

12-bit HEVC, MPC-HC/MPC-BE with MPC-VR

with the -pix_fmt yuv420p12le option
test_12bit mp4_snapshot_02 10 227

Speeding up playback in a Virtual Machine

It would be nice if playback of videos using it when in a Windows 7 Virtual Machine ran by Windows Virtual Machine was sped up. I am able to use it by placing the WineD3D for Windows and Mesa3D dlls in the directory where mpc-be.exe is located.

Whiter than white (236-255) support.

I've tried to get whiter than white working to no avail. Is it possible with MPC Video Renderer?

Setting the GPU to output 16-235 or 0-255 both result in white not going past 235.

With MadVR it's possible to get whiter than white when MadVR is in 16-235 mode and GPU in 0-255, but MadVR has other issues with Windows 11. :)

Video blinks (black frames?) when not on top (with MPC Video Renderer)

This is not happening on every video.
It does not happen with EVR-CP.

This is my current setup:

MPC-HC (Nightly, 64-bit)

Build information:
Version: 1.9.6.28 (e518e401c)
Compiler: MSVC v19.26.28806
Build date: Jul 10 2020

LAV Filters:
LAV Splitter: 0.74.1.64
LAV Video: 0.74.1.64
LAV Audio: 0.74.1.64
FFmpeg compiler: MinGW-w64 GCC 9.3.0

Operating system:
Name: Windows NT 10.0 (build 20170)
Version: 10.0 (64-bit)

Hardware:
CPU: Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz
GPU: Intel(R) HD Graphics 620 (driver version: 27.20.100.8425)[/CODE]

Here's one file it happens with:

Format : Matroska
Format version : Version 4
File size : 1.91 GiB
Duration : 30 min 7 s
Overall bit rate mode : Variable
Overall bit rate : 9 054 kb/s
Encoded date : UTC 2020-07-20 04:01:56
Writing application : mkvmerge v48.0.0 ('Fortress Around Your Heart') 64-bit
Writing library : libebml v1.4.0 + libmatroska v1.6.0

Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : Main@L4
Format settings : CABAC / 4 Ref Frames
Format settings, CABAC : Yes
Format settings, Reference : 4 frames
Codec ID : V_MPEG4/ISO/AVC
Duration : 30 min 7 s
Bit rate mode : Variable
Bit rate : 8 668 kb/s
Maximum bit rate : 12.4 Mb/s
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 29.970 (30000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.139
Stream size : 1.82 GiB (96%)
Language : English
Default : Yes
Forced : No

Audio
ID : 2
Format : AC-3
Format/Info : Audio Coding 3
Commercial name : Dolby Digital
Codec ID : A_AC3
Duration : 30 min 7 s
Bit rate mode : Constant
Bit rate : 384 kb/s
Channel(s) : 2 channels
Channel layout : L R
Sampling rate : 48.0 kHz
Frame rate : 31.250 FPS (1536 SPF)
Compression mode : Lossy
Stream size : 82.8 MiB (4%)
Language : English
Service kind : Complete Main
Default : Yes
Forced : No

Text
ID : 3
Format : UTF-8
Codec ID : S_TEXT/UTF8
Codec ID/Info : UTF-8 Plain Text
Duration : 29 min 47 s
Bit rate : 129 b/s
Count of elements : 1150
Stream size : 28.2 KiB (0%)
Title : English (SDH)
Language : English
Default : No
Forced : No

Windows 7 support

Does it work under Windows 7? If not, then adding support for it would be nice.

AMD FSR

Can you add support for AMD FSR upscaling?

Fallback scaling method for when shaders are not working

I was investigating a crash when running on Windows 11 inside a virtual machine.

This fixes that crash:

@@ -1987,6 +1987,11 @@ void CDX9VideoProcessor::UpdatePostScaleTexures()
		numPostScaleShaders++;
	}
	HRESULT hr = m_TexsPostScale.CheckCreate(m_pD3DDevEx, m_InternalTexFmt, m_windowRect.Width(), m_windowRect.Height(), numPostScaleShaders);
+	if (FAILED(hr)) {
+		m_bFinalPass = false;
+		m_bUseDither = false;
+		DLog(L"CDX9VideoProcessor::UpdatePostScaleTexures(): m_TexsPostScale.CheckCreate() failed with error {}", HR2Str(hr));
+	}
	//UpdateStatsPostProc();
}

But another problem was that video was rendered black (with working subs/osd). Due to pointer to surface being NULL.

I added some extra logging and checks, and managed to get the video working with these changes. But since the chroma handling is skipped, it is rendered in greyscale.
Would it be possible to implement a proper fallback method for scaling without shaders? Similar to EVR-CP.

--- a/Source/DX9VideoProcessor.cpp
+++ b/Source/DX9VideoProcessor.cpp
@@ -2126,6 +2126,10 @@ HRESULT CDX9VideoProcessor::ConvertColorPass(IDirect3DSurface9* pRenderTarget)
 	hr = m_pD3DDevEx->SetRenderState(D3DRS_COLORWRITEENABLE, D3DCOLORWRITEENABLE_ALPHA | D3DCOLORWRITEENABLE_BLUE | D3DCOLORWRITEENABLE_GREEN | D3DCOLORWRITEENABLE_RED);
 
 	hr = m_pD3DDevEx->SetTexture(0, m_TexSrcVideo.pTexture);
+	if (FAILED(hr)) {
+		return hr;
+	}
+
 	DWORD FVF = D3DFVF_TEX1;
 	hr = m_pD3DDevEx->SetSamplerState(0, D3DSAMP_MAGFILTER, D3DTEXF_POINT);
 	hr = m_pD3DDevEx->SetSamplerState(0, D3DSAMP_MINFILTER, D3DTEXF_POINT);
@@ -2214,8 +2218,10 @@ HRESULT CDX9VideoProcessor::ResizeShaderPass(IDirect3DTexture9* pTexture, IDirec
 			// use only float textures here
 			hr = m_TexResize.Create(m_pD3DDevEx, D3DFMT_A16B16G16R16F,texWidth, texHeight, D3DUSAGE_RENDERTARGET);
 			if (FAILED(hr)) {
-				DLog(L"CDX9VideoProcessor::ProcessTex() : m_TexResize.Create() failed with error {}", HR2Str(hr));
-				return TextureCopyRect(pTexture, srcRect, dstRect, D3DTEXF_LINEAR, m_iRotation, m_bFlip);
+				DLog(L"CDX9VideoProcessor::ResizeShaderPass : m_TexResize.Create() failed with error {}", HR2Str(hr));
+				hr = TextureCopyRect(pTexture, srcRect, dstRect, D3DTEXF_LINEAR, m_iRotation, m_bFlip);
+				DLogIf(FAILED(hr), L"CDX9VideoProcessor::ResizeShaderPass : TextureCopyRect() failed with error {}", HR2Str(hr));
+				return hr;
 			}
 		}
 
@@ -2331,12 +2337,13 @@ HRESULT CDX9VideoProcessor::Process(IDirect3DSurface9* pRenderTarget, const CRec
 		pInputTexture = m_TexConvertOutput.pTexture;
 		rSrc = rect;
 	}
-	else if (m_PSConvColorData.bEnable) {
+	else if (m_PSConvColorData.bEnable && 0) { // FIXME: this solves black screen, but plays video in greyscale
 		ConvertColorPass(m_TexConvertOutput.pSurface);
 		pInputTexture = m_TexConvertOutput.pTexture;
 		rSrc.SetRect(0, 0, m_TexConvertOutput.Width, m_TexConvertOutput.Height);
 	}
-	else {
+
+	if (!pInputTexture) {
 		pInputTexture = m_TexSrcVideo.pTexture;
 	}
 
@@ -2444,11 +2451,11 @@ HRESULT CDX9VideoProcessor::TextureCopyRect(
 	IDirect3DTexture9* pTexture, const CRect& srcRect, const CRect& dstRect,
 	D3DTEXTUREFILTERTYPE filter, const int iRotation, const bool bFlip)
 {
-	HRESULT hr;
+	HRESULT hr = E_FAIL;
 
 	D3DSURFACE_DESC desc;
-	if (!pTexture || FAILED(pTexture->GetLevelDesc(0, &desc))) {
-		return E_FAIL;
+	if (!pTexture || FAILED(hr = pTexture->GetLevelDesc(0, &desc))) {
+		return hr;
 	}
 
 	const float dx = 1.0f / desc.Width;

OSD Support

Is there any support within MPCVR for OSD? Will there be?

Thanks, if not feel free to close the issue!

MPC-HC support

Is it possible to get support for MPC-HC added to it (since MPC-BE hasn't been developed in a while)?

Dropping frames when using DmitriRender

Когда я воспроизвожу вашу работу с MPC-HC и заполнителем кадров DmitriRender, у меня возникают проблемы с периодическим падением кадров, но она воспроизводится стабильно с рендером MADVR, в чем причина этого?

SetAlphaBitmap - opaque

SetAlphaBitmap is not working as expected.
for example, with full transparent Bitmap (ARGB 0,0,0,0), resulting image is opaque black.

change of following code would fix it: (also original comment is wrong "// ... inverse alpha channel for dst")

Function AlphaBlt in DX9VideoProcessor.cpp
hr = pD3DDev->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_SRCALPHA); // ... inverse alpha channel for dst
should be: pD3DDev->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA);

and in Function, CDX11VideoProcessor::AlphaBlt(...
we should do:
m_pDeviceContext->OMSetBlendState(m_pAlphaBlendStateInv, nullptr, D3D11_DEFAULT_SAMPLE_MASK);

regards, onur

Occasional freeze when skipping forward repeatedly

Using MPC-HC 1.9.0 with MPC Renderer (both 64 bit, on Windows 7 SP1, 64 bit), the player sometimes freezes when I repeatedly skip forward to scan a video optically.

If I press the "Right" cursor key about each half second to jump forward, over and over, after about 20 skips the player freezes so that not even clicking the "Close application" button ❌ twice forces the AppCrash dialog to appear, I really have to kill the process in a task manager.

There is no freeze with e.g. madVR, a VMR9 or EVR variant.

[Bug] Green screen at right side of video

MPC VR can not play one of my videos properly when D3D11 is checked in renderer settings. Which is enabled by default in the latest version you know.
When I unchecked D3D11 in renderer settings then the problem is gone.

Why is it happening? This needs to be fixed or D3D11 should be disabled by default as before it was.

[Using win 10, MPC HC x64 latest. Don't know the problem is there in MPC BE or not? I use MPC HC only]

Screenshot (238)
Screenshot (239)

GetCurrentImage returns image in SAR

In contrast to madvr, GetCurrentImage returns image in SAR. As a result code in GetDIB() of mpc-be and mpc-hc returns an image in the wrong aspect ratio.

This is not "wrong" or "right," I suppose. But since mpcvr seems to emulate madvr api somewhat, result is ~identical code with different results.

returns image in SAR:

STDMETHODIMP CMPCVRAllocatorPresenter::GetDIB(BYTE* lpDib, DWORD* size)
{
    HRESULT hr = E_NOTIMPL;
    if (CComQIPtr<IBasicVideo> pBV = m_pMPCVR) {
        hr = pBV->GetCurrentImage((long*)size, (long*)lpDib);
    }
    return hr;
}

returns image in DAR

STDMETHODIMP CmadVRAllocatorPresenter::GetDIB(BYTE* lpDib, DWORD* size)
{
    HRESULT hr = E_NOTIMPL;
    if (CComQIPtr<IBasicVideo> pBV = m_pMVR) {
        hr = pBV->GetCurrentImage((long*)size, (long*)lpDib);
    }
    return hr;
}

DVD playback

I get copyprotect fail error.

I think using CMacrovisionKicker code like the other renderers do should help solve it.

Unhandled exception occurred at atiumd6a.dll on AMD 5800U

If I play HDR video on monitor support HDR, the MPCVR on potplayer will turn on the HDColor on Win10, then crash with this:

---------------------------
Alert
---------------------------
Unhandled exception occurred[0xC0000005@0x0000000073754CE9] at atiumd6a.dll

Additional exception information has been stored locally

and this application will be terminated.

My CPU+GPU is AMD R7 5800U.

I've tried MPC-BE and almost the same thing happen. MPC-BE crashed and I found Error Reporting in Event shows:

故障存储段 1849426165357592173,类型 4
事件名称: APPCRASH
响应: 不可用
Cab ID: 0

问题签名:
P1: mpc-be64.exe
P2: 1.6.1.6845
P3: 61f63818
P4: atiumd6a.dll
P5: 30.0.14023.7007
P6: 61f0b056
P7: c0000005
P8: 0000000000214ce9
P9: 
P10: 

Stutter before starting playing?

Between opening video and before playing, there's a stutter like one second long. In this period the display stops updating (and also the pointer), which is a bit annoying.

It seems somehow related to the Intel + Nvidia GPU setting on laptop, because when I run MPC-BE with VR on dedicated GPU, the stutter is gone. Also, the stutter doesn't happen with MPC-BE & inbuilt EVR renderer.

It should not a problem of specific system, as I had exactly the same problem on my previous laptop. However I couldn't find any solutions and discussions on Internet :(

My MPC-BE version is 1.6.0.6767, and I tested with both VR 0.5.6.1807 and 0.5.7.1812.

HDR videos freezes

0.5.7.1811
HDR videos with VP9 codec does not play using MPC-BE 1.6.1.6784
0.5.6.1807 works

No subtitles

Playing video has no subtitles
Only work with default video renderer

Video Rotation

When rotating video in windowed mode the window size is not changing. In full screen mode it is working well. Using latest stable MPCVR.

This is how it works now:
Screenshot (293)

This is how it should:
Screenshot (294)

Well this particular video does not need rotation, I used it just to show you.

Unable to install

Hello,I am unable to install the video renderer,I keep getting the following error whenever I try to run the batch file in administrator mode
"'regsvr32.exe' is not recognized as an internal or external command,
operable program or batch file.

Installation failed.

You need to right click "Install_MPCVR_64.cmd" and choose "run as admin"."
And I am using windows 7 ultimate x64.Could someone please help me out?

When using d3d11, subs cannot be rendered

If selecting the option "use direct3d 11", subs cannot be rendered by the mpc-be's internal sub-renderer. I have to use the xysubfilter instead to show the subtitle in that case.

ps.
MPC-BE.1.5.7.6180.x64
MPCVideoRenderer_git_0.5.3.1689_x64

Compatibility issues with vega8 in the 5800h

Recently, I bought a new Lenovo laptop(R7 5800H+RTX 3050). When I use the MPC Video Renderer with MPC-BE or MPC-HC on the vega8 integrated graphics, it has some compatibility issues.
When I use the old driver(27.20.14032.9002) downloaded from Lenovo's official website, the video will overexposure, and the aliasing is very clear in anime.
When I use the latest Adrenalin Edition driver downloaded from AMD's official website, the overexposure is disappear, but the color of video is reddish.
When I force the MPC-HC or MPC-BE running on the RTX 3050, everything is correct.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.