|
-
Jun 2nd, 2005, 12:06 PM
#1
Thread Starter
PowerPoster
Save as Video File
Ok I have a webcam runing and at the mo i have each individual image appearing in a picture box, is there any way to save this as a video file?
Thanks, Pino
Also, does anyone know haow to adjust setting such as contrast/darkness with a webcam? Are these done via the webcam or done to the actual picture?
-
Jun 2nd, 2005, 12:09 PM
#2
Re: Save as Video File
 Originally Posted by Pino
Ok I have a webcam runing and at the mo i have each individual image appearing in a picture box, is there any way to save this as a video file?
Thanks, Pino
Also, does anyone know haow to adjust setting such as contrast/darkness with a webcam? Are these done via the webcam or done to the actual picture?
If your trying to save it as a .avi file then this thread may help 
Cheers,
RyanJ
-
Jun 2nd, 2005, 12:17 PM
#3
Thread Starter
PowerPoster
Re: Save as Video File
Thank-you i'll check that out
-
Jun 2nd, 2005, 12:34 PM
#4
Thread Starter
PowerPoster
Re: Save as Video File
Ok no it doesnt help me to well, since this is now api I will mover to api forum.
Basicly, the constants RECORD etc i do not have values for... If it helps here is the code i am using for capture
VB Code:
Public Declare Function SendMessage Lib "USER32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Public Declare Function capCreateCaptureWindow Lib "avicap32.dll" Alias "capCreateCaptureWindowA" (ByVal lpszWindowName As String, ByVal dwStyle As Long, ByVal X As Long, ByVal Y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hwndParent As Long, ByVal nID As Long) As Long
Public Const WM_CAP_CONNECT As Long = 1034
Public Const WM_CAP_DISCONNECT As Long = 1035
Public Const WM_CAP_GET_FRAME As Long = 1084
Public Const WM_CAP_COPY As Long = 1054
Public Const WM_USER = &H400
Public Const WM_CAP_START = WM_USER
Public Const WM_CAP_DLG_VIDEOFORMAT = WM_CAP_START + 41
Public Const WM_CAP_DLG_VIDEOSOURCE = WM_CAP_START + 42
Public Const WM_CAP_DLG_VIDEODISPLAY = WM_CAP_START + 43
Public Const WM_CAP_GET_VIDEOFORMAT = WM_CAP_START + 44
Public Const WM_CAP_SET_VIDEOFORMAT = WM_CAP_START + 45
Public Const WM_CAP_DLG_VIDEOCOMPRESSION = WM_CAP_START + 46
Public Const WM_CAP_SET_PREVIEW = WM_CAP_START + 50
Public mCap As Long
Public irunning As Boolean
Public Function StartCamera() As Boolean
irunning = True
On Error GoTo handler:
mCap = capCreateCaptureWindow("WebCap", 0, 0, _
0, _
320, _
240, frmCamera.hwnd, 0)
DoEvents
SendMessage mCap, WM_CAP_CONNECT, 0, 0
SendMessage mCap, WM_CAP_SET_PREVIEW, 0, 0
frmCamera.tmrCamera.Enabled = True
StartCamera = True
Exit Function
handler:
StartCamera = False
irunning = False
End Function
Public Sub DisconnectCam()
irunning = False
DoEvents: SendMessage mCap, WM_CAP_DISCONNECT, 0, 0
End Sub
and my timer code...
VB Code:
SendMessage mCap, WM_CAP_GET_FRAME, 0, 0
SendMessage mCap, WM_CAP_COPY, 0, 0
CamShot.Picture = Clipboard.GetData
-
Jun 2nd, 2005, 12:44 PM
#5
Re: Save as Video File
Ah, I see - well you certainly cannot use that API without all the constants.
Maybe this MSDN link will help:
http://msdn.microsoft.com/library/de...eo_capture.asp
Cheers,
RyanJ
-
Jun 2nd, 2005, 12:48 PM
#6
Thread Starter
PowerPoster
Re: Save as Video File
Thanks for the help it is appriciated!,but thats in c++/c
If anyone has the constants could they let me know?
-
Jun 2nd, 2005, 01:09 PM
#7
Re: Save as Video File
 Originally Posted by Pino
