Randy Hammons

Developer, Designer, Cyclist and Super Geek

Building an Ambilight for your Home Theater

Following up on my last post, ‘My Latest Time Sink’, I am finally at the point I feel happy showing off my home theater ambilight setup I’ve created from a lot of trial and error, and support from tutorial posts, reddit threads and youtube videos.  Below I’ll give an overview of the hardware, the how-to, and some of the mistakes and lessons I learned along the way. I feel the end product is by-far the easiest to approach it, but this can be accomplished a plethora of ways.

Hardware

To begin, let’s review the hardware I chose and why:

  • Woodenshark Lightpack – This is the LED setup mounted to the back of my 47″ LG TV.  You can add on multiple packs of these if you have a TV larger than 50″, but I think the single pack option is fine for my 47″.  Increasing the number increases the resolution and detail of the lights emitted behind your TV. Lightpack’s a solid out of the box solution and there are lots of clones and copy-cats out there.  I feel like I got a high quality product and good customer service going this route. I also chose this route because I have no electrical engineering experience and didn’t want to make a serious investment (time, money, family) in a project I may not be capable of completing.
  • Raspberry Pi 2 – This is the brains used to drive the ambilight. It’s a SBC (small board computer) that I can power from an alternative device (in my case a Mac Mini) using power over USB.  For this setup it requires at minimum a power source, network connection, micro-SD storage card (8gb is plenty, if not overkill),  and a USB hub (it has four ports, but some of the items won’t fit easily in the tightly grouped rear of the pi). The Pi is $35 and perfect for these sort of stow away single task projects. This was my first Pi experience, and I plan on completing a few more projects using them.
  • Fushicai Easycap Device – This one is the most important for capturing an external source with your Lightpack.  There are lots of various chipsets and all the devices look reasonably the same.  It took me three attempts with various $8 Easycap devices to find one that was a Fushicai.  I’ve read the STK1600 models also work, but have not used one.  The others I ordered were SOMagic DC-60’s and they will not work with the various Linux distros currently available for the Raspberry Pi. This is the one I ordered on March 8th, 2015 that was a Fushicai-based model. YMMV.
  • HDMI Splitter – This will allow you to take your primary video source, in my case an Xbox One, and split it out to the Easycap for capturing and to your TV for everyday display tasks.
  • HDMI-to-Composite Video Converter – This takes the split HDMI source and converts it down to a simple 480i input that the Easycap can accept.  The high-quality of an HDMI video signal isn’t needed for displaying to tens, or even hundreds, of LEDs for ambilight projection.
  • External Source(s) – In my case, I’m feeding an Xbox One and a 2010 Mac Mini into the HDMI input being captured by the Raspberry Pi.  In our household we do our primary media watching with the Xbox One via Plex (driven by the Mini), Netflix, Amazon Prime, and Youtube.  The mini’s there mostly for server needs running a local hubot, plex, and the home-shared iTunes library.

That’s it for hardware; now, keep in mind I didn’t mention cables or input devices such as keyboards and mice. The cables are a given; you’re going to need various USB cables, power cables/adapters, and a composite video cable. Mice, keyboard, bluetooth remotes, etc. are all up to taste — and honestly they’re not required as most of the setup for a Raspberry Pi can, and likely should, be done over SSH in the terminal of your favorite OS.

Software and Configuration

