kershner / screenBloom

Fake Ambilight for Philips Hue via Python

Home Page:http://www.screenbloom.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[feature] Support for capture devices

theironraiden opened this issue · comments

Hi,

It would be great to have an option to generate color data from capture devices (elgato, avermedia, webcams) instead of computer monitor. This would allow screenbloom to work with video game consoles/Video players.

Hi there. This is a really interesting suggestion. I'm not very familiar with these devices...how are you envisioning it working? Like is the El Gato hooked up to a PC and spitting out an image of the game there? I don't think we'd be able to get ScreenBloom running on the capture device natively.

Yeah, that's the idea, with the capture card hooked on to a PC, and through a setting, choosing whether to capture from screen or capture device, and some kind of list box to chose the exact capture device (As many computers come with integrated webcams, or some capture cards generate multiple devices).

I've actually tried to do some PoC with my Avermedia LGC, and a generic Composite video card, and averaging the colors to my Hue, and while I can't get image from the LGC (probably to limitations in OpenCV or my own limitations regarding to python knowledge, as I'm not really a programmer), I got this to work on the generic composite video card (I can average my hue to the colors on my NES games :D) but obviously lacking all the "magic" from screenbloom (like multi zones, brightness configuration, etc.)

The Avermedia LGC actually comes with an HDMI-In/HDMI-out for greater convenience, but in most cases you should probably have to use, in addition to the capture card, a 15-20€ hdmi splittter.

If the capture card just spits out the image onto the PC, couldn't you just fullscreen whatever window it displays in and run ScreenBloom like normal? I've been thinking of doing something similar involving an HDMI splitter to get ScreenBloom working with my Nintendo Switch.

I've not looked in detail yet but could the get_screenshot function just be modified to use something like opencv's video capture function https://docs.opencv.org/3.0-beta/doc/py_tutorials/py_gui/py_video_display/py_video_display.html ? The multi-zone/colour averaging stuff should happen after that so Screenbloom should treat it like it would any normal screen capture?

Using screenbloom over the capture cards preview on the PC "works" from my experience, but has two major caveats:

  • It seems to have a largely noticeable delay (more than a second)
  • You have to keep the computer exclusively working with screenbloom and making sure the screen is turned on, it doesn't get into sleep mode, and doesn't run any other apps.

So its doable but far from ideal.