awawa-dev / HyperHDR

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).
http://www.hyperhdr.eu/
MIT License
1.05k stars 110 forks source link

Capture Device disables after one second #845

Closed DasPhero closed 4 months ago

DasPhero commented 4 months ago

Bug report, debug log and your config file (FULL LOGS ARE MANDATORY)

2024-05-05T14:07:40.581Z [COMPONENTCTRL0] (ComponentController.cpp:73) Enabling HyperHDR instance: recovering previuosly saved component states 2024-05-05T14:07:40.581Z [SMOOTHING0] Clearing queued colors before: enabling 2024-05-05T14:07:40.581Z [SMOOTHING0] Smoothing queue is cleared 2024-05-05T14:07:40.581Z [COMPONENTCTRL0] Smoothing: enabled 2024-05-05T14:07:40.581Z [LEDDEVICE0_ADALIGHT] Ignoring user LED refresh rate. Forcing smoothing refresh rate = 58.82 Hz 2024-05-05T14:07:40.581Z [COMPONENTCTRL0] Blackborder detector: enabled 2024-05-05T14:07:40.582Z [MUXER0] Register new input 'System/VIDEOGRABBER' with priority 240 as inactive 2024-05-05T14:07:40.581Z [LEDDEVICE0_ADALIGHT] (LedDevice.cpp:423) Refresh rate = 58.82 Hz 2024-05-05T14:07:40.582Z [COMPONENTCTRL0] Video capture device: enabled 2024-05-05T14:07:40.582Z [LEDDEVICE0_ADALIGHT] (LedDevice.cpp:373) Device is not ready to start a timer 2024-05-05T14:07:40.582Z [LEDDEVICE0_ADALIGHT] (LedDevice.cpp:433) Refresh interval updated to 17ms 2024-05-05T14:07:40.582Z [LEDDEVICE0_ADALIGHT] (LedDevice.cpp:448) LED refresh interval adjustment caused by smoothing configuration change to 17ms (proposed: 17ms) 2024-05-05T14:07:40.582Z [COMPONENTCTRL0] HyperHDR: enabled 2024-05-05T14:07:40.582Z [V4L2:USB3.0 HD VIDE] Multithreading for V4L2 is enabled. Available thread's count 3 2024-05-05T14:07:40.582Z [LEDDEVICE0_ADALIGHT] (LedDevice.cpp:222) Restoring retryTimer (interval: 0) 2024-05-05T14:07:40.582Z [V4L2:USB3.0 HD VIDE] Found capture device: /dev/video14 2024-05-05T14:07:40.583Z [V4L2:USB3.0 HD VIDE] Found capture device: /dev/video22 2024-05-05T14:07:40.584Z [V4L2:USB3.0 HD VIDE] Found capture device: /dev/video15 2024-05-05T14:07:40.585Z [V4L2:USB3.0 HD VIDE] Found capture device: /dev/video21 2024-05-05T14:07:40.671Z [V4L2:USB3.0 HD VIDE] Found capture device: /dev/video0 2024-05-05T14:07:40.672Z [V4L2:USB3.0 HD VIDE] (V4L2Grabber.cpp:213) Searching for USB3.0 HD Video Capture: USB3.0 (video0) 640 x 360 @ 30 fps, input: -1 (mjpeg) 2024-05-05T14:07:40.673Z [V4L2:USB3.0 HD VIDE] 2024-05-05T14:07:40.673Z [V4L2:USB3.0 HD VIDE] Starting V4L2 grabber. Selected: USB3.0 HD Video Capture: USB3.0 (video0) [/dev/video0] 640 x 360 @ 30 fps mjpeg input -1 2024-05-05T14:07:40.673Z [V4L2:USB3.0 HD VIDE] 2024-05-05T14:07:40.673Z [V4L2:USB3.0 HD VIDE] (V4L2Grabber.cpp:826) Hardware cropping is not supported: ignoring 2024-05-05T14:07:40.673Z [V4L2:USB3.0 HD VIDE] Set device input to: Input 1 2024-05-05T14:07:40.675Z [V4L2:USB3.0 HD VIDE] Set resolution to: 640 x 360 2024-05-05T14:07:40.677Z [V4L2:USB3.0 HD VIDE] Set framerate to 30 FPS 2024-05-05T14:07:40.677Z [V4L2:USB3.0 HD VIDE] (V4L2Grabber.cpp:105) LUT folder location: '/usr/share/hyperhdr/lut' 2024-05-05T14:07:40.677Z [V4L2:USB3.0 HD VIDE] (Grabber.cpp:458) LUT file found: /root/.hyperhdr/lut_lin_tables.3d 2024-05-05T14:07:40.677Z [V4L2:USB3.0 HD VIDE] (Grabber.cpp:468) Index 1 for HDR YUV 2024-05-05T14:07:40.756Z [V4L2:USB3.0 HD VIDE] Found and loaded LUT: '/root/.hyperhdr/lut_lin_tables.3d' 2024-05-05T14:07:40.756Z [V4L2:USB3.0 HD VIDE] Video pixel format is set to: MJPEG 2024-05-05T14:07:40.763Z [V4L2:USB3.0 HD VIDE] Started 2024-05-05T14:07:40.797Z [V4L2:USB3.0 HD VIDE] Video cache: size: 4, hits: 108, needed: 1, cleanup: 0, limit: 8 2024-05-05T14:07:40.825Z [MUXER0] Priority 240 is now active 2024-05-05T14:07:40.825Z [MUXER0] Set visible priority to 240 2024-05-05T14:07:40.825Z [HYPERHDR0] New priority[240], previous [255] 2024-05-05T14:07:40.825Z [HYPERHDR0] New source available -> switch LED-Device on 2024-05-05T14:07:40.825Z [SMOOTHING0] Clearing queued colors before: enabling 2024-05-05T14:07:40.826Z [SMOOTHING0] Smoothing queue is cleared 2024-05-05T14:07:40.826Z [LEDDEVICE0_ADALIGHT] (LedDevice.cpp:247) Enable the device 2024-05-05T14:07:40.826Z [COLORSPACE_CALIBRATION0] (ColorSpaceCalibration.cpp:225) setBackLightEnabled: 1 2024-05-05T14:07:40.826Z [LEDDEVICE0_ADALIGHT] Opening UART: ttyACM0 2024-05-05T14:07:40.826Z [LEDDEVICE0_ADALIGHT] (ProviderSerial.cpp:209) _serialPort.open(QIODevice::ReadWrite): ttyACM0, Baud rate [2000000]bps 2024-05-05T14:07:40.914Z [LEDDEVICE0_ADALIGHT] (ProviderSerial.cpp:214) portName: ttyACM0 2024-05-05T14:07:40.914Z [LEDDEVICE0_ADALIGHT] (ProviderSerial.cpp:215) systemLocation: /dev/ttyACM0 2024-05-05T14:07:40.914Z [LEDDEVICE0_ADALIGHT] (ProviderSerial.cpp:216) description: Pico 2024-05-05T14:07:40.914Z [LEDDEVICE0_ADALIGHT] (ProviderSerial.cpp:217) manufacturer: Raspberry Pi 2024-05-05T14:07:40.914Z [LEDDEVICE0_ADALIGHT] (ProviderSerial.cpp:218) productIdentifier: 0xa 2024-05-05T14:07:40.914Z [LEDDEVICE0_ADALIGHT] (ProviderSerial.cpp:219) vendorIdentifier: 0x2e8a 2024-05-05T14:07:40.914Z [LEDDEVICE0_ADALIGHT] (ProviderSerial.cpp:220) serialNumber: E66138935F683337 2024-05-05T14:07:40.916Z [LEDDEVICE0_ADALIGHT] Detected Rp2040 type board. HyperHDR skips the reset. State: 1, 1 2024-05-05T14:07:40.918Z [LEDDEVICE0_ADALIGHT] DETECTED DEVICE USING HyperSerialEsp8266/HyperSerialESP32/HyperSerialPico FIRMWARE (HyperHDR frames: 0 (FPS), receiv.: 0, good: 0, incompl.: 0, mem1: 0, mem2: 448, heap: 123232 Welcome! Awa driver 9.) at 1 msec 2024-05-05T14:07:40.918Z [LEDDEVICE0_ADALIGHT] (LedDevice.cpp:64) Switch on 2024-05-05T14:07:40.918Z [LEDDEVICE0_ADALIGHT] (LedDevice.cpp:140) Power On 2024-05-05T14:07:40.918Z [LEDDEVICE0_ADALIGHT] (LedDevice.cpp:367) Starting timer with interval = 17ms 2024-05-05T14:07:40.918Z [COMPONENTCTRL0] LED device: enabled 2024-05-05T14:07:40.919Z [SMOOTHING0] Using alternative smoothing input (0) 2024-05-05T14:07:40.952Z [SMOOTHING0] Using alternative smoothing procedure (0) 2024-05-05T14:07:43.320Z [MUXER0] Priority 240 is now inactive 2024-05-05T14:07:43.321Z [MUXER0] Set visible priority to 255 2024-05-05T14:07:43.321Z [HYPERHDR0] New priority[255], previous [240] 2024-05-05T14:07:43.321Z [HYPERHDR0] No source left -> switch LED-Device off 2024-05-05T14:07:43.321Z [SMOOTHING0] Clearing queued colors before: disabling 2024-05-05T14:07:43.321Z [SMOOTHING0] Smoothing queue is cleared 2024-05-05T14:07:43.321Z [COLORSPACE_CALIBRATION0] (ColorSpaceCalibration.cpp:225) setBackLightEnabled: 0 2024-05-05T14:07:43.321Z [LEDDEVICE0_ADALIGHT] (LedDevice.cpp:297) Disable the device 2024-05-05T14:07:43.321Z [LEDDEVICE0_ADALIGHT] (LedDevice.cpp:381) Stopping refresh timer 2024-05-05T14:07:43.321Z [LEDDEVICE0_ADALIGHT] (LedDevice.cpp:90) Switch off 2024-05-05T14:07:43.321Z [LEDDEVICE0_ADALIGHT] (LedDevice.cpp:544) Set LED strip to black/power off 2024-05-05T14:07:43.326Z [LEDDEVICE0_ADALIGHT] (ProviderSerial.cpp:146) Flush was successful 2024-05-05T14:07:43.340Z [LEDDEVICE0_ADALIGHT] Received goodbye: ' HyperHDR frames: 58 (FPS), receiv.: 58, good: 58, incompl.: 0, mem1: 0, mem2: 448, heap: 123232 ' (98) 2024-05-05T14:07:43.341Z [LEDDEVICE0_ADALIGHT] (ProviderSerial.cpp:164) Serial port is closed: ttyACM0 2024-05-05T14:07:43.342Z [COMPONENTCTRL0] LED device: disabled