Thanks for the help  it is appriciated!,but thats in c++/c
If anyone has the constants could they let me know?
Maybe the author of the thread in the link I gave you can send them to you - he must have then to use his application 
Cheers and good luck,
RyanJ
-
Jun 2nd, 2005, 02:32 PM
#8
Software Eng.
Re: Save as Video File
You already have the constants:
Code:
Public Const WM_CAP_SET_VIDEOFORMAT = WM_CAP_START + 45
Public Const WM_CAP_DLG_VIDEOCOMPRESSION = WM_CAP_START + 46
Public Const WM_CAP_SET_PREVIEW = WM_CAP_START + 50
-
Jun 2nd, 2005, 02:48 PM
#9
Software Eng.
Re: Save as Video File
And, I noticed you're sending the WM_CAP_SET_PREVIEW message, yet you're turning the preview off, rather than on. The wParam parameter should be "1" if you wish to turn previewing on. You might also want to look into the WM_CAP_SET_PREVIEWRATE which allows you to set the fps
Also, why are you having your timer refresh the capture window, when you already have previewing on?
-
Jun 2nd, 2005, 03:32 PM
#10
Thread Starter
PowerPoster
Re: Save as Video File
hey megatron thanks,
I took an example off the net somwhere and this is how it showed it should be done, Could you point me in the right direction of how to do it properly? and if you get time explain each of the constants?
Thanks!
-
Jun 2nd, 2005, 03:58 PM
#11
Re: Save as Video File
I found this example - does it help at all?
Cheers,
RyanJ
-
Jun 2nd, 2005, 04:00 PM
#12
Re: Save as Video File
I don't know if this has any relevance, but here is code to do video capture in VB including saving to AVI format.
http://www.shrinkwrapvb.com/vbvidcap.htm
-
Jun 2nd, 2005, 04:39 PM
#13
Software Eng.
Re: Save as Video File
 Originally Posted by Pino
