Jump to content

UEZ

MVPs
  • Posts

    7,530
  • Joined

  • Last visited

  • Days Won

    95

UEZ last won the day on April 2

UEZ had the most liked content!

About UEZ

  • Birthday 12/03/2007

Profile Information

  • Member Title
    Never say never
  • Location
    Germany
  • Interests
    Computer, watching movies, football (soccer), being lazy :-)

Recent Profile Visitors

11,902 profile views

UEZ's Achievements

  1. This is what I expected because what I understood is that "Camera" is also based on Media Foundation (Frame-Server) API.
  2. You can disable "Click-through" in Tray icon -> Recorder -> WebCam settings ->Click-through. The DLL works with Media Foundation (Frame-Server) API which is probably not compatible with generic Microsoft Windows driver. Other apps may use DirectShow to display WebCam. Is Windows "Camera" built-in app working with your WebCam? You may update the drivers if available. Thanks for testing again. Coming soon a trim editor for recorded video inkl. reencode (4:2:0 (YUV) recorded video only).
  3. Salut wakillion, I updated the version to AirCapRec v0.9.3 beta build 2026-06-05. Does your webcam show a picture in the Windows Camera app? Does it work in any other apps? In AirCapRec: enable Debug logging in Settings, then toggle the webcam (Ctrl+Alt+W) and send me the new AirCapRec_debug.log — it now logs the webcam state. Is it a built-in laptop cam or an external USB one? Brand/model? Does the webcam preview window show a black box in the corner (cam initialized but no image), or nothing at all? Any privacy/antivirus camera blocker active (Windows camera privacy setting, or third-party security)? I saw in the logfile a problem with your display info: It should display 4k and 300%. Please update and test again and post the log. MERCI!
  4. You can create the grid manually without loading it from a file: #include <GDIPlus.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Opt("MustDeclareVars", 1) Global $g_hImage, $g_idPic Example() Func Example() Local $iW = 800, $iH = 400 ; Gui client width & height _GDIPlus_Startup() Local $xGrid = 20, $yGrid = 20 Local $hBitmap = _GDIPlus_BitmapCreateFromScan0($xGrid, $yGrid) Local $hGfx = _GDIPlus_ImageGetGraphicsContext($hBitmap), $hPen = _GDIPlus_PenCreate(0xFF000000, 2) _GDIPlus_GraphicsClear($hGfx, 0xFFFFFFFF) _GDIPlus_GraphicsDrawLine($hGfx, 0, 0, $xGrid, 0, $hPen) _GDIPlus_GraphicsDrawLine($hGfx, 0, 1, 0, $yGrid, $hPen) _GDIPlus_PenDispose($hPen) _GDIPlus_GraphicsDispose($hGfx) Local $hTexture = _GDIPlus_TextureCreate($hBitmap) _GDIPlus_BitmapDispose($hBitmap) $g_hImage = _GDIPlus_BitmapCreateFromScan0($iW, $iH) $hGfx = _GDIPlus_ImageGetGraphicsContext($g_hImage) _GDIPlus_GraphicsClear($hGfx, 0xFFFFFFFF) _GDIPlus_GraphicsFillRect($hGfx, 0, 0, $iW, $iH, $hTexture) _GDIPlus_BrushDispose($hTexture) _GDIPlus_GraphicsDispose($hGfx) Local $hGUI = GUICreate("Test Grid #2", $iW, $iH, -1, -1, $WS_OVERLAPPEDWINDOW, $WS_EX_COMPOSITED) $g_idPic = GUICtrlCreatePic("", 0, 0, $iW, $iH) GUICtrlSetResizing(-1, $GUI_DOCKAUTO) ; or $GUI_DOCKBORDERS ? Update_Pic($g_hImage) GUISetState(@SW_SHOW) GUIRegisterMsg($WM_SIZE, "WM_SIZE") While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE _GDIPlus_ImageDispose($g_hImage) _GDIPlus_Shutdown() GUIDelete() Exit EndSwitch WEnd EndFunc ;==>Example Func Update_Pic($hHandle) Local $hBitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hHandle) Local $hPrevImage = GUICtrlSendMsg($g_idPic, 0x0172, 0, $hBitmap) ; $STM_SETIMAGE = 0x0172, $IMAGE_BITMAP = 0 If $hPrevImage Then _WinAPI_DeleteObject($hPrevImage); delete prev image if any (help file) _WinAPI_DeleteObject($hBitmap) EndFunc ;==>Update_Pic Func WM_SIZE($hWnd, $iMsg, $wParam, $lParam) Local $hImage_resized = _GDIPlus_ImageResize($g_hImage, BitAND($lParam, 0xFFFF), BitShift($lParam, 16), 2) ; high-quality mode Update_Pic($hImage_resized) _GDIPlus_ImageDispose($hImage_resized) Return "GUI_RUNDEFMSG" EndFunc ;==>WM_SIZE
  5. @wakillon I can't thank you enough—you're the only tester! Indeed, 4:4:4 is flickering for me, too. Seems that I changed something without testing it. Hmmm. It's also strange that I can't see the system info section in the log file, even though you've obviously tested the latest version (AirCapRec v0.9.3 beta build 2026-06-02). I’ll include the app version number in the log so you can see which version was used. === AirCapRec session started 06-03-2026 20:19:02 === Log file: C:\_BZ25LN\Coding\FreeBASIC\__UEZ\_Tools\AirCapRec\AirCapRec_debug.log [sysinfo] Windows 10 Enterprise 25H2 (10.0 Build 26200.8390) [sysinfo] Architecture: x64 / 64-bit process [sysinfo] CPU: Intel(R) Core(TM) Ultra 5 135U (14 logical cores) [sysinfo] RAM: 15.5 GB (15892 MB) free 2.0 GB (2077 MB) (load 86%) [sysinfo] Commit/Pagefile: total 32.6 GB (33414 MB) free 7.3 GB (7504 MB) [sysinfo] Disk (EXE): C:\ free 20.5 GB (21047 MB) of 235.0 GB (240695 MB) [sysinfo] Disk (System): C:\ free 20.5 GB (21047 MB) of 235.0 GB (240695 MB) [sysinfo] Display: primary 1920x1080 virtual 1920x1080 monitors 1 DPI 96 (100%) [sysinfo] GPU: Intel(R) Graphics [sysinfo] Locale: de-DE [sysinfo] Camera(s): 1 [sysinfo] [0] Integrated Webcam [sysinfo] Uptime: 79h 19m [285548187] HighlightClicks=1 Origin=(0,0) MMCSS=1 [285548187] Audio requested: sys=1 mic=0 bitrate=128000 [285549265] Audio_Init OK [285549265] SR_Init OK: C:\_BZ25LN\Coding\FreeBASIC\__UEZ\_Tools\AirCapRec\Capture_20260603_201901.mp4 30fps CRF=32 preset=superfast tune=zerolatency audio=1 [285549265] SR_Start OK [285549281] Recording-Thread started [285549281] MMCSS AvSetMmThreadCharacteristicsW('Capture') = OK [285550609] Opening MP4: C:\_BZ25LN\Coding\FreeBASIC\__UEZ\_Tools\AirCapRec\Capture_20260603_201901.mp4 (1920x1080 @ 30fps) [285550609] MP4Min_Open OK [285555625] Ring stats: produced=72 dropped=60 consumed=70 filled=2 encFrames=149 repeated=50 duped=29 [285560671] Ring stats: produced=191 dropped=130 consumed=189 filled=2 encFrames=300 repeated=73 duped=38 [285561000] SR_Stop called - video frames=310 audio frames=443 [285561000] Final ring stats: produced=198 dropped=132 consumed=197 filled=1 [285561046] Recording-Thread done: total frames=311 repeated=74 realDuration=10.41174930002308s [285567296] HighlightClicks=1 Origin=(0,0) MMCSS=1 [285567296] Audio requested: sys=1 mic=0 bitrate=128000 [285567296] Audio_Init OK [285567296] SR_Init OK: C:\_BZ25LN\Coding\FreeBASIC\__UEZ\_Tools\AirCapRec\Capture_20260603_201922.mp4 30fps CRF=32 preset=superfast tune=zerolatency audio=1 [285567296] SR_Start OK [285567296] Recording-Thread started [285567296] MMCSS AvSetMmThreadCharacteristicsW('Capture') = OK [285567312] Opening MP4: C:\_BZ25LN\Coding\FreeBASIC\__UEZ\_Tools\AirCapRec\Capture_20260603_201922.mp4 (1920x1080 @ 30fps) [285567312] MP4Min_Open OK [285572312] Ring stats: produced=135 dropped=51 consumed=133 filled=2 encFrames=149 repeated=16 duped=0 [285577312] Ring stats: produced=263 dropped=98 consumed=263 filled=0 encFrames=299 repeated=36 duped=0 [285577718] SR_Stop called - video frames=311 audio frames=481 [285577718] Final ring stats: produced=276 dropped=102 consumed=274 filled=2 [285577781] Recording-Thread done: total frames=312 repeated=37 realDuration=10.45726320001995s [285582031] Drained 0 leftover slot(s) before cleanup === session ended === Thanks so much for your feedback! Edit: 4:4:4 flicker bug found and fixed -> new version uploaded
  6. Error return value from __GDIPlus_ImageAttributesSetImageWrapMode() according to MS can be: Global Enum $Ok = 0, $GenericError, $InvalidParameter, $OutOfMemory, $ObjectBusy, $InsufficientBuffer, _ $NotImplemented, $Win32Error, $WrongState, $Aborted, $FileNotFound, $ValueOverflow, $AccessDenied, _ $UnknownImageFormat, $FontFamilyNotFound, $FontStyleNotFound, $NotTrueTypeFont, _ $UnsupportedGdiplusVersion, $GdiplusNotInitialized, $PropertyNotFound, $PropertyNotSupported, $ProfileNotFound
  7. Since I can only test on my own machine I'd really appreciate if you could give it a spin on yours. Please enable "Debug logging" in Settings before testing — if something goes wrong the log now captures system info and detailed errors, which makes it much easier to track down. Things to try: • Start / stop / pause a recording (try different monitors or a custom region if you have multi-monitor) • Toggle the live zoom lens during and outside of recording • If available, enable the webcam overlay and switch corners / sizes (rmb on webcam window) • Take a screenshot while recording • Check behavior at high DPI (scaling > 100%) on different monitors, if available If anything crashes, freezes, or looks off, please post the AirCapRec_debug.log (next to the EXE, or in %TEMP%). Download link: AirCapRec Thanks!
  8. Indeed _GDIPlus_ImageAttributesDispose($hIA) is missing in _GDIPlus_ImageResize() after / before _GDIPlus_GraphicsDispose($hBmpCtxt), which can lead to memory leaks when called multible times. @jpm can you fix it please?
  9. Func _GDIPlus_ImageResize($hImage, $iNewWidth, $iNewHeight, $iInterpolationMode = $GDIP_INTERPOLATIONMODE_HIGHQUALITYBICUBIC) Local $iWidth = _GDIPlus_ImageGetWidth($hImage) If @error Then Return SetError(1, 0, 0) Local $iHeight = _GDIPlus_ImageGetHeight($hImage) If @error Then Return SetError(2, 0, 0) Local $hBitmap = _GDIPlus_BitmapCreateFromScan0($iNewWidth, $iNewHeight) If @error Then Return SetError(3, 0, 0) Local $hBmpCtxt = _GDIPlus_ImageGetGraphicsContext($hBitmap) _GDIPlus_GraphicsSetInterpolationMode($hBmpCtxt, $iInterpolationMode) _GDIPlus_GraphicsSetPixelOffsetMode($hBmpCtxt, $GDIP_PIXELOFFSETMODE_HIGHQUALITY) Local $hIA = _GDIPlus_ImageAttributesCreate() __GDIPlus_ImageAttributesSetImageWrapMode($hIA) If @error Then _GDIPlus_ImageAttributesDispose($hIA) _GDIPlus_GraphicsDispose($hBmpCtxt) _GDIPlus_BitmapDispose($hBitmap) Return SetError(4, 0, 0) EndIf _GDIPlus_GraphicsDrawImageRectRect($hBmpCtxt, $hImage, 0, 0, $iWidth, $iHeight, 0, 0, $iNewWidth, $iNewHeight, $hIA) _GDIPlus_GraphicsDispose($hBmpCtxt) Return $hBitmap EndFunc ;==>_GDIPlus_ImageResize Func _GDIPlus_ImageScale($hImage, $iScaleW, $iScaleH, $iInterpolationMode = $GDIP_INTERPOLATIONMODE_HIGHQUALITYBICUBIC) Local $iWidth = _GDIPlus_ImageGetWidth($hImage) If @error Then Return SetError(1, 0, 0) Local $iHeight = _GDIPlus_ImageGetHeight($hImage) If @error Then Return SetError(2, 0, 0) Local $iNewWidth = $iWidth * $iScaleW Local $iNewHeight = $iHeight * $iScaleH Local $hBitmap = _GDIPlus_BitmapCreateFromScan0($iNewWidth, $iNewHeight) If @error Then Return SetError(3, 0, 0) Local $hBmpCtxt = _GDIPlus_ImageGetGraphicsContext($hBitmap) _GDIPlus_GraphicsSetInterpolationMode($hBmpCtxt, $iInterpolationMode) _GDIPlus_GraphicsSetPixelOffsetMode($hBmpCtxt, $GDIP_PIXELOFFSETMODE_HIGHQUALITY) Local $hIA = _GDIPlus_ImageAttributesCreate() __GDIPlus_ImageAttributesSetImageWrapMode($hIA) If @error Then _GDIPlus_ImageAttributesDispose($hIA) _GDIPlus_GraphicsDispose($hBmpCtxt) _GDIPlus_BitmapDispose($hBitmap) Return SetError(4, 0, 0) EndIf _GDIPlus_GraphicsDrawImageRectRect($hBmpCtxt, $hImage, 0, 0, $iWidth, $iHeight, 0, 0, $iNewWidth, $iNewHeight, $hIA) _GDIPlus_ImageAttributesDispose($hIA) _GDIPlus_GraphicsDispose($hBmpCtxt) Return $hBitmap EndFunc ;==>_GDIPlus_ImageScale I can see it in both functions. 😉
  10. With resize I mean really resize of the grid. My example above fills only the grid but doesn't resize it. You can also resize the grid when GUI resizes. That means the grid becomes smaller / bigger on GUI resize.
  11. Is the grid just for demonstration purposes, or is that really the background you want to use? Should the grid resize when the GUI is resized? Here the version without resizing the grid on GUI resize (modified one of my old scripts): ;Coded by UEZ build 2026-05-31 #include <Constants.au3> #include <GDIPlus.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Global Const $STM_SETIMAGE = 0x0172 Global $sImage = "Grid.png" _GDIPlus_Startup() Global $hBmp = _GDIPlus_BitmapCreateFromFile($sImage), $hTexture = _GDIPlus_TextureCreate($hBmp, 0) Global $iW = _GDIPlus_ImageGetWidth($hBmp), $iH = _GDIPlus_ImageGetHeight($hBmp) Global $hGUI = GUICreate("Test", $iW, $iH, -1, -1, BitOR($GUI_SS_DEFAULT_GUI, $WS_SIZEBOX, $WS_THICKFRAME), $WS_EX_COMPOSITED) Global $idPic = GUICtrlCreatePic("", 0, 0, $iW, $iH) GUICtrlSetResizing(-1, $GUI_DOCKAUTO) Global $hHBitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hBmp) Global $hB = GUICtrlSendMsg($idPic, $STM_SETIMAGE, $IMAGE_BITMAP, $hHBitmap) If $hB Then _WinAPI_DeleteObject($hB) GUISetState(@SW_SHOW) GUIRegisterMsg($WM_SIZE, "WM_SIZE") While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE GUIRegisterMsg($WM_SIZE, "") _WinAPI_DeleteObject($hHBitmap) _GDIPlus_BrushDispose($hTexture) _GDIPlus_BitmapDispose($hBmp) _GDIPlus_Shutdown() GUIDelete() Exit EndSwitch WEnd Func WM_SIZE($hWnd, $Msg, $wParam, $lParam) #forceref $Msg, $wParam, $lParam Local $aSize = ControlGetPos($hWnd, "", $idPic) Local $hBitmap = _GDIPlus_BitmapCreateFromScan0($aSize[2], $aSize[3]) Local $hContext = _GDIPlus_ImageGetGraphicsContext($hBitmap) _GDIPlus_GraphicsSetInterpolationMode($hContext, 0) _GDIPlus_GraphicsFillRect($hContext, 0, 0, $aSize[2], $aSize[3], $hTexture) _GDIPlus_GraphicsDispose($hContext) Local $hHBitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hBitmap) Local $hB = GUICtrlSendMsg($idPic, $STM_SETIMAGE, $IMAGE_BITMAP, $hHBitmap) If $hB Then _WinAPI_DeleteObject($hB) _WinAPI_DeleteObject($hHBitmap) _GDIPlus_BitmapDispose($hBitmap) Return "GUI_RUNDEFMSG" EndFunc
  12. I found the bug: I changed from CoInitializeEx(NULL, COINIT_MULTITHREADED) to CoInitializeEx(NULL, COINIT_APARTMENTTHREADED). WGC (Windows.Graphics.Capture) is based on WinRT, and WinRT objects are fundamentally designed for MTA. Bug should be fixed know.
  13. Sorry, there is a nasty bug in 0.7.7.0 -> when you start, stop and start again it crashes... 🤔
  14. Thanks for the complete set of logs! Here's the full picture across all four configurations: All recordings have the correct duration — no more drift, the file matches real time in every case. 4K @ 30 fps with High 4:4:4 is the best setting for your system — lowest drop rate (23%) and almost no duplicated frames (7%). This gives you the cleanest capture. Interestingly, switching to High 4:2:0 doesn't help — it actually increases drops and dupes. That's because 4:2:0 forces an extra color conversion step (BGRA→YUV) inside x264 which costs additional CPU time, while 4:4:4 takes the raw pixel data directly with no conversion overhead. 4K @ 60 fps stays limited to ~30 real frames per second regardless of profile — this is a WGC API throughput ceiling on your hardware, not something AirCapRec can work around. Good catch — it's counterintuitive but makes sense once you look at the logs: At 60 fps, about 60% of your frames are duplicates (WGC only delivers ~30 real frames per second). x264 is very efficient at encoding duplicate frames — a P-frame that says "nothing changed" costs almost zero bytes. So 60 fps = lots of near-free frames. At 30 fps, nearly every frame is a unique capture with real pixel changes. Each frame needs significantly more bits to encode. So 30 fps = fewer frames but each one is expensive. Result: 30 fps × high bits per frame > 60 fps × many near-zero-cost duplicates. This is actually a sign that things work correctly! Regarding saving settings on exit — good idea, it's on the list for a future version.
×
×
  • Create New...