plugin for mpv to do ambilight with Philips Hue lamps (WIP)
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

This is a plugin for mpv to interract with Philips Hue lamps and try to mimic an ambilight setup.

There're some examples videos at the bottom of the following page.


It is written in C++11, why ? because I needed some handy containers like unordered sets.

The algorithm is trivial (dumb, even) and could surely be improved. The color for left and right lamp is computed from the 4 columns of pixels on the left and right edge of the frame and for the middle a square of 64x64 at the center of the frame.

You need ffmpeg to be installed, but that's not a problem since you already use mpv.


I only tried on OS X 10.10 but building on Linux should be the same, just execute the script.


mpv have to be built with the --enable-vf-dlopen-filters switch.

Then, simply invoke mpv with --vf=dlopen=ambi.dylib:HUE_IP_ADDRESS for example :

mpv movie --vf=dlopen=ambi.dylib:


  • Too slow for my taste (handle 1080p in my tests)
  • Won't build on Windows, but I don't care.
  • Too many things hardcoded?


The same as mpv I guess (GPLv2), but frankly I don't care, you can do whatever with the code which is not part of mpv.