DirectShow 그래프를 초기화 할 때 비디오 압축 코덱 (MediaSubType)을 지정해야합니다. 기본 압축을 사용하여 웹 카메라에서 비디오를 캡처하려고 할 때도 동일한 문제가 발생했습니다 (제 경우에는 YUY2 임).
예 :
/// <summary>
/// Configures the DirectShow graph to play the selected video capture
/// device with the selected parameters
/// </summary>
private void SetupGraph()
{
...
if (UseYuv && !EnableSampleGrabbing)
{
/* Configure the video output pin with our parameters and if it fails
* then just use the default media subtype*/
if (!SetVideoCaptureParameters(graphBuilder, m_captureDevice, MediaSubType.YUY2))
SetVideoCaptureParameters(graphBuilder, m_captureDevice, Guid.Empty);
}
else
/* Configure the video output pin with our parameters */
SetVideoCaptureParameters(graphBuilder, m_captureDevice, MediaSubType.MJPG); // Change default compression to MJPG.
...
}
WPFMediaKit.DirectShow.MediaPlayers.VideoCapturePlayer 예에서 찾을 수있다.
EVR (Enhanced Video Renderer)은 VMR-9 (Video Mixing Renderer 9)보다 우수한 성능과 훨씬 우수한 화질을 제공합니다. 이러한 링크 [1] (http://directshownet.sourceforge.net/about. html) 및 [2] (http://www.codeproject.com/Articles/419286/EVR-Presenter-in-pure-Csharp-with-Direct3D-Video-R) – Steven
EVR은 VMR-9보다 우수하지만 당신이 가진 문제는 다른 것, CPU 나 데이터 밴드 위디를 초과했을 때 발생할 수 있습니다. –
일부 D3DRenderer 최적화가 포함 된 최신 [WPF-Media] (https://github.com/Sascha-L/WPF-MediaKit) 키트 소스를 사용해보십시오. – xmedeko