1
votes

I'm trying to preview video stream from 4K Camera (Brio) in my application. The application uses DirectShow to open camera and receive frames. Filter configuration is shown in image below.

enter image description here

The problem are high resolutions (ie. 4096x2160). With 4096x2160 resolution both GraphEdit and my application have delay when I preview video stream. I'm testing this on Windows 10. Note that Windows 10 preinstalled Camera application works perfect with this resolution. I've also tried the same with UWP sample using MediaCapture Api, but the problem is the same.

What am I missing?

1

1 Answers

1
votes

Windows 10 preinstalled Camera application does not use DirectShow, uses completely different code path based on Media Foundation API and is overall more efficient in JPEG decompression in particular. That is, you cannot compare directly your DirectShow based graph to what Windows Store Camera app is doing.

In your situation MJPEG Decompressor Filter is an outdated piece of software incompatible with this resolution and is a bottleneck. Also for live video DirectShow graph needs to have Smart Tee Filter.

Performance wise I would recommend to build media pipeline on Media Foundation, even though it is more difficult and comes with less documentation and samples.