I want to preface this section by saying I am, for the most part, a complete Linux noob. I’ve used the CLI (command line interface) a small amount in the web development trade, but have never lived in it and let it soak in.  With the Raspberry Pi, doing just about anything custom involves spending a decent chunk of time neck-deep staring at the command prompt.

  • Operating System – OSMC (The Open Source Media Center)
    I tried a handful of options here. Originally, I was going to drive the entire project through my Mac Mini (which, btw all the easycaps work with), but I ran into over-heating due to the LED driving software (Prismatik) and the capture card software. The entire setup would shut down around 30 minutes into playback due to the Mac Mini shooting up to 75C. This was incredibly frustrating. I went as far as setting up custom fan control and upgrading the ventilation system in my home theater cabinets.  I settled on OSMC after trying Raspbian, OpenElec, and Arch.  OSMC gives me the comfort of the XBMC/Kodi environment (a great means to test that the LED driver is working correctly after installation), the ability to install external packages (something you can not do in OpenElec, for example),  and has a sizable community to lean on for support. You can do this with Raspbian, but out of the box its setup to run a GUI and has a lot of additional features I just did not need.
  • LED Controller Software – Hyperion
    As mentioned above, I originally tried Prismatik. It’s the software recommended by Lightpack’s creator’s Woodenshark.  It will work and it’s GUI is really easy to use, but it requires a fairly beefy specced PC to do all the heavy lifting and even then I noticed lag.  Also, if you’re like me and store your PC in a home entertainment center or hutch, you’re going to cook it when this software is running.  That’s where Hyperion comes in to play — it’s lightweight, runs in the background, and is super fast.  This can run on a 700mhz Raspberry Pi just as smooth as it does on the new Pi 2. Installation requires just a few commands SSH’d to your Raspberry Pi:

    sudo apt-get update
    
    sudo apt-get install libqtcore4 libqtgui4 libqt4-network libusb-1.0-0 libprotobuf9 ca-certificates 
    
    wget -N https://raw.github.com/tvdzwan/hyperion/master/bin/install_hyperion.sh
    
    sudo sh ./install_hyperion.sh

    This discussion on OSMC’s forums goes through quite a bit of the process more thoroughly, but after performing those commands I had my lights displaying the OSMC screens behind my TV.  After installation you will need to check that your Raspberry Pi sees your Easycap correctly, and then make modifications to your Hyperion configuration. This wiki entry on the Hyperion github helps out a lot with that. I also found this guide helpful in determining the right chipset in my Easycap.  Following the Hyperion wiki the only thing remaining is to remove or comment-out the XBMCVideoChecker and Framegrabber blocks from the configuration file and add in the following to point Hyperion’s V4l2 module at your Easycap device:

    "grabber-v4l2" :
    {
    "device" : "/dev/video0",
    "input" : 0,
    "standard" : "NTSC",
    "width" : 640,
    "height" : 480,
    "frameDecimation" : 2,
    "sizeDecimation" : 8,
    "priority" : 1100,
    "mode" : "2D",
    "cropLeft" : 22,
    "cropRight" : 22,
    "cropTop" : 20,
    "cropBottom" : 20,
    "redSignalThreshold" : 0.1,
    "greenSignalThreshold" : 0.1,
    "blueSignalThreshold" : 0.1
    }

 

The most difficult part of this entire setup fell on finding the right Easycap that has the chipset supported by a Raspberry Pi linux distro.  I would reiterate to everyone getting into this — you likely won’t find the right Easycap on the first try, regardless of who directs you to it, what the reviewers say, etc. They seem to switch these things out randomly in warehouses and they’re for the most part visually indistinguishable. Past that, the Lightpack configuration has it’s own learning curve, but I found it progressively easier to work with.  A few tips for those of you thinking of attempting this:

  • The default plug order on the Lightpack may not be true when using Hyperion. In prismatik the order seemed fine, but once I moved over to Hyperion the order was out of whack. I found running the ‘Snake’ effect in Hyperion and manually rearranging them on the back of my TV was the best way to sort this out.
  • Download the Hyperion app for your phone — it makes controlling it a breeze, and can help for some of these configuration details.
  • You will likely need to play with Black Levels and Saturation to get a happy result. With the Easycap source I immediately noticed all blacks were coming out at around 30% brightness, so I had to drop my black levels on all three colors into the negative to get the result I wanted. It’s not obvious that these configuration numbers can go into the negatives, but they work just the same.
  • Using a static image on screen with various color bars in the ‘zones’ of your LEDs will go along way with configuring the LED placement in the config file.   I created this image from a Prismatik screen grab.
  • If it can help, this is my configuration as shown on the video above.

