
What about BT's Lumini Affecti?
Basically it is known as Ambilight . It uses an video/tv-stream as source, calculates the average main color of the hole picture(frame) and displays it on a controllable RGB device.
In my case the display is any RGB device which supports DMX.
The output from DMX is made by some USB-DMX interfaces like DE-Interface.
The conversion from RGB to USBDMX out is made by Mar3kus Amblight Plugin for DMXControl. But you can use it as standalone as well without having DMXControl installed.

Answer: via some nice tools. In my case i have FFdShow as an DirectVideo Filter installed which has a link ability to AVISynth. AviSynth has a good documented plugin API which i use for my Plugin.
Confusing, isn't it? Okay, i'll try another picture:
[Your video] -> FFdShow Filter ->
AVISynth -> BT's Lumini Affecti ->
Mar3kus Ambilight + Video output on screen ->
DMX-Interface -> RGB device
so, that's it!