node-webcam icon indicating copy to clipboard operation
node-webcam copied to clipboard

Add Width and Height Customization in Windows

Open ericblade opened this issue 8 years ago • 6 comments

Got the program that I wanted to build with this working to an absolutely minimal level.. which is great.. but it seems that width/height/quality settings do absolutely nothing. No matter what I set, I get a 640x480, with no visible difference with 0, 50, or 100 quality.

Not sure if this is hardware or software or related to the external binary that is used ..

ericblade avatar Jun 03 '17 02:06 ericblade

hate to bump a post, but i didn't get any opportunity to mess with this over this past weekend, and would like to this weekend. I guess it might be best for me to figure out how the Windows binary works, and see if I can sort it out that way? Was hoping someone else could confirm if the options actually work, just to see if it's my hardware or some software configuration or not.

ericblade avatar Jun 12 '17 20:06 ericblade

Width and height don't affect the output in windows currently. My original attempts failed as I did not how the output format would work https://github.com/chuckfairy/node-webcam/blob/master/src/bindings/CommandCam/CommandCam.cpp#L481 . I did some research this weekend and it turns out it has to based on the original ratio or you'll get a black image as I did https://msdn.microsoft.com/en-us/library/windows/desktop/dd387907(v=vs.85).aspx. Ignoring error reporting on ratios, I think I'll be able to add height and weight this week if I can produce and image. Here is also a helpful forum post https://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/fa127dc1-71f8-41d6-89bf-eddc96699dad/change-webcam-resolution?forum=windowsdirectshowdevelopment

chuckfairy avatar Jul 25 '17 03:07 chuckfairy

Well, glad to know that it wasn't just me :-) What I want to build, is a program that will on a button press, take a snapshot from several USB cameras hooked up to a device. I need to be able to set the highest resolution/quality level available per-camera (as I have a collection of cheap webcams from various sources, none of them are alike :D ) and then take a single image from each of them. Intent is for getting several images of an item from different points of view. Though I suppose with some image processing techniques, I could also build a super cheap 360degree snapshotter. :-D Unrelated to this ticket, I do run into a BSOD every time I try to take pictures from multiple devices simultaneously, so I have to chain them. :-S

ericblade avatar Jul 25 '17 03:07 ericblade

the same

analysisi avatar May 06 '19 11:05 analysisi

+1

serhatates avatar Nov 28 '19 06:11 serhatates

Height and width aren't working for me on macOS Big Sur. They're just ignored and photos are at the device native resolution (1920x1080 for me now).

I think this is a either an everyone problem or a windows+mac problem.

Wonder if this will be fixed by option to use ghoto2 as the engine for taking the photos.

oliviaartz avatar Dec 17 '20 23:12 oliviaartz