Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Sample Vb.net Code To Video Recording Using Webcam


I need to create a small ASP or VB.net application
That would use any webcam to record for couple of minutes.

The gui interface is simple
Preview/play button to view the recording
record button to start recording
Stop to stop recording
Submit to send the recorded file

I can use windows media player objects in .net to view the
recordings.

Is there any .net built-in controls to
program the recording portion?

Thanks
Kopi




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Free Video Capture Activex And Sample Code
HI Everybody,

I have a project that need preview video from web cam, I using vb6, vb6 have free bulit in control can do that. I find a resource that solve my problem. I want share to everyone.

here have free videp capture activex and sample code download
http://www.viscomsoft.com/videocapfree.htm

Voice Recording Using MCI Sample (VB)
Hi, I would like to know anyone has done before the above using VB??
Could someone show some sample coding on the above
Thanks, Sally

I found a sample more on C++ in code guru @ https://secure.codeproject.com/audi...e_Recording.asp

Resubmitted Due To No Replies:Recording Sample Rate
I'm working on a program which requires recording via a mic which is played back.

Using the MCI controls to record, the default sample rate is 8bit 11khz ish.

I'd like to improve the recording quailty by changeing the sample rate to 16bit.

I know its something to do with:

mciSendString Lib "winmm.dll" Alias "mciSendStringA" (ByVal lpstrCommand As String, ByVal lpstrrtning As String, ByVal uReturnLength As Long, ByVal hwndCallback As Long) As Long

But I can't work it out! Can anyone help please?

Webcam Video
Does anyone know how to get video from a webcam in vb? I just want to see or view what the webcam sees no editing will be needed. I want to do it like windows messanger so i can see what other people are seeing.

Dan

Capturing Video From Webcam
I've got a USB webcam. I wish to view the moving picture coming from it, like NetMeeting. Netmeeting - you don't need to specify which camera you are using - it takes the one connected, so therefore there must be a universal protocol used. Netmeeting doesn't search for the drivers. How would I go around doing this?. How would I autodetect? My camera is called a Cool iCam, made by Aiptek.

Record Video By Using Webcam
i'm a beginner of vb6 . Can someone tell me the code to record video through webcam. Thank you very much

Webcam/video Capture
Hi, i am trying to setup a simple program that captures images from my webcam and then sends them to my server or sends via http. I am trying to get the the program written by E. J. Bantz Jr to do this. The source code is available free on planet-source-code but i just cannot seem to save the image to disk or memory and then make into a very small jpeg file? I have tried many ocx but they are slow and the jpeg is big? Can anyone help?


Regards

Jules

Recording Video????
Does anybody know if it is possible to record video on a CE 3.0 computer. I have the storage capacity (5 gigabytes) but don't know if the window CE is capable of recording data using a Visual Basic program??? Please Help? Any suggestions would be greatly appreciated!

Capture Image From Webcam Usb/s-video
hey guys,
I have been trying to make a simple webcam program, but untill now unsuccessfull.
All the samples i find are very old and wont work in visual basic2005

Like VideoOCX.

Who can provide me with a working example of a webcam picture capture?
it must be soo easy in vidual basic 2005

Buffer Webcam Video Streaming
Hi All,

I have to develop a VB 6.0 program is able to buffer a webcam video for a few second.

ex. collect video starting 20 second prior an event occur.

After that I need to save the buffered video into an AVI file.

Could someone of you all help me?
Does a library or component that allow me to collect buffered streamed video
I looked into the other thread but I didn't find a solution of my problem.

Thanks to all

Please Help Me In WebCam (Capture Video) Issue ...
Hello All!

Currently I'm working on a WebCam capture (motion detection) project. I'm using VFW API in Visual Basic 6.0 and the major problem that I'm facing is ... "not able to detect the availability of attached USB camera".

There are certain cases when the attached Camera is disconnected remotely and in that case, my application hangs! It gets back to work when the camera is available; but it does hang, especially if the "Record Video to AVI" operation is going on.

Basically I was searching for some message like WM_IS_INUSE that will return True or False, but I could not find any such message. WM_CAP_DRIVER_CONNECT is ok but that still brings the capture window back for False status. I also tried WM_DRIVER_GET_NAME but found that its status has nothing to do with WebCam connected to USB; instead its status solely depends on whether the capture window for selected video source is created or not. This message is fine to see the Cam Status at starting; just to check if source is functional at that point of moment or not; but certainly not to periodically check if the selected Source is still in use (or working/streaming) or not!