Steps to reproduce

Setup HyperHDR and activate Video Capture

What is expected?

Ambilight will work as expected and there will be a signal from the capture card

What is actually happening?

The ambilight activated for a split second and the capture card deactivates and there is no signal afterwards

System

HyperHDR Server:

HyperHDR Server OS:

DasPhero commented 4 months ago

I guess the reason why the lights shut off are those lines: 2024-05-05T14:07:43.320Z [MUXER0] Priority 240 is now inactive 2024-05-05T14:07:43.321Z [MUXER0] Set visible priority to 255 2024-05-05T14:07:43.321Z [HYPERHDR0] New priority[255], previous [240] 2024-05-05T14:07:43.321Z [HYPERHDR0] No source left -> switch LED-Device off

But I cannot find out why this is happening. The setup worked for me for over 3 years. I just uninstalled the old HyperHDR and installed Version 20 to use the PicoSerial Feature.

Effects are working perfectly normal

awawa-dev commented 4 months ago

Yes, the grabber does not return any frames. Have you changed the video source because, for example, it may not support a stream with this resolution/colorspace or HDCP is active and blocks capturing? Or the grabber is broken? maybe 'dmesg' will tell you more.

DasPhero commented 4 months ago

I tried using the exact same setting as with Version 19 Screenshot 2024-05-05 125514

dmesg is also no showing any errors and it assigns it the "correct" device path video0

In the split second before "crashing" when disabling and reeneabling the instance the colors of the leds match the content of the video so I thing the video capture generally works.

awawa-dev commented 4 months ago

The grabber is initialized correctly and does not report any problem: but it doesn't provide frames, a timeout for a priority occurs, it's been removed and the LEDs are turned off. From HyperHDR you won't get more diagnostic information, it's a device problem.

DasPhero commented 4 months ago

How come that it worked perfectly until yesterday?

Nonetheless, this does annoy me and I just ordered an HDMI Splitter and one of the capture cards you advertised. image

Then I can test in a few days if this will hopefully work

awawa-dev commented 4 months ago

If you are sure you didnt change the video source parameters and it is present on the grabber input...things get broken, but check dmesg first. Sometimes it can report a hardware problem or a problem with a voltage like undervoltage when the grabber usually is a first victim.