Highly optimized open source ambient lighting implementation based on modern digital video and audio stream analysis for Windows, macOS and Linux (x86 and Raspberry Pi / ARM).
Bug report, debug log and your config file (FULL LOGS ARE MANDATORY)
When using the system screen grabber under MacOS the captured data is misaligned, i.e. it is putting 3/4 of a pixel row of the screen on each row of the captured image. This is due to using an ultrawide monitor with an aspect ratio of 21:9 (3440x1440) rather than the expected 16:9. If I force the resolution to a standard aspect ratio (2560x1440) the output is perfectly aligned like I would expect.
I have attached a screenshot below
2024-06-06T21:24:57.195Z [CORE] TTY is not attached to the log output
2024-06-06T21:24:57.195Z [MAIN] Database path: '/Users/joshuata/.hyperhdr/db/hyperhdr.db', readonlyMode = disabled
2024-06-06T21:24:57.195Z [MAIN] Starting HyperHdr - 20.0.0.0, (HEAD detached at v20.0.0.0) (awawa-dev-9e960c9/52f12b4-1711236142), built: Mar 23 2024:23:28:09
2024-06-06T21:24:57.195Z [MAIN] Set user data path to '/Users/joshuata/.hyperhdr'
2024-06-06T21:24:57.195Z [INSTANCE_CFG] Loading instance configuration
2024-06-06T21:24:57.197Z [DB] Database opened: /Users/joshuata/.hyperhdr/db/hyperhdr.db
2024-06-06T21:24:57.201Z [INSTANCE_CFG] Settings database initialized
2024-06-06T21:24:57.202Z [SOUND_GRABBER] Sound device is disabled
2024-06-06T21:24:57.282Z [JSONSERVER] (JsonServer.cpp:26) Created new instance
2024-06-06T21:24:57.283Z [JSONSERVER] Started on port 19444
2024-06-06T21:24:57.283Z [SSDP] (SSDPHandler.cpp:31) SSDPHandler is initialized
2024-06-06T21:24:57.283Z [MAIN] start systray
2024-06-06T21:24:57.281Z [macOS AVF:auto] (GrabberWrapper.cpp:55) Starting the grabber wrapper
2024-06-06T21:24:57.281Z [MACOS_SYSTEM:AUTO] Found display: Display id: 2
2024-06-06T21:24:57.281Z [MACOS_SYSTEM:AUTO] Restarting video grabber is now blocked due to reloading of the configuration
2024-06-06T21:24:57.281Z [MACOS_SYSTEM:AUTO] (Grabber.cpp:159) Set new width: 512, height: 512 for capture
2024-06-06T21:24:57.281Z [MACOS_SYSTEM:AUTO] (Grabber.cpp:335) setWidthHeight preparing to restarting video grabber 0
2024-06-06T21:24:57.281Z [MACOS_SYSTEM:AUTO] Delayed restart of the grabber due to change of the capturing resolution
2024-06-06T21:24:57.281Z [MACOS_SYSTEM:AUTO] Delayed restart of the grabber due to change of the framerate
2024-06-06T21:24:57.281Z [SIGNAL_OLD] (DetectionManual.cpp:84) Signal detection area set to: 0.250000,0.250000 x 0.750000,0.750000
2024-06-06T21:24:57.281Z [SIGNAL_OLD] (DetectionManual.cpp:74) Signal threshold set to: {0, 0, 0} and frames: 50
2024-06-06T21:24:57.281Z [MACOS_SYSTEM:AUTO] (Grabber.cpp:380) setDeviceVideoStandard preparing to restart video grabber. Old: '' new: 'auto'
2024-06-06T21:24:57.281Z [MACOS_SYSTEM:AUTO] Delayed restart of the grabber due to change of selected device
2024-06-06T21:24:57.281Z [HYPERHDR0] Starting the instance
2024-06-06T21:24:57.281Z [INSTANCE_CFG0] Loading instance configuration
2024-06-06T21:24:57.282Z [DB] Database opened: /Users/joshuata/.hyperhdr/db/hyperhdr.db
2024-06-06T21:24:57.283Z [MACOS AVF:AUTO] HyperHDR has the camera's permission
2024-06-06T21:24:57.283Z [MACOS AVF:AUTO] (AVFGrabber.mm:409) Searching for devices...
2024-06-06T21:24:57.283Z [MACOS AVF:AUTO] (AVFGrabber.mm:459) Elgato Virtual Camera (C8DB174F-4D65-437F-8134-A6582FA617F0) 1920 x 1080 @ 30 fps BGRA (unsupported)
2024-06-06T21:24:57.283Z [MACOS AVF:AUTO] (AVFGrabber.mm:459) Elgato Virtual Camera (C8DB174F-4D65-437F-8134-A6582FA617F0) 1280 x 720 @ 30 fps BGRA (unsupported)
2024-06-06T21:24:57.283Z [MACOS AVF:AUTO] (AVFGrabber.mm:459) OBS Virtual Camera (7626645E-4425-469E-9D8B-97E0FA59AC75) 1920 x 1080 @ 60 fps BGRA (unsupported)
2024-06-06T21:24:57.283Z [MACOS AVF:AUTO] Restarting video grabber is now blocked due to reloading of the configuration
2024-06-06T21:24:57.283Z [MACOS AVF:AUTO] Cropping image: width=0 height=0; crop: left=0 right=0 top=0 bottom=0
2024-06-06T21:24:57.283Z [macOS AVF:auto] (GrabberWrapper.cpp:126) CEC keycode. Start: 0, stop: 0
2024-06-06T21:24:57.283Z [MACOS AVF:AUTO] (Grabber.cpp:273) setBrightnessContrastSaturationHue nothing changed
2024-06-06T21:24:57.283Z [MACOS AVF:AUTO] (AVFGrabber.mm:195) setHdrToneMappingMode to: Disabled
2024-06-06T21:24:57.283Z [MACOS AVF:AUTO] (Grabber.cpp:182) setFpsSoftwareDecimation to: 1
2024-06-06T21:24:57.283Z [SIGNAL_OLD] (DetectionManual.cpp:84) Signal detection area set to: 0.250000,0.250000 x 0.750000,0.750000
2024-06-06T21:24:57.283Z [SIGNAL_OLD] (DetectionManual.cpp:74) Signal threshold set to: {12, 12, 12} and frames: 200
2024-06-06T21:24:57.283Z [SIGNAL_AUTO] (DetectionAutomatic.cpp:376) Automatic signal detection -> errorTolerance: 9, modelTolerance: 90, sleepTime: 5000, wakeTime: 1000
2024-06-06T21:24:57.283Z [MACOS AVF:AUTO] (Grabber.cpp:380) setDeviceVideoStandard preparing to restart video grabber. Old: '' new: 'auto'
2024-06-06T21:24:57.283Z [MACOS AVF:AUTO] Delayed restart of the grabber due to change of selected device
2024-06-06T21:24:57.283Z [MACOS AVF:AUTO] (Grabber.cpp:200) Force encoding to: NO_CHANGE (old: NO_CHANGE)
2024-06-06T21:24:57.283Z [MACOS AVF:AUTO] setQFrameDecimation is now: disabled
2024-06-06T21:24:57.286Z [INSTANCE_CFG0] Settings database initialized
2024-06-06T21:24:57.286Z [COMPONENTCTRL0] (ComponentController.cpp:31) ComponentController is initialized. Components are ENABLED
2024-06-06T21:24:57.286Z [MUXER0] (Muxer.cpp:55) Muxer initialized
2024-06-06T21:24:57.286Z [BLACKBORDER] Set mode to: default
2024-06-06T21:24:57.286Z [IMAGETOLED_MNG0] (ImageToLedManager.cpp:192) Set LED mapping type to advanced
2024-06-06T21:24:57.286Z [IMAGETOLED_MNG0] (ImageToLedManager.cpp:176) setSparseProcessing to 0
2024-06-06T21:24:57.286Z [IMAGETOLED_MNG0] (ImageToLedManager.cpp:103) ImageToLedManager initialized
2024-06-06T21:24:57.286Z [COLORSPACE_CALIBRATION0] classicMode: no, gammas:[1.50, 1.50, 1.50], saturation: 1.00, luminance: 1.00, backLight: [enabled, threshold: 1, colored: yes]
2024-06-06T21:24:57.286Z [LED_CALIBRATION0] (LedCalibration.cpp:101) Calibration config '0' for LED segment: [0, 136]
2024-06-06T21:24:57.286Z [HYPERHDR0] Led strip RGB order is: rgb
2024-06-06T21:24:57.286Z [SMOOTHING0] High resolution clock is steady (good)
2024-06-06T21:24:57.286Z [SMOOTHING0] Creating config (0) => type: Alternative, dirMode: false, pause: false, settlingTime: 150ms, interval: 20ms (50Hz), antiFlickTres: 32, antiFlickStep: 2, antiFlickTime: 250
2024-06-06T21:24:57.286Z [SMOOTHING0] Clearing queued colors before: disabling. Smoothing configuration changed: restarting timer.
2024-06-06T21:24:57.286Z [SMOOTHING0] Smoothing queue is cleared
2024-06-06T21:24:57.286Z [SMOOTHING0] Selecting config (0) => type: Alternative, directMode: false, pause: false, settlingTime: 150ms, interval: 20ms (50Hz), antiFlickTres: 32, antiFlickStep: 2, antiFlickTime: 250
2024-06-06T21:24:57.286Z [SMOOTHING0] Selecting config (0) => type: Alternative, directMode: false, pause: false, settlingTime: 150ms, interval: 20ms (50Hz), antiFlickTres: 32, antiFlickStep: 2, antiFlickTime: 250
2024-06-06T21:24:57.286Z [LEDDEVICE0_UDPRAW] Start LedDevice 'udpraw'.
2024-06-06T21:24:57.286Z [LEDDEVICE0_UDPRAW] (LedDevice.cpp:337) deviceConfig: [{"colorOrder":"rgb","currentLedCount":137,"host":"192.168.1.110","port":5568,"refreshTime":20,"smoothingRefreshTime":0,"type":"udpraw"}]
2024-06-06T21:24:57.286Z [LEDDEVICE0_UDPRAW] (LedDevice.cpp:423) Refresh rate = 50.00 Hz
2024-06-06T21:24:57.286Z [LEDDEVICE0_UDPRAW] (LedDevice.cpp:373) Device is not ready to start a timer
2024-06-06T21:24:57.286Z [LEDDEVICE0_UDPRAW] (LedDevice.cpp:433) Refresh interval updated to 20ms
2024-06-06T21:24:57.286Z [LEDDEVICE0_UDPRAW] (ProviderUdp.cpp:64) Successfully parsed 192.168.1.110 as an IP-address.
2024-06-06T21:24:57.286Z [LEDDEVICE0_UDPRAW] (ProviderUdp.cpp:94) UDP socket will write to 192.168.1.110:5568
2024-06-06T21:24:57.286Z [LEDDEVICE0_UDPRAW] (LedDevice.cpp:247) Enable the device
2024-06-06T21:24:57.304Z [HYPER_MANAGER] HyperHDR instance 'First LED instance' has been started
2024-06-06T21:24:57.286Z [HYPERHDR0] The instance is running
2024-06-06T21:24:57.286Z [MUXER0] Register new input 'System/SYSTEMGRABBER' with priority 245 as inactive
2024-06-06T21:24:57.286Z [COMPONENTCTRL0] System capture device: enabled
2024-06-06T21:24:57.286Z [LEDDEVICE0_UDPRAW] (LedDevice.cpp:64) Switch on
2024-06-06T21:24:57.286Z [LEDDEVICE0_UDPRAW] (LedDevice.cpp:140) Power On
2024-06-06T21:24:57.286Z [LEDDEVICE0_UDPRAW] (LedDevice.cpp:367) Starting timer with interval = 20ms
2024-06-06T21:24:57.286Z [COMPONENTCTRL0] LED device: enabled
2024-06-06T21:24:57.286Z [MACOS_SYSTEM:AUTO] (macOsGrabber.mm:111) init
2024-06-06T21:24:57.286Z [EFFECTENGINE0] Run effect "Rainbow swirl fast" on channel 0
2024-06-06T21:24:57.286Z [MACOS_SYSTEM:AUTO] (macOsGrabber.mm:130) Forcing auto discovery device
2024-06-06T21:24:57.286Z [MACOS_SYSTEM:AUTO] (macOsGrabber.mm:135) Auto discovery set to Display id: 2
2024-06-06T21:24:57.286Z [MACOS_SYSTEM:AUTO] *************************************************************************************************
2024-06-06T21:24:57.286Z [EFFECTENGINE0] (EffectEngine.cpp:92) Start the effect: name [Rainbow swirl fast]
2024-06-06T21:24:57.286Z [MACOS_SYSTEM:AUTO] Starting macOS grabber. Selected: 'Display id: 2' max width: 512 (512) @ 20 fps
2024-06-06T21:24:57.286Z [MUXER0] Register new input 'System/EFFECT' with priority 0 as inactive
2024-06-06T21:24:57.286Z [MACOS_SYSTEM:AUTO] *************************************************************************************************
2024-06-06T21:24:57.286Z [MACOS_SYSTEM:AUTO] Started
2024-06-06T21:24:57.286Z [HYPERHDR0] Boot effect: animation set to 'Rainbow swirl fast' [started]
2024-06-06T21:24:57.286Z [EFFECT0(Rainbo...)] Begin playing the effect with priority: 0
2024-06-06T21:24:57.287Z [MUXER0] Priority 0 is now active
2024-06-06T21:24:57.287Z [MUXER0] Set visible priority to 0
2024-06-06T21:24:57.287Z [HYPERHDR0] New priority[0], previous [255]
2024-06-06T21:24:57.287Z [HYPERHDR0] New source available -> switch LED-Device on
2024-06-06T21:24:57.287Z [SMOOTHING0] Clearing queued colors before: enabling
2024-06-06T21:24:57.287Z [SMOOTHING0] Smoothing queue is cleared
2024-06-06T21:24:57.287Z [COLORSPACE_CALIBRATION0] (ColorSpaceCalibration.cpp:225) setBackLightEnabled: 0
2024-06-06T21:24:57.287Z [LEDDEVICE0_UDPRAW] (LedDevice.cpp:247) Enable the device
2024-06-06T21:24:57.287Z [IMAGETOLED_MNG0] Total index number is: 1000 (memory: 1000). User sparse processing is: disabled, image size: 80 x 45, area number: 137
2024-06-06T21:24:57.304Z [FLATBUFSERVER] Started on port 19400
2024-06-06T21:24:57.304Z [WEBSERVER] Initialize Webserver
2024-06-06T21:24:57.304Z [WEBSERVER] Apply Webserver settings
2024-06-06T21:24:57.304Z [WEBSERVER] Set document root to: :/www
2024-06-06T21:24:57.304Z [FLATBUFSERVER] Started local domain socket server: 'hyperhdr-domain'
2024-06-06T21:24:57.304Z [WEBSERVER] Started: 'HyperHDR WebServer (HTTP)' on port: 8090
2024-06-06T21:24:57.304Z [SSDP] (SSDPHandler.cpp:93) The local address is empty
2024-06-06T21:24:57.304Z [WEBSERVER] Initialize Webserver
2024-06-06T21:24:57.304Z [WEBSERVER] Apply Webserver settings
2024-06-06T21:24:57.304Z [WEBSERVER] Set document root to: :/www
2024-06-06T21:24:57.304Z [WEBSERVER] No valid SSL certificate has been found (':/hyperhdrcrt.pem'). Did you install OpenSSL?
2024-06-06T21:24:57.304Z [WEBSERVER] The provided SSL key is invalid or not supported use RSA encrypt and PEM format (':/hyperhdrkey.pem')
2024-06-06T21:24:57.304Z [WEBSERVER] Started: 'HyperHDR WebServer (HTTPS)' on port: 8092
2024-06-06T21:24:57.304Z [SSDP] (SSDPHandler.cpp:42) SSDPHandler is initializing
2024-06-06T21:24:57.304Z [SSDP] (SSDPHandler.cpp:183) The local address is: 192.168.1.116
2024-06-06T21:24:57.304Z [SSDP] (SSDPServer.cpp:95) Initialize the SSDP server
2024-06-06T21:24:57.304Z [WEBSERVER] (StaticFileServing.cpp:68) SSDP description is set up
2024-06-06T21:24:57.304Z [SSDP] Starting the SSDP server
2024-06-06T21:24:57.311Z [NETFORWARDER] Forwarder has changed state to disabled
2024-06-06T21:24:57.346Z [MUXER0] Priority 245 is now active
2024-06-06T21:24:58.809Z [SERVICE_mDNS] Starting the network discovery thread
2024-06-06T21:24:58.813Z [NET_DISCOVERY] Found HyperHDR at 192.168.1.110:8090 (hyperbian.home.joshasplund.com.local)
2024-06-06T21:25:00.291Z [EFFECT0(Rainbo...)] The effect quits with priority: 0
2024-06-06T21:25:00.292Z [MUXER0] Removed source priority 0
2024-06-06T21:25:00.292Z [MUXER0] Set visible priority to 245
2024-06-06T21:25:00.292Z [HYPERHDR0] New priority[245], previous [0]
2024-06-06T21:25:00.292Z [COLORSPACE_CALIBRATION0] (ColorSpaceCalibration.cpp:225) setBackLightEnabled: 1
2024-06-06T21:25:00.292Z [EFFECTENGINE0] Effect 'Rainbow swirl fast' has finished.
2024-06-06T21:25:00.293Z [EFFECT0(Rainbo...)] Effect named: 'Rainbow swirl fast' is deleted
2024-06-06T21:25:00.310Z [IMAGETOLED_MNG0] Total index number is: 25962 (memory: 25962). User sparse processing is: disabled, image size: 491 x 205, area number: 137
2024-06-06T21:25:03.506Z [WEBSOCKET] (WebSocketClient.cpp:39) New connection from ::1
2024-06-06T21:25:20.198Z [WEBSOCKET] (WebSocketClient.cpp:188) send close: 1000
2024-06-06T21:26:26.039Z [WEBSOCKET] (WebSocketClient.cpp:39) New connection from ::1
2024-06-06T21:26:35.753Z [WEBSOCKET] (HyperAPI.cpp:957) log streaming activated for client ::1
2024-06-06T21:26:57.109Z [PERFORMANCE] [INSTANCE0: FPS = 20.00, processed = 1200], [LED0: FPS = 69.96, send = 4197, processed = 1200, dropped = 0]
Start HyperHdr with the software screen capture enabled and the default resolution+aspect ratio on my display.
Open the LED visualization panel and press the Live video button.
What is expected?
A clear image of the desktop capture
What is actually happening?
The captured image is corrupt, which leads the LED effects to not match the screen, e.g. a change on the left side of the screen will strobe the lights on all sides.
System
HyperHDR Server:
- Build: (HEAD detached at v20.0.0.0) (awawa-dev-9e960c9/52f12b4-1711236142)
- Build time: Mar 23 2024 23:27:56
- Git Remote: https://github.com/awawa-dev/HyperHDR
- Version: 20.0.0.0
- UI Lang: auto (BrowserLang: en-US)
- Avail Capt: macOS (AVF)
- Database: read/write
HyperHDR Server OS:
- Distribution: macOS 14.4
- Architecture: arm64
- Kernel: darwin (23.4.0 (WS: 64))
- Qt Version: 6.6.1
- Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36
Bug report, debug log and your config file (FULL LOGS ARE MANDATORY)
When using the system screen grabber under MacOS the captured data is misaligned, i.e. it is putting 3/4 of a pixel row of the screen on each row of the captured image. This is due to using an ultrawide monitor with an aspect ratio of 21:9 (3440x1440) rather than the expected 16:9. If I force the resolution to a standard aspect ratio (2560x1440) the output is perfectly aligned like I would expect.
I have attached a screenshot below
Steps to reproduce
Start HyperHdr with the software screen capture enabled and the default resolution+aspect ratio on my display.
Open the LED visualization panel and press the
Live video
button.What is expected?
A clear image of the desktop capture
What is actually happening?
The captured image is corrupt, which leads the LED effects to not match the screen, e.g. a change on the left side of the screen will strobe the lights on all sides.
System