A do it yourself Ambilight project.
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.



The Do It Yourself Ambilight project.


What's needed for a basic Ambilight setup?

  1. Split the video source (HMDI splitter)
  2. Capture video from a HDMI source. (HMDI to USB or HMDI to AV -> AV to USB)
  3. Process the video (Raspberry Pi 3 B+ or alternative running linux)
  4. Send new color frame to the LED strips. (Arduino)

In short, there isnt much needed for a basic setup. The parts to archieve this are pretty cheap and easy to install by just connecting them.

Capture cards come in different price ranges, please know we do not need 4k quality to average some colors. Most of the cheap capture devices provide 720x576 25FPS which is good enough for now. The colors on the otherhand can be different due to the loss when it's converted to analog signals. This isnt only the case with the HMDI to AV -> AV to USB setup, but cheap HMDI to USB devices also tend to convert it to analog first, which gives the same result. Even with multiple samples of the same device, colors will be different, so please check visually first how the recieved images look.

Current / Planned features

  • Pre-processing the frames to remove borders.
  • Processing of the frames to extract colors for the LED strips.
  • Mapping colors and update the LED strips.
  • Support for different LED setups (3-sided & 4-sided)
  • Color corrections to compensate for the analog video & background colors.

Suggested Hardware

As the goal of the project was to keep costs lower than the alternatives on the market, it's probably the best to get everything of Ebay. This way I have done this project for only $102 where the alternatives are about $250 at time of writing and do not offer the source-code, which limits the extensibility of the ambilight.

Please note that it can be done using different hardware than I've used personally but i found this to be the cheapest combination of hardware that would work for me personally.

Amount Product Price
1 HDMI splitter $8
2 HDMI cable $3
1 HMDI capture device (USB 2) $14
1 Raspberry pi 3B+ $35
1 Arduino Uno (+ USB cable) $7
1 Micro USB power adapter $3
1 5M WS2811 RGB LED (3pin) strip 60l/m $20
1 Power supply $10
1 Power cord $2
Total $102

Setup hardware


Installation Arduino

There's not much needed for the arduino part of the project, adjust the settings on top of ledcontroller.ino and flash it to the Arduino. You will need the FastLED library, which can be installed through the Arduino IDE, but i also included it in the Arduino folder.

Installation Raspberry

Software requirements
  • ffmpeg (version 3.2.0 as they removed ffserver in later versions)
  • mono, for the image processing application as it's written in C#. (for now)
Installation (Debian)

sudo apt-get update

sudo apt-get install ffmpeg mono-complete

After this you'll need to update the config of ffserver.

sudo nano /etc/ffserver.conf

And replace it with the content found at ffserver.conf

After you have done this, you can simply startup all applications, in order:

  1. ffserver &
  2. ffmpeg -f video4linux2 -standard PAL -s 720x576 -r 25 -i /dev/video0 -tune zerolatency http://localhost:8090/capture.ffm &
  3. mono Ambilight.Application.exe &

Please double check the configuration Ambilight.Application.exe.config and the defines on the top of ffserver.conf so it matches your setup.


Although the above setups offer a great experience, it's always fun to improve projects. My current ideas are to exchange the led strips, which are currently 60 leds per meter, with 144 leds per meter to get a higher resolution ambilight.

Another idea would be to replace the raspberry pi, I found that android mediaboxes go for about $40 on Ebay, which are build upon the Amlogic S912 octa core processor and can be flashed with Armbian linux. This might be a great replacement for the raspberry at some point as we can add more (pre-)processing, such as color corrections for example without losing frames per second.

For the best results, it would be great to use an HDMI capture device that doesnt cheat by converting the video to analog on it's way to USB. Unfortunately these devices are much more expensive (expect in the $80 - $120 range), but will result in loseless video capturing. This eliminates the need to pre-process colors like we need to do on the analog variant and ensure the closest matching ambilight possible in combination with the CIELab color space instead of the RGB color space we use now.


Anyone can make a pull request. People can then vote on the pull requests using reactions (👍, 👎, or 😕). Pull requests which meet the consensus rules will be merged using gitconsensus.