Hi
ich hab ein Problem und zwar mache ich ein programm zum aufnehmen von videos, momentan hab ich bei mir eingestellt das er mit 5 fps aufnimmt
bei meinem freund habe ich es dann getestet mit 30 und da war es zu schnell als würde man vorspulen und bei ihm mit 5 war es zu langsam
meine frage ist kann ich einstellen das er das automatisch die richtige fps einstellt??
in zeile 55 kann man sie verändern. Vor @DesktopWidth.
hier das skript
Spoiler anzeigen
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <AVIWriter.au3>
#include <File.au3>
#include <ScreenCapture.au3>
#include <SliderConstants.au3>
#include <GUIListBox.au3>
#include <EditConstants.au3>
Global $Capture
[/autoit] [autoit][/autoit] [autoit]HotKeySet("^v", "_startvideo")
HotKeySet("{ESC}", "_close")
HotKeySet("^p")
;_StartAviLibrary()
;$avi = _CreateAvi("C:\Crocoframe\Videos\" & "\crocoframe.avi", 5,200,200)
;Break (0)
IniWrite ("confic.ini", "C:\Crocoframe\" , "AVINAME", "crocoframe2")
DirCreate("C:\Crocoframe\")
DirCreate("C:\Crocoframe\Videos\")
DirCreate("C:\Crocoframe\EasyScreen\")
DirCreate("C:\Crocoframe\EasyScreen\Banner\")
#region ### START Koda GUI section ### Form=
$Form1 = GUICreate("CrocoFrame © CrocoJunk ", 548, 250, 192, 124)
$Pic1 = GUICtrlCreatePic("", 0, 0, 545, 89, BitOR($SS_NOTIFY, $WS_GROUP, $WS_CLIPSIBLINGS))
$Label1 = GUICtrlCreateLabel("Video aufnehmen", 8, 112, 87, 17)
$Button1 = GUICtrlCreateButton("Play (STRG+V) ", 120, 112, 100, 25, $WS_GROUP)
$Label3 = GUICtrlCreateLabel("Video stoppen", 8, 192, 72, 17)
$Button3 = GUICtrlCreateButton("Video Beenden (ESC)", 120, 200, 120, 25, $WS_GROUP)
$check = GUICtrlCreateCheckbox("Video starten nachdem aufgenommen", 256, 120, 193, 17)
$check2 = GUICtrlCreateCheckbox("Video starten nach", 256, 168, 113, 17)
$menu1 = GUICtrlCreateMenu("Datei")
$item1 = GUICtrlCreateMenuItem("Optionen", $menu1)
$item2 = GUICtrlCreateMenuItem("Easy Screen", $menu1)
GUICtrlCreateInput("", 376, 168, 57, 21)
$Label4 = GUICtrlCreateLabel("Sekunden", 448, 168, 53, 17)
GUISetState(@SW_SHOW)
#endregion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
filedelete ("C:\Crocoframe\Videos\crocoframe.avi")
If Not @error Then
MsgBox(64, "Video", "Das Video startet jetz!")
EndIf
$Capture = True
_StartAviLibrary()
$avi = _CreateAvi("C:\Crocoframe\Videos\" & "\crocoframe.avi", 5, @DesktopWidth, @DesktopHeight)
AdlibRegister("_close",30000) ;vorsichtshalber Buttons funktionieren nicht Hotkey ESC klappt aber
ConsoleWrite("STARTED" & @CRLF)
While $Capture
$m = MouseGetPos()
$hBmp = _ScreenCapture_Capture("", 0,0,-1,-1)
_AddHBitmapToAvi($avi, $hBmp)
_WinAPI_DeleteObject($hBmp)
Sleep(200)
WEnd
ConsoleWrite("STOPPED" & @CRLF)
AdlibUnRegister("_close")
Case $Button3
ConsoleWrite("STOP" & @CRLF)
_close()
Case $check
if BitAND(GUICtrlRead($check), $GUI_CHECKED) = $GUI_CHECKED Then
Run ("Windows Media Player.exe" & "C:\Crocoframe\Videos\crocoframe.avi")
EndIf
Case $check2
Case $item1
_optionen()
Case $item2
_screen()
EndSwitch
WEnd
Func _startvideo()
filedelete ("C:\Crocoframe\Videos\crocoframe.avi")
If Not @error Then
MsgBox(64, "Video", "Das Video startet jetz!")
EndIf
$Capture = True
_StartAviLibrary()
$avi = _CreateAvi("C:\Crocoframe\Videos\" & "\crocoframe.avi", 5, @DesktopWidth, @DesktopHeight)
AdlibRegister("_close",30000) ;vorsichtshalber Buttons funktionieren nicht Hotkey ESC klappt aber
ConsoleWrite("STARTED" & @CRLF)
While $Capture
$m = MouseGetPos()
$hBmp = _ScreenCapture_Capture("", 0,0,-1,-1)
_AddHBitmapToAvi($avi, $hBmp)
_WinAPI_DeleteObject($hBmp)
Sleep(200)
WEnd
ConsoleWrite("STOPPED" & @CRLF)
AdlibUnRegister("_close")
EndFunc
Func _optionen()
EndFunc
Func _screen()
EndFunc
Func _close()
_CloseAvi($avi)
_StopAviLibrary()
$Capture = False
EndFunc