Does anyone know if there is a notification broadcast, or alternatively a message that can be sent to the system, that would inform me that a web camera attached to the local computer was in use, or not?

Eagerly waiting for your valuable reply ...

Thanks & Best Regards,

Ruturaaj.

Please Help Me In WebCam (Capture Video) Issue ...
Hello All!

Currently I'm working on a WebCam capture (motion detection) project. I'm using VFW API in Visual Basic 6.0 and the major problem that I'm facing is ... "not able to detect the availability of attached USB camera".

There are certain cases when the attached Camera is disconnected remotely and in that case, my application hangs! It gets back to work when the camera is available; but it does hang, especially if the "Record Video to AVI" operation is going on.

Basically I was searching for some message like WM_IS_INUSE that will return True or False, but I could not find any such message. WM_CAP_DRIVER_CONNECT is ok but that still brings the capture window back for False status. I also tried WM_DRIVER_GET_NAME but found that its status has nothing to do with WebCam connected to USB; instead its status solely depends on whether the capture window for selected video source is created or not. This message is fine to see the Cam Status at starting; just to check if source is functional at that point of moment or not; but certainly not to periodically check if the selected Source is still in use (or working/streaming) or not!

Does anyone know if there is a notification broadcast, or alternatively a message that can be sent to the system, that would inform me that a web camera attached to the local computer was in use, or not?

Eagerly waiting for your valuable reply ...

Thanks & Best Regards,

Ruturaaj.

Please Help Me In WebCam (Capture Video) Issue ...
Hello All!

Currently I'm working on a WebCam capture (motion detection) project. I'm using VFW API in Visual Basic 6.0 and the major problem that I'm facing is ... "not able to detect the availability of attached USB camera".

There are certain cases when the attached Camera is disconnected remotely and in that case, my application hangs! It gets back to work when the camera is available; but it does hang, especially if the "Record Video to AVI" operation is going on.

Basically I was searching for some message like WM_IS_INUSE that will return True or False, but I could not find any such message. WM_CAP_DRIVER_CONNECT is ok but that still brings the capture window back for False status. I also tried WM_DRIVER_GET_NAME but found that its status has nothing to do with WebCam connected to USB; instead its status solely depends on whether the capture window for selected video source is created or not. This message is fine to see the Cam Status at starting; just to check if source is functional at that point of moment or not; but certainly not to periodically check if the selected Source is still in use (or working/streaming) or not!

Does anyone know if there is a notification broadcast, or alternatively a message that can be sent to the system, that would inform me that a web camera attached to the local computer was in use, or not?

Eagerly waiting for your valuable reply ...

Thanks & Best Regards,

Ruturaaj.

Recording And Streaming Video
i am writing a program that will record the entire screen and stream it to another computer. How would i record the entire screen & use windows media player (if possible) to send a live (or as close to live as possible) stream to another computer?

Saving Recording Video
hello,
this is a two part question.

first off i have a video stream from a video camera. it is a asf file. i can view it in media player ocx. but is there a way i can record it in vb6. some other control. the path is like this
"http://ipaddress/bin/file.asf"

next with the above file if i put the address in internet explorer it starts a file download, but the file size is constantly increasing so it never ends to save. if i cancle i loose the info. is there a way with code that i can start the stream, hold it in a variable, then stop, then save .

thank you for your help in advance.

Video Recording Control ...
I'm looking for a control (free ??) wich I can use to record from a video device like a webcam... something like netmeeting, but it only needs to be local...

thanks for any idea

Recording Video On A CE Machine???
Using Visual Basic, can a person use a CE computer to record video?? Please Help with any comments or suggestions.
Thank You.

Recording Video With The New 400mhz Pocket Pc??
CAN IT BE DONE WITH VISUAL BASIC?? PLEASE HELP!

Capture Video To WMV File Sample
I find the VB Sample Capture video to WMV file
http://viscomsoft.esmartweb.com

Capture Video To WMV File Sample
Here have VB Capture Video to WMV file sample

URL

Recording Screen Captures With Video Codec
Hey all,

My first post in a while. Just a general question...
I got it into my head that i want to try and create
and program that will record a screen capture into
a video file using a given codec (divx/xvid/etc).

