AutoHotkey Community

It is currently May 27th, 2012, 11:00 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 34 posts ]  Go to page Previous  1, 2, 3
Author Message
 Post subject:
PostPosted: July 4th, 2010, 11:19 am 
thanks :D :) :o :shock: :? 8) :lol: :P :oops: :wink:


Report this post
Top
  
Reply with quote  
 Post subject: vfw save as avi
PostPosted: April 24th, 2011, 8:59 pm 
I took a look at this script and I have a little backround with VB so I am working on getting more functionality for this script


Code:
 ; opens a video compression dialog
SendMessage ,WM_CAP_DLG_VIDEOCOMPRESSION, 0, 0, , ahk_id %capHwnd%


Code:
BeginCapature:
    VarSetCapacity(CAP_PARAMS, 96) ;DATA STRUCTURE
     SendMessage, WM_CAP_GET_SEQUENCE_SETUP, 92,&CAP_PARAMS,,  ahk_id %capHwnd% ;load the structure into CAP_PARAMS
   
     dwRequestMicroSecPerFrame = (1 * (10 ^ 6)) / 30 ; 30 Frames per second
   NumPut(dwRequestMicroSecPerFrame, CAP_PARAMS , 0,"Int") ; save into first long in CAP_PARAMS
 
   fMakeUserHitOKToCapture = FALSE
   NumPut(fMakeUserHitOKToCapture,CAP_PARAMS, 4,"Int") ; save into second long in CAP_PARAMS
    NumPut(0,CAP_PARAMS, 92,"Int") ;BOOL SINC TO AUDEO Y  makes sound sinc up with video
    SendMessage, WM_CAP_GET_SEQUENCE_SETUP, 92,&CAP_PARAMS,,  ahk_id %capHwnd% ;tell it do set up for capture
    SendMessage, WM_CAP_SEQUENCE, 0, 0, ,  ahk_id %capHwnd% ;Start Capturing
RETURN


You'll have to hit esc or click either mouse to stop recording. There is a way around this by seting up a callback. I haven't figure it out yet because i dont know ahk that well and i just started on this last night. 2 hrs of work to translate vb into ahk.

anyway after you stop recording you have to save the data to a file....
Code:
SenToVID:
    imagefile = %A_Desktop%\A.AVI
      

    SendMessage, WM_CAP_FILE_SAVEAS , 0, &imagefile, , ahk_id %capHwnd%
return ;Copy video from swap file into a file



i plan to work on this a little more over the next few days
thx for the start!!!!!!!!

:)


Report this post
Top
  
Reply with quote  
 Post subject: oyeh
PostPosted: April 24th, 2011, 9:09 pm 
all the const for vfw youll need to add some for the vid capture to avi

