amigupta1978
Programmer
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
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