Initializing MSMF camera and setting properties appears to take 40 seconds

yeah sorry I have had these very same discussions countless times. half the time, they go a certain way. I’m trying to head off certain lines of inquiry. perhaps that was hasty of me.

OpenCV is dysfunctional in some parts, especially the older and unloved/uncool parts. let’s say, handling OpenCV is a negotiation, avoiding its pot holes.

if you notice anything being (provably) broken/defective/hobbled in OpenCV, you can always start an issue on its github. maybe someone reported it already. maybe not. maybe someone would love to work on that, if they had known it was something to work on.

If you’re able to implement your own MSMF, that’s definitely immensely valuable to you and your application. you’ll know exactly how complex the task actually is, what all is involved, how to deal with it. and you have greater control over all of it, compared to having to dig around in OpenCV source and recompiling the library.

VideoCapture abstracts over a lot of it, hiding both the hassle and the potential performance of the media APIs it’s using. it strives to be fast and efficient but… in the real world, that’s not necessarily the case. OpenCV has performance tests. IDK if those are checked in continuous integration, or whether there are tests that check VideoCapture performance on high data rate video sources. actual performance is usually only investigated and proven when someone comes along and needs it themselves, and injects some energy (discussion, issues, patches) into OpenCV.