![]() |
USB Camera? - Printable Version +- QB64 Phoenix Edition (https://qb64phoenix.com/forum) +-- Forum: QB64 Rising (https://qb64phoenix.com/forum/forumdisplay.php?fid=1) +--- Forum: Code and Stuff (https://qb64phoenix.com/forum/forumdisplay.php?fid=3) +---- Forum: Help Me! (https://qb64phoenix.com/forum/forumdisplay.php?fid=10) +---- Thread: USB Camera? (/showthread.php?tid=1163) |
RE: USB Camera? - madscijr - 02-26-2025 (02-26-2025, 08:58 PM)SpriggsySpriggs Wrote: Q: I wonder if there's a way to change camera resolution at the API or software level? This one ran. (02-26-2025, 09:14 PM)SpriggsySpriggs Wrote: Ignore the previous code. This will be better. This one returns "Failed to set video format" (see attached screenshot). (02-26-2025, 09:14 PM)SpriggsySpriggs Wrote: EDIT: The reason why is that this will default the resolution of the video rather than requiring you to enter it in the function call. Because who wants to do that? But is the default resolution the lowest it can get? It seems the first code that explicitly set 640x480 would be preferable for the purpose of going lower res? (I should see if it'll work if I set those values to 320x240 or 160x120!) Whenever you get a chance... No biggie... Thanks PS I cleaned up your code (see attached for all 4 versions all nice and pretty). RE: USB Camera? - SpriggsySpriggs - 02-26-2025 Hey, so look at the comment I made in the SetupDriver call. I feel as though you probably ran it with _TRUE there on the one you said didn't run. Also, you MUST choose YUY2 as the type. Also, at this point, I think the code can be left in your hands. Here is the link to the relevant MSDN docs: https://learn.microsoft.com/en-us/windows/win32/multimedia/using-video-capture RE: USB Camera? - madscijr - 02-26-2025 (02-26-2025, 11:51 PM)SpriggsySpriggs Wrote: Hey, so look at the comment I made in the SetupDriver call. I feel as though you probably ran it with _TRUE there on the one you said didn't run. Also, you MUST choose YUY2 as the type.Yes, I got it working as low as 320x240 - this is great. Thanks again Spriggsy! RE: USB Camera? - SpriggsySpriggs - 02-27-2025 You're welcome. Glad you were able to run it successfully. When you get further down the line, let me know if you need some help with this again. |