Code:

  WM_USER := 0x0400
  WM_CAP_START := WM_USER
  WM_CAP_GET_CAPSTREAMPTR := WM_CAP_START + 1

  WM_CAP_SET_CALLBACK_ERROR:= WM_CAP_START + 2
  WM_CAP_SET_CALLBACK_STATUS := WM_CAP_START + 3
  WM_CAP_SET_CALLBACK_YIELD := WM_CAP_START + 4
  WM_CAP_SET_CALLBACK_FRAME := WM_CAP_START + 5
  WM_CAP_SET_CALLBACK_VIDEOSTREAM := WM_CAP_START + 6
  WM_CAP_SET_CALLBACK_WAVESTREAM := WM_CAP_START + 7
  WM_CAP_GET_USER_DATA := WM_CAP_START + 8
  WM_CAP_SET_USER_DATA := WM_CAP_START + 9
   
  WM_CAP_DRIVER_CONNECT := WM_CAP_START + 10
  WM_CAP_DRIVER_DISCONNECT := WM_CAP_START + 11
  WM_CAP_DRIVER_GET_NAME := WM_CAP_START + 12
  WM_CAP_DRIVER_GET_VERSION := WM_CAP_START + 13
  WM_CAP_DRIVER_GET_CAPS := WM_CAP_START + 14

  WM_CAP_FILE_SET_CAPTURE_FILE := WM_CAP_START + 20
  WM_CAP_FILE_GET_CAPTURE_FILE := WM_CAP_START + 21
  WM_CAP_FILE_ALLOCATE := WM_CAP_START + 22
  WM_CAP_FILE_SAVEAS := WM_CAP_START + 23
  WM_CAP_FILE_SET_INFOCHUNK := WM_CAP_START + 24
  WM_CAP_FILE_SAVEDIB := WM_CAP_START + 25

  WM_CAP_EDIT_COPY := WM_CAP_START + 30

  WM_CAP_SET_AUDIOFORMAT := WM_CAP_START + 35
  WM_CAP_GET_AUDIOFORMAT := WM_CAP_START + 36

  WM_CAP_DLG_VIDEOFORMAT := WM_CAP_START + 41
  WM_CAP_DLG_VIDEOSOURCE := WM_CAP_START + 42
  WM_CAP_DLG_VIDEODISPLAY := WM_CAP_START + 43
  WM_CAP_GET_VIDEOFORMAT := WM_CAP_START + 44
  WM_CAP_SET_VIDEOFORMAT := WM_CAP_START + 45
  WM_CAP_DLG_VIDEOCOMPRESSION := WM_CAP_START + 46

  WM_CAP_SET_PREVIEW := WM_CAP_START + 50
  WM_CAP_SET_OVERLAY := WM_CAP_START + 51
  WM_CAP_SET_PREVIEWRATE := WM_CAP_START + 52
  WM_CAP_SET_SCALE := WM_CAP_START + 53
  WM_CAP_GET_STATUS := WM_CAP_START + 54
  WM_CAP_SET_SCROLL := WM_CAP_START + 55

  WM_CAP_GRAB_FRAME := WM_CAP_START + 60
  WM_CAP_GRAB_FRAME_NOSTOP := WM_CAP_START + 61

  WM_CAP_SEQUENCE := WM_CAP_START + 62
  WM_CAP_SEQUENCE_NOFILE := WM_CAP_START + 63
  WM_CAP_SET_SEQUENCE_SETUP := WM_CAP_START + 64
  WM_CAP_GET_SEQUENCE_SETUP := WM_CAP_START + 65
  WM_CAP_SET_MCI_DEVICE := WM_CAP_START + 66
  WM_CAP_GET_MCI_DEVICE := WM_CAP_START + 67
  WM_CAP_STOP := WM_CAP_START + 68
  WM_CAP_ABORT := WM_CAP_START + 69

  WM_CAP_SINGLE_FRAME_OPEN := WM_CAP_START + 70
  WM_CAP_SINGLE_FRAME_CLOSE := WM_CAP_START + 71
  WM_CAP_SINGLE_FRAME := WM_CAP_START + 72

  WM_CAP_PAL_OPEN := WM_CAP_START + 80
  WM_CAP_PAL_SAVE := WM_CAP_START + 81
  WM_CAP_PAL_PASTE := WM_CAP_START + 82
  WM_CAP_PAL_AUTOCREATE := WM_CAP_START + 83
  WM_CAP_PAL_MANUALCREATE := WM_CAP_START + 84

;/ Following added post VFW 1.1
 WM_CAP_SET_CALLBACK_CAPCONTROL := WM_CAP_START + 85

;'// Defines end of the message range
WM_CAP_END := WM_CAP_SET_CALLBACK_CAPCONTROL


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: November 1st, 2011, 11:46 pm 
Interesting, Evilspy, could this become basis for a Client to Client video session? A video chat over IP??

This is something the group has been looking for a long time.


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 34 posts ]  Go to page Previous  1, 2, 3

All times are UTC [ DST ]


Who is online

Users browsing this forum: BrandonHotkey, Edd, Exabot [Bot], HotkeyStick, Yahoo [Bot] and 15 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group