Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

using VB6 avicap32.dll how to record sound in AVI

Status
Not open for further replies.

amigupta1978

Programmer
Dec 7, 2003
1
IN
Hello,
I am using avicap32.dll and VB6. I am able to record the picture from the video source. But I am unable to record the audio input present on the audio input.

Secondly suppose my avi file recorded is for 2 hrs now I want to break this file into smaller AVI file (say I want to record the movie from 10th minute to 15th minute into another AVI file How to achiveve this.

How to edit my avi file using VB6 i.e I want to add sound Track to my AVI file or add captioning to my AVI file.

Any suggestions and help are welcome. Pls If possible give me the demo code to achive my points.

Regards,
Amit
(attached how I am capturing video using capcreateWindow may be I am missing some parameter there)


'''''''for creating the window
Dim Caps As CAPDRIVERCAPS
capGetDriverDescriptionA 0, lpszName, 100, lpszVer, 100 '// Retrieves driver info
lwndC = capCreateCaptureWindowA(lpszName, WS_CAPTION Or WS_THICKFRAME Or WS_VISIBLE Or WS_CHILD, 0, 125, 650, 550, Me.hwnd, 0)

capSetCallbackOnStatus lwndC, AddressOf MyStatusCallback
capSetCallbackOnError lwndC, AddressOf MyErrorCallback


If capDriverConnect(lwndC, 0) Then
capDriverGetCaps lwndC, VarPtr(Caps), Len(Caps)

capPreviewScale lwndC, True

'// Set the preview rate in milliseconds to 1
capPreviewRate lwndC, 1

'// Start previewing the image from the camera
capPreview lwndC, True

End If
''''end for creating window


'''''for recording
Dim lpszName As String * 100
Dim lpszVer As String * 100
Dim Caps As CAPDRIVERCAPS
capPreviewRate lwndC, 0

Dim sFileName As String
Dim CAP_PARAMS As CAPTUREPARMS

capCaptureGetSetup lwndC, VarPtr(CAP_PARAMS), Len(CAP_PARAMS)

CAP_PARAMS.dwRequestMicroSecPerFrame = (1 * (10 ^ 6)) / 30 ' 30 Frames per second
CAP_PARAMS.fMakeUserHitOKToCapture = True
CAP_PARAMS.wTimeLimit = 0
CAP_PARAMS.fCaptureAudio = False

capCaptureSetSetup lwndC, VarPtr(CAP_PARAMS), Len(CAP_PARAMS)



sFileName = avifilename

capCaptureSequence lwndC
Frame4.visible = True
capFileSaveAs lwndC, sFileName ' Copy video from swap file into a real file.

'''end for recording
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top