Ive however absolutely no idea how i would go
about doing this and can find little/no information
on the net about doing it.... can n e 1 point me
in the right direction?

thanx a million

dan.

Dumping (Recording) Streaming Video From Windows Media Player Control ??!
How would I 'Capture' video from the Windows Media Player Control?

Needed Vb Code For Live Video Chat Without Using Video Capture Card
hi guys,
           some one really help me out plz... i need a code in basic vb6 for live video chat using a web camera.the code should b able to live stream the image..basically a client and server is involved...the image should reach the server who should b able to retransmit it...AND ALLL THIS WITHOUT A VIDEO CAPTURE CARD(software based ha)....hope u got me rite...
                                     bye c ya ..plz reply as soon as possible



Edited by - vns on 2/14/2005 4:07:25 AM

Looking For Webcam Code.
I am wondering if anyone knows where I can find some webcam code. Either just a program that users can chat/cam over a server like how msn does. (Not looking for anything like msn just basicly the cam and chat). Or just a program that broadcasts the webcam onto a server. I also have another question, if it is possible and you can reference me please do.


Is it possible that using ASP you can basicly have a webcam stream in your browser? What I mean by that is say there is a page I have a chat on, is it possible for it to have a button to start the webcam straight from the browser so no desktop applications will be needed?


If you guys know any opensource software for this please help, or even if you could explain a little. It does not have to be just .ASP

Change Webcam Settings By Code
hey,

ive seen many and many webcam programs and also tried some for my messenger program but there is no way to change the resolution or size by code. there was a code that call's for a standard popup.

so how do i change the webcam resolution by code?

Logitech Webcam SDK Code Enhancement
I purchased a LogiTech WebCam. My intended use is to take a snapshot every 20 minutes or so from the dashboard of my motorhome on a trip from the US to Panama. Unfortunately the maximum interval is 60 seconds between snapshots. Having done some programming in the past I know that this is a relatively easy change and LogiTech offers a Software Developers Kit, but even if I could figure out the code and make the change, I do not have access to the compiler (I don't know what language it is written in - maybe Visual Basic). Is there anyone out there that can help?

XML & VB Sample Code?
Hello,

I am new to XML, but have loads of experience with VB. I need to learn XML and would like to get my hands on some sample code, where VB6 uses XML. Can anyone point me in the right direction? I tried the knowledge base but there was nothing useful there.

TIA

Sample Code
Can someone or a few people please post some sample vb code from a .dll file that compiles properly. I am trying to create a dll, however I keep getting odd errors, so I first want to try compiling guaranteed code to see if it is my compilation method that is failing or the code I have written.... this is my first dll file.
Thanks in advance.

Sample Xml Code In Vb
hey, does anyone have some simple examples of vb code that

1) creates an xml document and writes something to it, and saves it somewhere

2) reads some xml document

or, if anyone knows anywhere on the net where i can find this information, i will greatly appreciate it.

thanks,

jeff

Code Sample?
Can someone post, or send me, a sample of an extraction of a comma delimited file? I've never done one and can't seem to find one elsewhere... thanks in advance.

Ado Sample Code
I need full sample code for ado objects
any ideas??
Thanks.
anny.

Sample Code
Hi all,
I want sample code for shut down PC from vb code,
thanx

Sample Code In VB
I am a beginner for VB but know COBOL programming. Could I get a sample VB program to develop a payroll master updation and write data to an Acess Database. Field names are Emp_no, Name, Basic.

Sample Code That Use ADO Object
Hi friends,
I need to see some sample code to learn how to use ADO in my VB code like I have to know how can I write my code like:


Code:
sql="SELECT * FROM " & dbtable
sql = sql & " WHERE " & dbfield
sql = sql & " LIKE '%" & dbwhere & "%'"

since legacy code is not good...

So could you please help me on this?

Many thanks,
Elahe

Code Sample Definition
Sub ONEVALUES()
Range("AY:AY").Select
Selection.Clear
Vals = Range("am39").Value
Range("ay1", Cells(Vals, 51)).Value = "1"
Range("ay1", Cells(Vals, 51)).Select
VAL1 = Range("am39").Value
End Sub


This assigns the value in cell am39 to variable Vals
Then the What does the Range function do?

I Am Looking For Nwtwork Sample Code In VB 6.0
anybody know where can I find a network administrator sample code in VB 6.0? I will apreciate if you guys tell me how can I get it.

