Alternatives to DirectShow for video capture on Windows [closed]

亡梦爱人 提交于 2019-12-05 15:14:51

Quite all capture boards come with their own timers.

You may try to query you source filter for IReferenceClock and use its own timer that is usually more accurate than a PC's one.

If you use ISampleGrabber then the callback function is called microseconds from the moment Receive is called on the Sample Grabber's input pin, they're just few lines away in the source code.

It seems that your frame source timing is inaccurate (not the timing set in IMediaSample, but actial timing the frames are delivered in).

What is the source filter that produces the frames?

The DirectShow API is very good, I've never found better on the windows platform. DirectShow has been superseded by Media Foundation, which is Vista (and later) operating systems only.

We'll have to wait for XP to die before people will start mass development using Media Foundation...

May I ask why you're seeking an alternative to DirectShow - it's a very well supported API - well documented on MSDN and there's a very active and friendly forum on MSDN for DirectShow Development.

The problem might just be the method you are using for timing. Are you using the high performance timer API?

VideoLan may be an option for you.

LeadTools and VisioForge SDKs are just wrappers for DirectShow + some custom filters from them! There is no real alternativ to DirectShow for capturing on a Windows PC. Maybe on Win8 with MediaFoundation? Some Hardware Vendors have there own capture programms, but most of them just use DirectShow.

I think your problem is not DirectShow. How long is your callback working? Because if your doing some analysis on the image, then you need to do this fast. Not the time in your callback is importent, but the presentation time in the mediasample you get! This should be +33ms from the previews sample.

FFmpeg can receive directshow input and manipulate it, and it's free. AviSynth maybe too...

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!