The MASM Forum

Projects => MASM32 => Topic started by: Bill Cravener on July 10, 2012, 08:26:04 PM

Title: Simple webcam example that captures a frame or video.
Post by: Bill Cravener on July 10, 2012, 08:26:04 PM
I was digging around in one of my computer junk drawers last weekend and discovered I had an old Lifecam Show webcam which I can't remember how I came to own. Anyway I installed the software for it that came with the webcam which after installation used some 30M of drive space. Well I thought to myself that's ridicules ridiculous that it took 30M to simply display a capture window with the options to take a frame snapshot or to create a short video from my webcam. After digging around in the Windows API reference I came up with my own little Masm32 webcam app that does just about everything the Microsoft software does and at less then 20K. I have tested my little example on both XP and Windows 7. It enables you to capture a single frame or a 10 second video. Of course you must have some sort of webcam installed on your PC for the app to work.


http://www.quickersoft.com/examples/WebCam.zip

Or it can be downloaded from my site link below.

Example frame capture (size 300K): http://www.quickersoft.com/pictures/CapturedImage.bmp
Example video capture (size 12M): http://www.quickersoft.com/pictures/WebCamVideo.avi


Edit: What is it with me and the word ridiculous?
Title: Re: Simple webcam example that captures a frame or video.
Post by: hutch-- on July 10, 2012, 10:46:04 PM
 :biggrin:

I don't keep a webcam but I liked the short video, "You talkin' to me ?"  :icon14:
Title: Re: Simple webcam example that captures a frame or video.
Post by: Bill Cravener on July 10, 2012, 11:06:58 PM
Quote from: hutch-- on July 10, 2012, 10:46:04 PM
:biggrin:

I don't keep a webcam but I liked the short video, "You talkin' to me ?"  :icon14:

:biggrin:

Hi Steve,

I was trapped indoors last weekend because it was 100F outside and just too damn hot to be outdoors. Finding that webcam gave me something to play with for a couple days. Like you I have no need for a webcam but it kept me out of trouble while it lasted.
Title: Re: Simple webcam example that captures a frame or video.
Post by: hutch-- on July 11, 2012, 12:28:04 AM
Bill,

What is the gadget in the background, it looks like a gym weights machine ?
Title: Re: Simple webcam example that captures a frame or video.
Post by: Bill Cravener on July 11, 2012, 12:49:50 AM
That's my Weider Pro 3650 Gym that hasn't been getting much use lately. I tend to use it during the winter months when I'm not getting any outdoor activity. I've had it a long time, that and my old DP Powermate Treadmill which I do use year round. Funny thing is even though I exercise through out the year I'm still getting them love handles and a bit of a belly. Of course it's probably because the older I get the more I like to eat and at 6' 1" 225 pounds I need to exercise a might more me thinks. :biggrin:

(http://www.quickersoft.com/pictures/weider3650.jpg)
Title: Re: Simple webcam example that captures a frame or video.
Post by: Gunther on July 11, 2012, 10:32:14 AM
Nice picture, Bill.

By the way, I visited your web site and I was surprised. I saw your clock with the right time, but I'm sure that we're living in different time zones. What is your trick?

Gunther
Title: Re: Simple webcam example that captures a frame or video.
Post by: jj2007 on July 11, 2012, 03:02:30 PM
Quote from: Bill Cravener on July 10, 2012, 08:26:04 PMmy own little Masm32 webcam app that does just about everything the Microsoft software does and at less then 20K

You need to express that in Megabytes for Windows 8 users to understand, Bill:

"does just about everything the Microsoft software does and at less than 0.012MB, of which 0.0077 for an embedded image"

:t
Title: Re: Simple webcam example that captures a frame or video.
Post by: dedndave on July 11, 2012, 07:28:45 PM
yes - nice image and video
great quality

the one thing i see is that programs like skype, yahoo messenger, etc require some sort of standardized driver interface

not that i need a cam - noone wants to look at my ugly puss   :(
Title: Re: Simple webcam example that captures a frame or video.
Post by: Bill Cravener on July 11, 2012, 08:55:06 PM
Hi Gunther,

That's just a simple Adobe Flash clock I put together. It simply retrieves whatever your local system time is and displays it as an analog clock.


Jochen,

I'm willing to predict that Windows 8 will be a total failure and Billy Gates will fire Ballmer's ass shortly there after. :biggrin:


Quotenot that i need a cam - noone wants to look at my ugly puss   

That's just not true, I'd bet money Z loves that ugly face of yours. :biggrin:


Title: Re: Simple webcam example that captures a frame or video.
Post by: Gunther on July 12, 2012, 05:01:33 AM
Bill,

QuoteThat's just a simple Adobe Flash clock I put together. It simply retrieves whatever your local system time is and displays it as an analog clock.

Good trick.

Gunther
Title: Re: Simple webcam example that captures a frame or video.
Post by: Bill Cravener on July 14, 2012, 09:29:31 PM
Thanks Gunther,

Flash is disliked by many but I feel it has its uses. For example I use it a good bit on Knievel Cycles web sites because it enables me a means to present their motorcycles and the many optional features they offer to a customer when designing a custom built bike. I think there was an effort to kill Flash on mobiles especially by Apple but the demand for its use and the popularity of ActionScript keeps it going. I mean who doesn't use sites like YouTube and it seems all the big news and business sites use Flash for banners and such. I don't see Flash dying off anytime soon even though some would like it to. :biggrin:
Title: Re: Simple webcam example that captures a frame or video.
Post by: dedndave on July 14, 2012, 11:36:34 PM
flash is like guns - lol
the guns aren't bad - some people that use them are

flash can be an annoying advertisement or a well-presented interactive graphic
Title: Re: Simple webcam example that captures a frame or video.
Post by: gscundiff on January 15, 2013, 07:37:37 AM
Anyone know where I can get the Webcam.zip file now?
Title: Re: Simple webcam example that captures a frame or video.
Post by: dedndave on January 15, 2013, 08:12:52 AM
they're probably still on the site
he must have moved them, is all   :P
Title: Re: Simple webcam example that captures a frame or video.
Post by: Gunther on January 15, 2013, 08:17:18 AM
Hi gscundiff,

Quote from: gscundiff on January 15, 2013, 07:37:37 AM
Anyone know where I can get the Webcam.zip file now?

I think Bill can help you.

Gunther
Title: Re: Simple webcam example that captures a frame or video.
Post by: Magnum on January 15, 2013, 02:10:56 PM

When I go here, I get Error 404.

Example video capture (size 12M): http://www.quickersoft.com/pictures/WebCamVideo.avi
Title: Re: Simple webcam example that captures a frame or video.
Post by: dedndave on January 15, 2013, 02:24:25 PM
it looks like Donkey's stable is misplaced, as well   :icon_eek:

the hosting service must have changed something on Bill
Title: Re: Simple webcam example that captures a frame or video.
Post by: dedndave on January 15, 2013, 09:41:22 PM
here are various webcam examples - mostly by Siekmanski
but, Bill's is in there, as well
Title: Re: Simple webcam example that captures a frame or video.
Post by: gscundiff on January 16, 2013, 04:22:43 PM
Thank you dedndave...I'll give it a look!