hey megatron thanks,
I took an example off the net somwhere and this is how it showed it should be done, Could you point me in the right direction of how to do it properly? and if you get time explain each of the constants?
Thanks!
Well, looks like you're on track. Change the wParam parameter of WM_CAP_SET_PREVIEW to "1" to indicate you want to turn previewing on.
Get rid of the code from your timer.
Also call ShowWindow to make your window visible. Or alternatively, specify WS_VISIBLE as one of your window styles. Note: if you want the capture window to be drawn on the parent, specify the WS_CHILD style as well. Otherwise your window will be created as a top-level window (but still a child of frmCamera). E.g.
VB Code:
mCap = capCreateCaptureWindow("WebCap", WS_CHILD Or WS_VISIBLE, 0, _
0, _
320, _
240, frmCamera.hwnd, 0)
-
Jun 2nd, 2005, 05:01 PM
#14
Software Eng.
Re: Save as Video File
As for your constants, I'll try an explain them as best I can:
WM_CAP_CONNECT
Initializes your capture window (created with capCreateCaptureWindow) with the video capture driver
WM_CAP_DISCONNECT
Disconnects the video capture driver (Think Open/Close), and free's up any used resources
WM_CAP_GET_FRAME
Takes a single snapshot (1 frame) from the camera, and displays it in the capture window
WM_CAP_COPY
Copies a single frame to the clipboard (So like the above, except it goes to the clipboard, not the window)
WM_USER
Generic message to act as a starting point for control-specific messages so that they do not interfere with standard windows messages.
WM_CAP_START
Same as WM_USER (reference point)
WM_CAP_DLG_VIDEOFORMAT
WM_CAP_DLG_VIDEOSOURCE
WM_CAP_DLG_VIDEODISPLAY
WM_CAP_DLG_VIDEOCOMPRESSION
The above 4 display various dialogs that allow the user to tweak with the video settings.
WM_CAP_GET_VIDEOFORMAT
WM_CAP_SET_VIDEOFORMAT
Gets/sets the format of the captured video (surprise). These messages go hand-in-hand with WM_CAP_DLG_VIDEOFORMAT. Caveats when you use these, as not all drivers support all formats (i.e. compressed video).
WM_CAP_SET_PREVIEW
Enables or disables previewing. Previewing allows the captured video to be displayed in the capture window (as opposed to a file).
MSDN should be able to provide a more in-depth answer, the above should get you started.
-
Jun 6th, 2005, 04:03 PM
#15
Thread Starter
PowerPoster
Re: Save as Video File
Ok I've ported this over to .NET since thats where I am going now, I have preview set up, can adjust frame rate, can take snapshots. I'm up to setting up recording but I cant find the values for these constants is there anywhere I can read up on this? I cant any resources of what to actually send with the contants, how to stop etc.
Any Help appriciated!
-
Jun 6th, 2005, 04:14 PM
#16
Software Eng.
Re: Save as Video File
To record, first send the WM_CAP_SET_SEQUENCE_SETUP message to the capture window, to toggle/set any options (time limit? fps? buffer settings? etc.) before you begin recording. This step isn't necessary but go through it to get a feel for the API.
Next, send the WM_CAP_FILE_SET_CAPTURE_FILE message to tell VB which file to save the captured output to.
Finally, send the WM_CAP_SEQUENCE to begin recording
To stop recording, send the WM_CAP_STOP message.
-
Jun 6th, 2005, 04:16 PM
#17
Software Eng.
Re: Save as Video File
Almost forgot, here are the constants for VB
VB Code:
Private Const WM_CAP_START As Long = WM_USER
Private Const WM_CAP_STOP As Long = (WM_CAP_START+ 68)
Private Const WM_CAP_SEQUENCE As Long = (WM_CAP_START+ 62)
Private Const WM_CAP_SET_SEQUENCE_SETUP As Long = (WM_CAP_START+ 64)
Private Const WM_CAP_FILE_SET_CAPTURE_FILEA As Long = (WM_CAP_START+ 20)
-
Jun 7th, 2005, 06:20 AM
#18
Thread Starter
PowerPoster
Re: Save as Video File
Ok thanks,
Let say I was using the WM_CAP_SET_SEQUENCE_SETUP constant how do i knwo what the wpram and LPram is supposed to represent? Is there any documentation on this?
-
Jun 7th, 2005, 07:01 AM
#19
Software Eng.
-
Jun 7th, 2005, 07:15 AM
#20
Thread Starter
PowerPoster
Re: Save as Video File
Ok thanks megatron for all the help,
I now have,
VB Code:
SendMessage(hHwnd, WM_CAP_FILE_SET_CAPTURE_FILEA, "C:\myvideo1.avi", 0)
SendMessage(hHwnd, WM_CAP_SEQUENCE, 0, 0)
Because i'm using vb.Net and the first parametr should be an integer, I'm getting a compile error on the line,
SendMessage(hHwnd, WM_CAP_FILE_SET_CAPTURE_FILEA, "C:\myvideo1.avi",0)
Do you know any way around this? I cant CINT because its just not possible to convert that string. to an integer.
Also because i cant tets it is my code correct? am i passing the correct parameters. I didnt have a clue what the, WM_CAP_SET_SEQUENCE_SETUP parameters were doing, well I did buts its In c code and i have no knowledge of c whatsoever.
Pino
-
Jun 7th, 2005, 01:17 PM
#21
Software Eng.
Re: Save as Video File
The filename is passed through lParam, not wParam.
So try
Code:
SendMessage(hHwnd, WM_CAP_FILE_SET_CAPTURE_FILEA, 0, "C:\myvideo1.avi")
-
Jun 7th, 2005, 01:33 PM
#22
Thread Starter
PowerPoster
Re: Save as Video File
Thanks megatron, only problem I am having is,
1) WM_CAP_SET_SEQUENCE_SETUP - Could you explain what the params are?
2) LPram is a Integer, and I am passing to it a string. Any because I am using .Net, I have option strict on. So I am getting a compiler Error.
Thanks Again
Pino
-
Jun 7th, 2005, 02:48 PM
#23
Thread Starter
PowerPoster
Re: Save as Video File
Ok i;ve fixed the question 2)
Ok its recording now but I cant do anything else while its recording? It locks out the program, and then if i click it stops recording. What are the ways around this? also here is my structure, is this right?
VB Code:
Private Structure CAPTUREPARMS
Dim dwRequestMicroSecPerFrame As String
Dim fMakeUserHitOKToCapture As Boolean
Dim wPercentDropForError As Integer
Dim fYield As Boolean
Dim dwIndexSize As String
Dim wChunkGranularity As Integer
Dim fUsingDOSMemory As Boolean
Dim wNumVideoRequested As Integer
Dim fCaptureAudio As Boolean
Dim wNumAudioRequested As Integer
Dim vKeyAbort As Integer
Dim fAbortLeftMouse As Boolean
Dim fAbortRightMouse As Boolean
Dim fLimitEnabled As Boolean
Dim wTimeLimit As Integer
Dim fMCIControl As Boolean
Dim fStepMCIDevice As Boolean
Dim dwMCIStartTime As String
Dim dwMCIStopTime As String
Dim fStepCaptureAt2x As Boolean
Dim wStepCaptureAverageFrames As Integer
Dim dwAudioBufferSize As String
Dim fDisableWriteCache As Boolean
Dim AVStreamMaster As Integer
End Structure
and then I am passing this to the widnow in the setup procedure like so....
VB Code:
SendMessage2(hHwnd, WM_CAP_SET_SEQUENCE_SETUP, Len(Caprams), Caprams)
Ignore the fact that it is sendmessage2 i had to create another instance of the api because i couldnt pass the structure through the last one becuas eit was declared as type string.
Ok so can anyone help me? I wnat it to record in the background, and it will be recording 60 minute clips. I noticed the file size was huge as well 126 megs for a 19 second clip. Can you reduce this?
Thanks
-
Jun 7th, 2005, 05:09 PM
#24
Software Eng.
Re: Save as Video File
Here's a few I thought of, right off the bat:
Have you tried lowering your preview rate? (fps)
Have you disabled audio? Since it streams in at raw wave formats, it might take up a lot of space. Ensure fCaptureAudio = 0 for CAPTUREPARAMS
Also try changing the formatting via the WM_CAP_SET_VIDEOFORMAT message. You can specify the resolution and colour depth, which is passed through a familiar BITMAPINFO structure. This structure contains another BITMAPINFOHEADER where you set these properties.
I.e.
VB Code:
Dim bmi As BITMAPINFO
With bmi.bmiHeader
.biSize = Len(bmi.bmiHeader)
.biPlanes = 1
'256 colours and small resolution of 160x240
.biBitCount = 8
.biWidth = 240
.biHeight = 160
End With
If SendMessage2(hHwnd, WM_CAP_SET_VIDEOFORMAT, Len(bmi), bmi) = 0 Then
MsgBox "Invalid format"
End if
Set the format after you're connected to a driver, but before you begin recording.
-
Jun 8th, 2005, 02:44 AM
#25
Thread Starter
PowerPoster
Re: Save as Video File
Ok thanks for the info, what abou the fact it will not run in the backround? can that be fixed? When i hit record it freezes out the rest of the app.
Pino
-
Jun 9th, 2005, 07:24 AM
#26
Software Eng.
Re: Save as Video File
Set the fYeild member of the CAPTUREPARMS structure to 1. This will run the capture window in separate thread.
-
Jun 9th, 2005, 09:58 AM
#27
Thread Starter
PowerPoster
Re: Save as Video File
It didnt make a differance,
VB Code:
Caprams.fYield = True
SendMessage2(hHwnd, WM_CAP_SET_SEQUENCE_SETUP, Len(Caprams), Caprams)
SendMessage(hHwnd, WM_CAP_FILE_SET_CAPTURE_FILEA, 0, FullFile)
SendMessage(hHwnd, WM_CAP_SEQUENCE, 0, CType(0, String))
I've read that on the msdn but when i try it it doenst seme to make a differance, with or without it.
Pino
-
Jun 9th, 2005, 03:54 PM
#28
Junior Member
Re: Save as Video File
This is how I changed the CapParams structure and then with the .fYield = False
will enable multi threading and then you applicatio wont freeze.
.fLimitEnabled = True
.wTimeLimit = 3
with the above 2 options you can stop the recording after a specified time.
My app works fine with this i am able to run 2 cameras now.
With CapParams
' // set the defaults we won't bother the user with
' show message after pre-roll
' .fMakeUserHitOKToCapture = -(True) ' - converts VB Boolean to C BOOL
' in case we use error callbacks later
.wPercentDropForError = 10
' fUsingDOSMemory is obsolete
.fUsingDOSMemory = False
' The number of video buffers should be enough to get through
' disk seeks and thermal recalibrations
.wNumVideoRequested = 32
' Do abort on the left mouse
'.fAbortLeftMouse = -(True)
' Do abort on the right mouse
'.fAbortRightMouse = -(True) '- converts VB boolean to C BOOL
' If wChunkGranularity is zero, the granularity will be set to the
' disk sector size.
.wChunkGranularity = 0
' use default
.dwAudioBufferSize = 0
' attempt to disable caching
.fDisableWriteCache = -(True)
' not using MCI
.fMCIControl = False
.fStepCaptureAt2x = False
' not multi-threading
.fYield = False
' request audio buffers
.wNumAudioRequested = 4 '10 is max limit
' //these parameters are loaded from registry
' If "AUDIO" = Trim$(UCase(GetSetting(App.Title, "preferences", "streammaster", "AUDIO"))) Then
' .AVStreamMaster = AVSTREAMMASTER_AUDIO 'use audio clock to synchronize AVI
' Else
.AVStreamMaster = AVSTREAMMASTER_NONE
' End If
'set index size of AVI file (max frames)
.dwIndexSize = Val(GetSetting(App.Title, "preferences", "maxframes", INDEX_15_MINUTES))
.fYield = True
' //Now set the parameters from the UserInput
' .dwRequestMicroSecPerFrame = microsSecFromFPS(Val(txtFps.Text))
.dwRequestMicroSecPerFrame = microsSecFromFPS(15)
.fCaptureAudio = False '-(CBool(chkAudio.Value))
.fLimitEnabled = True ' -(CBool(chkLimit.Value))
.wTimeLimit = 3 ' Val(txtSec.Text)
End With
Call capCaptureSetSetup(frmMain.capwnd, CapParams)
-
Apr 24th, 2007, 03:48 AM
#29
New Member
Re: Save as Video File
Hi,
@Pino: (i know, this thread ist really old )
Can you tell me how you solved this Problem?
2) LPram is a Integer, and I am passing to it a string. Any because I am using .Net, I have option strict on. So I am getting a compiler Error.
Do i have to declare another sendmessage with different params?
i have search the whole weekend but i didnt find any solution that worked for me.
Greetz
Pendler
-
May 21st, 2007, 03:43 PM
#30
New Member
Re: Save as Video File
This thread had a very help to my project, but i have another questions:
SendMessage(hHwnd, WM_CAP_FILE_SET_CAPTURE_FILEA, 0, "C:\myvideo1.avi") - this command don´t save a video file with name "myvideo1.avi", the file created is capture.avi.
I need see the cam while video file is created, is it possible?
Sorry about my bad english...
-
Dec 18th, 2007, 01:55 PM
#31
New Member
Re: Save as Video File
An old thread, but you can't imagine how useful it was for me!! THANKS TO ALL OF YOU!
Just a note:
After several days and lots of madness, I was one of those who couldn't make it save to the file I specified. BUT NOW I CAN! Just in case someone happens to be in the same situation:
1)In the beginning of my module, it reads
Code:
Option Explicit On
Option Strict On
Imports System.Runtime.InteropServices
2)SendMessage definition:
Code:
Declare Function SendMessage Lib "user32" Alias "SendMessageA" _
(ByVal hwnd As Integer, ByVal Msg As Integer, ByVal wParam As Integer, _
<MarshalAs(UnmanagedType.AsAny)> ByVal lParam As Object) As Integer
3)Finally:
Code:
Public Function OpenPreviewWindow(ByVal TargetPictureBox As PictureBox) As Boolean
' Open Preview window in picturebox
hWnd = capCreateCaptureWindowA("CamCap", WS_VISIBLE Or WS_CHILD, 0, 0, 320, 240, TargetPictureBox.Handle.ToInt32, 0)
' Connect to device
If (SendMessage(hWnd, WM_CAP_DRIVER_CONNECT, DeviceID, 0) <> 0) Then
'Set the preview scale
SendMessage(hWnd, WM_CAP_SET_SCALE, 1, 0)
'Set the preview rate in milliseconds
SendMessage(hWnd, WM_CAP_SET_PREVIEWRATE, 66, 0)
'Start previewing the image from the camera
SendMessage(hWnd, WM_CAP_SET_PREVIEW, 1, 0)
' Resize window to fit in picturebox
SetWindowPos(hWnd, HWND_BOTTOM, 0, 0, TargetPictureBox.Width, TargetPictureBox.Height, SWP_NOMOVE Or SWP_NOZORDER)
Return True
Else
' Error connecting to device. close window
DestroyWindow(hWnd)
Return False
End If
End Function
Public Sub StartRecording()
Dim FileName As String
FileName = Application.StartupPath & "\" & Application.ProductName & ".avi"
SendMessage(hWnd, WM_CAP_FILE_SET_CAPTURE_FILEA, 0, FileName)
SendMessage(hWnd, WM_CAP_SEQUENCE, 0, 0)
End Sub
Public Sub ClosePreviewWindow(ByVal RecordingVideo As Boolean)
' Stop capture
SendMessage(hWnd, WM_CAP_STOP, 0, 0)
' Disconnect from device
SendMessage(hWnd, WM_CAP_DRIVER_DISCONNECT, DeviceID, 0)
' Close window
DestroyWindow(Hwnd)
End Sub
I hope this is useful for someone!
-
Dec 18th, 2007, 02:16 PM
#32
Re: Save as Video File
Welcome to the forums. 
Thanks for sharing your code.
-
Dec 19th, 2007, 04:09 AM
#33
Thread Starter
PowerPoster
Re: Save as Video File
I'll take a look at this as its somthing I dropped and never came back to.
Thanks
-
Dec 19th, 2007, 07:15 AM
#34
New Member
Re: Save as Video File
Cheers Pino!
Where did you leave it? Does it still froze when you record video?
I have managed to fyeild it, but still my video quality is not superb, and haven't tried yet to compress it (compressing using DivX or wathever WITHOUT dialog boxes would be just great!)
-
Jul 23rd, 2008, 11:07 AM
#35
Junior Member
Re: Save as Video File
[BUMP]
Bumping this thread in the hope someone will be able to help out!
i'm using this structure followed by the relevent sub (all variable and API are declared properly)
Code:
Public Structure CAPTUREPARMS
Dim dwRequestMicroSecPerFrame As Long
Dim fMakeUserHitOKToCapture As Long
Dim wPercentDropForError As Long
Dim fYield As Long
Dim dwIndexSize As Long
Dim wChunkGranularity As Long
Dim fUsingDOSMemory As Long
Dim wNumVideoRequested As Long
Dim fCaptureAudio As Long
Dim wNumAudioRequested As Long
Dim vKeyAbort As Long
Dim fAbortLeftMouse As Boolean
Dim fAbortRightMouse As Boolean
Dim fLimitEnabled As Long
Dim wTimeLimit As Long
Dim fMCIControl As Long
Dim fStepMCIDevice As Long
Dim dwMCIStartTime As Long
Dim dwMCIStopTime As Long
Dim fStepCaptureAt2x As Long
Dim wStepCaptureAverageFrames As Long
Dim dwAudioBufferSize As Long
Dim fDisableWriteCache As Long
Dim AVStreamMaster As Long
End Structure
Public Sub StartRecording(ByVal tgt As PictureBox)
Dim MyParams As CAPTUREPARMS
With MyParams
.fAbortLeftMouse = 0
.fAbortRightMouse = 0
.fCaptureAudio = 0
.fYield = 0
End With
hWnd = capCreateCaptureWindowA(0, WS_VISIBLE Or WS_CHILD, 0, 0, 0, 0, tgt.Handle.ToInt32, 0)
Dim a As Boolean
a = SendMessage(hWnd, WM_CAP_DRIVER_CONNECT, 0, 0)
a = SendMessage(hWnd, WM_CAP_SET_SCALE, True, 0)
a = SendMessage(hWnd, WM_CAP_DLG_VIDEOCOMPRESSION, 0, 0)
a = SendMessage(hWnd, WM_CAP_FILE_SET_CAPTURE_FILE, 0, "C:\myvideo1.avi")
a = SendMessage(hWnd, WM_CAP_SET_SEQUENCE_SETUP, 96, MyParams)
a = SendMessage(hWnd, WM_CAP_SEQUENCE, 0, 0)
End Sub
The probleme is that if I REM the line
Code:
SendMessage(hWnd, WM_CAP_SET_SEQUENCE_SETUP, 96, MyParams)
the file is save fine and can be played back no problem, but if I dont REM it , it creates an empty file that cannot be played back
also the command Len(MyParams) returns a value of 192 but if I use a value above 96 the command line returns "False" 192/2 = 96...?? unicode character?
can anyone see what i'm doing wrong?
Thanks
Stormer
-
Jul 24th, 2008, 08:09 AM
#36
Junior Member
Re: Save as Video File
Found my own answer
Code:
With MyParams
.dwRequestMicroSecPerFrame = 66667
.fMakeUserHitOKToCapture = 0
.wPercentDropForError = 10
.fYield = 1
.dwIndexSize = 324000
.wChunkGranularity = 0
.wNumAudioRequested = 10
.wNumVideoRequested = 10
.fCaptureAudio = 0
.dwAudioBufferSize = 10
.fAbortLeftMouse = 0
.fAbortRightMouse = 0
.fStepCaptureAt2x = 0
.fLimitEnabled = 0
.wTimeLimit = 0
.fMCIControl = 0
.wStepCaptureAverageFrames = 5
.dwAudioBufferSize = 10
End With
seems you have to fill most fields for this to work! i used the above definition and it worked
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|