带延迟的4K MJPEG摄像机视频预览(在Windows 10上) [英] 4K MJPEG Camera Video Preview with delay (on Windows 10)

查看:100
本文介绍了带延迟的4K MJPEG摄像机视频预览(在Windows 10上)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在应用程序中预览来自4K摄像机(Brio)的视频流.该应用程序使用DirectShow打开相机并接收帧.过滤器配置如下图所示.

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.

问题出在高分辨率(即4096x2160)上.分辨率为4096x2160时,当我预览视频流时,GraphEdit和我的应用程序都会有延迟.我正在Windows 10上对此进行测试.请注意,Windows 10预装的Camera应用程序可以在此分辨率下完美运行.我也使用MediaCapture Api对UWP示例进行了尝试,但是问题是相同的.

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.

我想念什么?

推荐答案

Windows 10预装的Camera应用程序不使用DirectShow,而是使用基于Media Foundation API的完全不同的代码路径,并且在JPEG解压缩方面特别有效.也就是说,您不能直接将基于DirectShow的图形与Windows Store Camera应用程序正在执行的操作进行比较.

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.

根据您的情况 MJPEG解压缩器过滤器是与此分辨率不兼容的过时软件,并且是瓶颈.同样,对于实时视频,DirectShow图也需要具有 Smart Tee Filter.

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.

从性能角度考虑,我建议在Media Foundation上建立媒体管道,尽管这比较困难并且文档和样本较少.

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.

这篇关于带延迟的4K MJPEG摄像机视频预览(在Windows 10上)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