
Headless / HDMI splitter-less / Camera-less Ambilight solution for Plex
This might look like yet another Ambilight post but there's a nice little twist:
I wanted a custom system that is truly headless, without an external grabber software, that is able to decode the various HDR profiles natively, as well as the detection/omission of all black bars, even the nasty Nolan-esque IMAX to 2.35:1 transitions. It even detects and omits the burned-in subtitles.
My requirements were: I didn't want to use an HDMI splitter, grabber or a capture card, and using a camera was absolutely out of the question. Using HyperHDR or other pre-existing software solution weren't an option either. The least hardware possible and a software as simple as possible.
So I created a python service that monitors whenever a file is being played locally on my Plex server. If so, it starts a headless player on my GPU using MPV that syncs with Plex using a combination of predefined offsets if needed, routine sync checks and auto acceleration/deceleration when needed. It gets all the info needed for the Ambilight-style effect and it's then sent directly to my ESP32 using WLED through my LAN. It really is plug n play once it's configured.
I found that this solution is by far the simplest, cheapest and is very elegant in terms of hardware needed: LED, ESP32 (Dig Uno v3), and a PSU, that's it! It uses very little ressources if MPV is played using a GPU or even an Intel QuickSync chip (the headless player uses a 160x90 internal resolution).
Of course you can customize many aspects to your liking through a local web page that I've designed.
The downfall being of course that it is only designed for Plex atm. But that could easily be adapted to other players like Jellyfin if needed. It could also be adapted for PC gaming with a fair bit of tweaking I believe.
It's probably a very niche use case but if anyone wants the source, I've made it available for free here.
It's been a fun project that in the end was much easier than I thought.
TLDR Python+WLED, that's all you need.
EDIT added a "WLED Subtitle" track feature that uses 0% CPU (baked in WLED info for movies). still need to add a frontend for the encoder but the code is now in the repo and working. thanks for the idea /u/BearItChooChoo