Web Cam Video Problems

Thread Starter

MrAl

Joined Jun 17, 2014
7,849
Hello there,

If anyone can help here it would be great.

I recently got a new web cam to work as a security cam. My older cam worked fine with the software i am using. The new cam apparently does not work with the existing software..

The software uses the Microsoft VFW.dll dynamic load library (or dynamic link library) to connect to the web cam.
What happens is all the C function calls work ok by returning a non zero result, and the cam controls (such as Brightness, Contrast, etc.) work fine, but the video itself does not show up in the cam window (the old web cam did fine here).
I can tell the controls work because if i open up "Manycam" i can see the video and change the brightness and contrast and whatever else. But the video does not show up in the VFW software.

The new cam is a little nicer than the old cam so i wanted to use that one instead.
The nice thing abou using the VFW.dll is that i can create software that saves screenshots and have complete control over the output file format and the number of screen shots per second and this keeps the file size of the ressulting video very very small, much unlike the AVI format which takes up enormous disk space.
For example, for two seconds of video with VFW i got it to use just about 40k bytes but with the AVI format output (and the program Video Lan just 2 seconds of video takes up 20Mbytes! That is a huge difference.
I can probably convert the AVI file to a smaller file later, but it would take a lot of time to convert a big file from video that was running for 24 hours straight. The file size would never get as low as i can get with VFW however because the AVI format takes many many frames per second and doesnt seem to have a setting to reduce the number of frames per second.

Any ideas would help here, as well as a different way to program this. The code has to be able to connect to a web cam and display the output in a window on the screen.
 

Thread Starter

MrAl

Joined Jun 17, 2014
7,849
Hello again,

I wrote that about one hour ago and wouldnt you know it i think i solved the problem, at least to some degree. It's not perfect though it is a pain to start up the web cam.
It was a matter of bringing up a dialog box for the user (that's me) to be able to select the right video format, which is YUV. The default is MPEG and that did not work. Now i just have to find a way to set it automatically without having to use a dialog box every time.
I was playing around with it for hours and could not find the solution so that's why i made the first post.

I am still open to new ideas here though. That is, using a web cam as a security camera.
The VFW thing is old technology so i need to upgrade anyway really.

Thanks for any ideas, links, etc.
 
Top