Thanks, in advance


Edit by Moderator:
Please post VB6 questions, in the Legacy General forum.

Thank you.

Anyone Have A Sample Printer. Code Example?
i looked at a lot of tutorials and what not and im still not able to write out my own print layout..

i learn best when i see an example that i can relate to and understand!

would someone be willing to either write an example or show me a good example of a page layout using the printer.?

here is some of the code that ive been using, and experimenting with, i need to print labels as well and variable.. can anyone show me?


Code:
Printer.PaintPicture LoadPicture("C:WINDOWSsystemfileslogo.jpg"), 3200, 1

Printer.FontSize = 20
Printer.CurrentX = 10
Printer.CurrentY = 10

For i = 0 To inbound
Printer.Print strArray(i)
'when array reaches a certain amount start a new page cause it will run off first page, printer.newpage?
Next i
Printer.EndDoc

Barcode Sample Code
I try to write a barcode program & I need some sample / guideline.
10q

Why Does Sample Code Not Compile?
I took some sample code that did what I wanted (to find the associated application for a file) and tried to run it on my machine (WinXP, using wscript), and it doesn't compile (I've included all the code below so other people may use it, or if someone needs more information than isolated lines to answer the question).

Running it by double clicking on the file (called test.vbs) gives me:

Line: line 11
Char: character 17
Error: expected end of statement
Code: 800A0401
Source: Microsoft VBScript compilation error

It is complaining that "Private Declare" should be a full statement. Any idea why?

A second question if you'll allow me:
If I comment out the four lines starting with "Private Declare", I get the same "expected end of statement" error, but this time it is complaining about the "As Long" in the "Dim success As Long" line.

I assume both problems are related, but don't know what to try next. Do I have a version or configuration problem?

Regards,

Howard


Code:
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' Copyright 1996-2003 VBnet, Randy Birch, All Rights Reserved.
' Some pages may also contain other copyrights by the author.
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' Distribution: You can freely use this code in your own
' applications, but you may not reproduce
' or publish this code on any web site,
' online service, or distribute as source
' on any media without express permission.
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Private Declare Function FindExecutable Lib "shell32"_
Alias "FindExecutableA"_
(ByVal lpFile As String,_
ByVal lpDirectory As String,_
ByVal sResult As String) As Long

Private Const MAX_PATH = 260
Private Const ERROR_FILE_NO_ASSOCIATION = 31
Private Const ERROR_FILE_NOT_FOUND = 2
Private Const ERROR_PATH_NOT_FOUND = 3
Private Const ERROR_FILE_SUCCESS = 32 'my constant
Private Const ERROR_BAD_FORMAT = 11

Private Sub Command1_Click()

Dim success As Long
Dim pos 'As Long
Dim sResult 'As String
Dim msg 'As String

sResult = Space(MAX_PATH)

'lpFile: name of the file of interest
'lpDirectory: location of lpFile
'sResult: path and name of executable associated with lpFile
success = FindExecutableA("winhlp32.hlp", "c:winntsystem32", sResult)

Select Case success
Case ERROR_FILE_NO_ASSOCIATION: msg = "no association"
Case ERROR_FILE_NOT_FOUND: msg = "file not found"
Case ERROR_PATH_NOT_FOUND: msg = "path not found"
Case ERROR_BAD_FORMAT: msg = "bad format"
case else
if success >= ERROR_FILE_SUCCESS then
pos = InStr(sResult, Chr(0))

If pos Then msg = Left(sResult, pos - 1)
end if

End Select

MsgBox msg

End Sub

call Command1_Click

Need A Sample Tutorial/code
I'm trying to do a login page. The login page form consist of:-
1) Text box - Student ID
2) Text box - Password
3) Command button - Login

I have a database which consist of student ID and password.

Procedure,
When the user click on the Login button after key in the the student ID and password. The program will check whether the student ID match with the password. If yes a message box will pop up and display matched

*this is not my homework or assignment, actually i'm from electronic and electrical engineering. currently doing my project where i'm going to communicate my hardware with vb. so i would like u guys from computer field to guide me on doing the software part.

Thanks in advance!

MSchart (need Sample Code)
Guys,
I'm having trouble using Mschart. I want to create a relatively simple bar chart. Below is a sample of what the data looks like. I'm bringing in the data as a recordset.

Descr5/5/20065/6/20065/7/2008
Filler433138
Capper904167

The chart should be a multi column one, with descr on the x axis, value on the y axis and date as the legend.

Thanks,
MITech

Need Help Or Code Sample For Writeprocessmemory!
Hello all i'm new here and I am also new to visual basic. I was wondering if anyone could help me with the whole process with writeprocessmemory because for some reason I can't get the openprocess to open the process up. Please help and i will post code samples if I get a reply. Thank you....

Dan

EDIT :

For my Form_Load I have :


Code:

Private Sub Form_Load()

' Declare some variables we need
Dim hwnd As Long ' Holds the handle returned by FindWindow
Dim pid As Long ' Used to hold the Process Id
Dim pHandle As Long ' Holds the Process Handle

' First get a handle to the "game" window
hwnd = FindWindow(vbNullString, "GunBound")
If (hwnd = 0) Then
MsgBox "GunBound Is Not Running."
Exit Sub
End If

' We can now get the pid
GetWindowThreadProcessId hwnd, pid
If (pid = 0) Then
MsgBox "Couldn't Resolve A PID Number."
Exit Sub
End If

' Use the pid to get a Process Handle
pHandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
If (pHandle = 0) Then
MsgBox "Couldn't Get A Process Handle."
Exit Sub
End If

' Now we can write to our address in memory
WriteProcessMemory pHandle, &H40B181, "Beans", 5, 0&

' Close the Process Handle
CloseHandle hProcess

End Sub



Also my module has this :

Code:

Declare Function FindWindow Lib "user32.dll" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Declare Function GetWindowThreadProcessId Lib "user32.dll" (ByVal hwnd As Long, lpdwProcessId As Long) As Long
Declare Function OpenProcess Lib "kernel32.dll" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long
Declare Function WriteProcessMemory Lib "kernel32.dll" (ByVal hProcess As Long, ByVal lpBaseAddress As Any, ByVal lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long
Declare Function ReadProcessMemory Lib "kernel32.dll" (ByVal hProcess As Long, ByVal lpBaseAddress As Any, ByVal lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long
Declare Function CloseHandle Lib "kernel32.dll" (ByVal hObject As Long) As Long

Opening Up Sample Code
I have started downloading some sample code, I open it and Winzip shows me several files, I open one that says form and it opens into VB, but if I try to run the program it always gives me an error. The most popular is "Compile error - sub or function not defined" Can anyone tell me how to look and run these sample codes. Thanks!!

Terminal Sample Code
Any idea where to find a sample terminal, hyperterminal like, program using plain vb code or Ms comm control ?

Thanks in advance

fazt_dot@yahoo.com

Need Help Deciphering Code Sample...
Dim sTemp As String, sTemp2 As String

Open "cool.exe" For Output As #1
Open App.Path & " ea.dll" For Binary As #2

While Not EOF(2)
sTemp = Input$(2000, #2) <----- What does Input$() do?
sTemp2 = sTemp2 & sTemp
Print #1, sTemp2;
sTemp2 = ""
If Len(sTemp) > 2000 Then
sTemp = ""
End If
Wend

Close #2
Close #1

Visio 5.0 Sample Code
I need to create a visio document from vb, if someone can help me with my Dim's and Set's, it would be greately appreciated.

Thank you.

Sample Code(login)
Is there a sample code when user needs to access a DB in VB and the user is not mapped to the correct network drive or not connected at all..Is there a code that enbles the user to get prompted to logon to to the server(mapping) with a user name and password?

Datagrid Sample Code
I am using datagrid for first time in my form. When i am scrolling thru rows and clicking on cell it is showing error message which is datagrid related error. so i want some sample code thru which i can use datagrid control easily.
thanks
manish
INDIA

Help Finding Sample Code
I'm sure that somewhere on this forum I've found VB sample code showing you how to place a graphic within a textbox by using various APIs to paint onto the textbox (for example, drawing a magnifying glass in a textbox to signify that you should enter a search term).

Unfortunately I can't find this article and now I'm thinking that I imagined it! Can anyone help me find it, or does it sound impossible and therefore probably never existed in the first place? - Andy
___________________________________________________________________
If you think nobody cares you're alive, try missing a couple of mortgage payments

Copyright 2005-08 www.BigResource.com, All rights reserved