In closing, this has been a good learning experience and the end result is great. It took me way too long to get to the end, mostly due to the Easycap discrepancies.  It’s fun playing video games, listening to music with a visualizer on, or watching a video stream with the ambilight effect going on.  It’s not for all the time TV watching, but it really changes the mood, makes watching more immersive and easier on the eyes.

  • Tyler Harpool

    Fantastic! Does Hyperion work with two lightpacks? Any extra steps involved for a larger TV that you may know about?

    Thank you for the write up!

    • randyhammons

      I’m considering upgrading to a second lightpack to see how much richer it makes the experience so I have done a bit of investigating. By the sounds of it you reference it as a multi-lightpack device in the config and add in 10 additional LEDs references. This closed issue on the hyperion repository goes into further detail: https://github.com/tvdzwan/hyperion/issues/55

  • Matthew Patane

    Hello,

    Just curious as to if you could go a little more in depth as to how you calibrated the location of the LEDs. I see that in your config file you have 0-9 (10 total) led strips called out. I was wondering if you set you image file in the same order and positions as your LEDs. Is “1” in your image LED Index “0” in your config file?

    Thanks!

    • randyhammons

      Yes – 1 is 0 in the file. I calibrated completely by trial and error: edit, restart, display, wash and repeat.

  • Thomas Swanton

    Hello Randy. I appreciate your tutorial. I’m running a similar set up with my own WS2801. I can’t seem to get the easycap to look at my PS4 rather than whats going on on the RPi. Any tips that may help to resolve the issue?

  • Henk-Jan De Vries

    Hi!

    Good read. Ive been working with prismatik and 2 lightpacks run by a macmini and controlled, partially by indigodomo for a while. All works pretty fine, allthough prismatik might stall when the screen is not really displaying visuals. A restart will fix this.
    Now im thinking of doing your setup and have the capture device capture the main receiver output, therefor capturing dvr, setbox, xbox, appletv, in one haul. Your setup seems quit nice, only the capture device your talking about is not available in europe. It would be pretty wastefull to buy lots of possible similar devices only to find out that it doesnt work.

    Do you have advise?

    Plus do you have any sorts of scematic of your setup, that allways helps to find the similarites

    Thanks!

  • Phillip Hilgert

    I am new to all this, so this really helps. N00b question, do I need the easycap device if all of my video outputs will be coming from my HDMI? I run everything thru my stereo.

  • NotECEC

    Hi, I’ve had this page bookmarked for awhile, but never really needed it since I had my lightpack hooked up to my HTPC directly. Recently I replaced that with a Shield TV, and I’m missing my ambilight. Are there any parts of this you’d update now? Also, does the HDMI splitter mess with HDCP at all?

    My goal is to run the HDMI out from my receiver into the splitter, so I”m hoping HDCP will work without issues.

  • Grant Bruner

    If you realy want to show your project, why not a step by step walkthrough including pictures of the build. It would make a lot more sense.

    • randyhammons

      @grantbruner:disqus, I’m actually upgrading to a two-lightpack configuration soon (unfortunately, there’s a laundry list of other chores to do first) and have been considering doing just this for the process. I’ll be sure to update this post if and when I do.

  • UrySoft

    Ambilight Video Player https://play.google.com/store/apps/details?id=com.urysoft.ambilight

    Ready to use light screen tablet or mobile as Ambilight. Easy to flip the image and synchronization with video playback.

    The idea to get Ambilight is the next, ever tried to put your tablet or mobile behind the screen where you’re watching film focusing on the wall, if it is playing the same movie on the tablet or mobile can enjoy the light generated environment … but there is a problem and you need to play the movie flipped horizontally (mirror effect) that if no ambient light to be generated will be wrong to what you see. It is also difficult to synchronize playback or mobile tablet with the screen you are watching the movie. To solve this we created Ambilight Video Player which facilitates in the mirror effect and incorporates a sequence of syncronización.

    https://play.google.com/store/apps/details?id=com.urysoft.ambilight