DirectShow or Windows Media Foundation?

3,928 views
Skip to first unread message

Jason von Nieda

unread,
Feb 9, 2017, 10:38:18 AM2/9/17
to ope...@googlegroups.com
Hi all,

As I start to research the process of adding native Windows camera capture to OpenPnP I've noticed that a lot of sources recommend using Windows Media Foundation over DirectShow. It seems DirectShow is old and trustworthy, but very hard to use, and WMF is newer, easier to use but maybe not as well supported.

So, if you have direct experience with these, I'm looking for some advice. If you were developing a new application today that needed to do camera capture, which one of these would you use for Windows and why?

A few notes:
* Need to support Windows 7 and above. Not XP.
* No need to mention OpenCV, videoInput, WebcamCapture, ESCAPI, etc.  I'm familiar with most of the common capture libraries. I'm looking for lower level advice than that.

Thanks,
Jason

Lisandro B

unread,
Feb 9, 2017, 11:11:38 AM2/9/17
to OpenPnP
The existing DirectShow technology is intended to be replaced by Media Foundation step-by-step,
 starting
with a few features. For some time there will be a
co
-existence of Media Foundation and DirectShow

Sorry if this is not a direct answer but maybe the "planned retirement" can help you decide

Jason von Nieda

unread,
Feb 9, 2017, 11:14:03 AM2/9/17
to OpenPnP
Hi Lisandro,

That is my impression as well, but then I found this answer: http://stackoverflow.com/questions/4407446/directshow-vs-media-foundation-for-video-capture

And it seems to indicate that while this may be Microsoft's intention, actual developers may have a different opinion :)

Jason


--
You received this message because you are subscribed to the Google Groups "OpenPnP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openpnp+u...@googlegroups.com.
To post to this group, send email to ope...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/3359f4da-50b2-4351-b3b7-042dcb3108f2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Lisandro B

unread,
Feb 9, 2017, 11:26:32 AM2/9/17
to OpenPnP
I have read that myself, but look  "asked 6 years ago"

Also, as you said "WMF is newer, easier"

If this is less work for you, than no need to look further :D

If I understand this correctly, you main reason for this change is to get better enumeration, and this seems easy in MF. So what else do you think can be problematic?

Jason von Nieda

unread,
Feb 9, 2017, 11:31:56 AM2/9/17
to OpenPnP
Ah, good point about the 6 years ago!

I don't know what else can be problematic. That's why I am asking :) I don't have any experience with DS or WMF, so I am trying to find out from people who do have experience whether there are any pitfalls from using one over the other. For instance, maybe WMF doesn't support many cameras or something like that. I just don't know :)

Jason


--
You received this message because you are subscribed to the Google Groups "OpenPnP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openpnp+u...@googlegroups.com.
To post to this group, send email to ope...@googlegroups.com.

Cri S

unread,
Feb 9, 2017, 11:46:55 AM2/9/17
to OpenPnP
Test out both with third part applications ON you principal camera that you advise to buy.
Win10 with forced annyversaty update. You must be sure that the camera dont crashes after some time ON that driver after the updates, ON all mode, especially those requiring Kompression.

Cri S

unread,
Feb 9, 2017, 11:50:00 AM2/9/17
to OpenPnP
I itself have some applications were actually the only workaround is to run a vm with win7 inside win10.

Jason von Nieda

unread,
Feb 9, 2017, 12:19:06 PM2/9/17
to OpenPnP
I've heard several people refer to this Windows 10 update problem. I found some information on it and articles seem to claim it can be fixed with a registry modification to disable the frame server. For instance: http://www.windowscentral.com/how-fix-webcam-freezing-issue-windows-10-anniversary-update

Have you tried this? And had problems?

For what it's worth, I am running Windows 10 1747, which is after the Anniversary Update of 1607 and my cameras all seem to work fine.

Jason


On Thu, Feb 9, 2017 at 10:50 AM Cri S <phon...@gmail.com> wrote:
I itself have some applications were actually the only workaround is to run a vm with win7 inside win10.

--
You received this message because you are subscribed to the Google Groups "OpenPnP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openpnp+u...@googlegroups.com.
To post to this group, send email to ope...@googlegroups.com.

Lisandro B

unread,
Feb 9, 2017, 12:40:05 PM2/9/17
to OpenPnP
"You must be sure that the camera dont crashes after some time ON that driver after the updates"

But this is a driver issue inst it? I allways check problematic cameras with the included "camera" program in win10

Dont have any ELP but ordered three units yesterday


Jason von Nieda

unread,
Feb 9, 2017, 12:49:28 PM2/9/17
to OpenPnP
That's just what I did. I pulled my ELP cameras up in the Camera program in Win 10. Seemed okay. I haven't done any kind of stress test though. I'll try that when I go to bed tonight and let it run all night.

Jason


--
You received this message because you are subscribed to the Google Groups "OpenPnP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openpnp+u...@googlegroups.com.
To post to this group, send email to ope...@googlegroups.com.

Mark Harris

unread,
Feb 9, 2017, 1:13:29 PM2/9/17
to ope...@googlegroups.com
Direct[Thing] has always been very very versatile, but a huge pain in the ass. Windows [Thing] [Framework|Foundation] has been much easier to use, if less flexible, but covers 95% of use cases very easily.

On 9 February 2017 at 10:49, Jason von Nieda <ja...@vonnieda.org> wrote:
That's just what I did. I pulled my ELP cameras up in the Camera program in Win 10. Seemed okay. I haven't done any kind of stress test though. I'll try that when I go to bed tonight and let it run all night.

Jason

On Thu, Feb 9, 2017 at 11:40 AM 'Lisandro B' via OpenPnP <ope...@googlegroups.com> wrote:
"You must be sure that the camera dont crashes after some time ON that driver after the updates"

But this is a driver issue inst it? I allways check problematic cameras with the included "camera" program in win10

Dont have any ELP but ordered three units yesterday


--
You received this message because you are subscribed to the Google Groups "OpenPnP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openpnp+unsubscribe@googlegroups.com.

To post to this group, send email to ope...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/febfdde5-899a-4f62-bc50-c422ca281528%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "OpenPnP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openpnp+unsubscribe@googlegroups.com.

To post to this group, send email to ope...@googlegroups.com.

Cri S

unread,
Feb 9, 2017, 4:09:59 PM2/9/17
to OpenPnP
No, it dont have resolved, several problems was introduced, the Problem i have is that after 2-3 hour it crashes with memory fault.

Jason von Nieda

unread,
Feb 9, 2017, 4:14:53 PM2/9/17
to OpenPnP
What crashes? OpenPnP? The Camera program?

Jason


On Thu, Feb 9, 2017 at 3:10 PM Cri S <phon...@gmail.com> wrote:
No, it dont have resolved, several problems was introduced, the Problem i have is that after 2-3 hour it crashes with memory fault.

--
You received this message because you are subscribed to the Google Groups "OpenPnP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openpnp+u...@googlegroups.com.

To post to this group, send email to ope...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages