Multiplatform API For Webcams

Started by
2 comments, last by Vincent_M 9 years, 3 months ago

Does such an API exist in C or C++? I'm looking for something that works on Windows, Linux and Mac. From my own research, it seems like Video4Linux2 is the closest thing to a de-facto standard for Linux webcams. I'm not too sure how supported V4L is though. OS X provides AVFoundation/QTKit (QuickTime) which are nice, but they're not portable and are written in Objective-C making OS X-only wrappers a pain... I know Windows has their own solution that most-likely used to belong to DirectX once upon a time, but I haven't checked them out yet.

Advertisement
Flash has access with no platform specialization, assuming user consent.

Java and Python also have access but require a bit of setup for each platform.

If all you need is to grab the frames, OpenCV has a VideoCapture class and is multiplatform. (and has C, C++ and Python APIs)

It is very basic though.

But maybe you need some of the fancy image processing it contains too smile.png

Flash has access with no platform specialization, assuming user consent.

Java and Python also have access but require a bit of setup for each platform.

I'm actually working in C and C++. Sorry for being vague :) I added that detail in my original post.

If all you need is to grab the frames, OpenCV has a VideoCapture class and is multiplatform. (and has C, C++ and Python APIs)

It is very basic though.

But maybe you need some of the fancy image processing it contains too smile.png

This looks like something I could use! I'm downloading it, and going to test it out shortly.

This topic is closed to new replies.

Advertisement