It may seem confusing that you’re looking at a Raspberry Pi when this hack is about an Ambilight clone system that doesn’t need a computer. The point here is that this system works no matter what your video source is, where many projects in the past have required the video to be playing from a computer.
This hack follows in the same path of the ARM based custom job we was almost a month ago. Just like that project you use an HDMI splitter to gain access to the feed going to your television. The split signal is fed into an HDMI to composite video adapter. The composite signal is captured by a USB video encoder. The GPIO header drives a strip of addressable RGB LEDs. The whole thing is powered as one using a bit of cable hacking.
It’s slightly convoluted. But all of the components are easy to source and relatively cheap. The one caveat is that it works best if you are already using a hardware HDMI source selector instead of the one build into your TV. That way there is just one HDMI cable going to the television, and this can siphon off of that feed.
So I have 5 meters of the 60LED/m WS2811 led strip, which has the 2811 IC chip built into the LED housing itself. Would that strip work with this? Or would the code driving the strip have to be different?
Woops nevermind, the raspberry pi does not have the timing needed for the WS2811 LED chips.
Check out this German forum thread, maybe you can translate it.
Its a SPI to WS2811 Logic Converter
http://www.ledstyles.de/ftopic21707.html
If you decide to go down that route, it should be fairly straight-forward to extend the ambi-tv software to support different LED drivers – check out the “Extending ambi-tv” section in the github readme.
basically, ambi-tv consists of individual “components” (such as the “edge-color” or “average color” processor and the lpd8806 “sink”), and by writing your own components, you can extend it in a straight-forward way, and if you send me a pull request, everyone will benefit from your efforts ;-)
Well it won’t be me …ha.. I switched out of electrical engineering to civil….the coding for EE was bad enough
what you call it a “computer” just because it computes and has all the basic functions a computer has? PFFFT noob!
but seriously nice work!
According to google’s second definition a computer is A person who makes calculations, esp. with a calculating machine.
I wonder if I could hook up some switches and get illegals to do this for cheaper.
i think thats how NASA does it these days
wouldnt the splitter use the EDID from the lowest common denominator device (the composite adapter), therefore limiting the HDMI output going to the screen to 480 lines?
would i rather have high resolution video, or lights behind the screen… hrmmmm
no, this is not what (at least) this splitter does – the EDID is taken from the device connected to splitter output 1, whereas splitter output 2 receives the exact same signal that 1 receives. the HDMI/composite converter can decode up to 1080p and supports HDCP content, too.
wow thats great! not all splitters perform like this.
Its a splitter.. as in one half goes to HD tv, the other half goes to composite to the Pi to generate the lights! So you get the full quality of HDMI with the lights (don’t need to the full res to get the lights pretty much right!)
don’t worry, your screen still receives the video content at full resolution.
Nice hack. If I had a tv I’d decide to copy it in a microsecond :)
slightly off topic: I’m glad to see a usb composite framegrabber works with the pi, I had another idea involving those 2. If it works out, or fails horribly I’ll submit it th HaD :)
How is the lag on this with all the conversion and capturing etc? It would be distracting if the LEDs lagged the picture by a frame or 2.
no noticeable lag for me – have a look at the video, it’s a pretty accurate depiction of what the effect feels like (also, in the video, I have the software configured to set the LEDs to a running average of the last 3 frames, and it still doesn’t appear as if it lags at all (in fact, the tightness of the setup was something that surprised me as well, since I was also afraid that there might be an annoying lag).
Very neat. Finally one I can build.
Is there a limit to how many leds it can drive? I want to use it on my 100″ projector screen which probably is 30′ in circumference. Thats a lot of leds…
If it is a splitter, won’t i get 50% image quality? It sucks to have 1080p downscaled to 540p just because something blinks. And with 720p, being decent when real, it would be 360p. That’s not worth using a splitter.
again, this is not how the splitter works: Your screen receives the EXACT SAME data as before, only that the data is duplicated on a second output port as well. No downscaling or image degradation (granted, there are cheaper, unpowered splitters that actually do degrade the signal, but the one I’m using (and linking on the github docs) is absolutely unnoticeable imagequality-wise).
isnt hdmi digital?
splitting hdmi is more like making a duplicate
there shouldnt be a quality change
exactly. the only thing a cheap splitter could do is sending its own EDID to only accept 480p or 720p, but the one I’m using passes through the EDID of the device connected to output port 1, whereas output port 2 will receive an exact copy of what port 1 receives.
Hi,
I have a powered HDMI splitter (should be called a duplicater), but when it is connected to the HDMI to AV converter which in turn is connected to the grabber, itself connected to the Raspberry Pi, the TV signal is downscaled to 480 (from 1080p, 720p or whatever).
When I disconnect the converter or any piece of the chain, the signal to the TV dinamically reverts back to the original resolution.
I tested plugging the two outputs from the splitter to the TV, and I get two 1080p signals for instance (switching between HDMI1 and HDMI2 on TV). Again, if I plug the splitter output back to the chain that finishes as 480 AV signal, the HDMI that goes to TV is downscaled…
Its the converter causing it. Your converter will only take a 480 input. You need to exchange for one that supports 1080p as an input.
Thanks for replying.
I bought this one : http://www.dx.com/es/p/playvision-hdv-m610-mini-hdmi-to-av-video-audio-converter-white-152345
All models seem equal, but prices range from 12$ to 50$… Without noticeable differences in the specifications…
They say on the product page :
– HDMI input format: 480P, 576p, 720p, 1080i, 1080p at 60Hz, compatible with 800 x 600, 1024 x 768, 1280 x 720, 1280 x 1024, 1920 x 1080 at 60Hz
– AV video input: 480i, 576i (Selectable)
So indeed two contradictory statements, but I really thought buying it that it would be compatible with a 1080p input…
Could you point me to a good one ? Preferably something I could easily buy from Europe :-p
Thanks
I was doing the exact same build, but I did not manage to use my easycap with the pi.
Why don’t you use boblight-v4l for color detection ?
Have a look at the bottom paragraph in the github docs: I’m using an Easycap-branded grabber with the as-of-yet unsupported fushicai usbtv chipset, but I found a work-in-progress driver for this in linux-next and modified it to output PAL (which, having less fps than NTSC, doesn’t oversaturate the Pi’s USB bandwidth). The hacked driver is in my repository, too.
I didn’t use boblight because writing your own software is half the fun of actually building something like this (also, I found lots of posts from people failing to set it up on the Pi, so I didn’t even bother to try it).
I’ve read about your driver, unfortunally I have a somagic chipset. But your work may help me find what’s wrong with mine.
Boblight runs fine, I just have no image input to give to him ;-)
Could you (gkaindl) let me have the url to your repository I’m trying to turn some older security cameras into webcams( So I dont have to entirely rewire the place) using a RPi and analog to USB dongles. It turns out the dongles have the Fushicai chips and I’ve been looking for a driver that works.
Any help on installing the driver from your repository?
insmod usbtv/usbtv.ko
Error: could not insert module usbtv/usbtv.ko: Unknown symbol in module
and dmesg shows a ton of:
[ 7977.122800] usbtv: Unknown symbol v4l2_device_unregister (err 0)
[ 7977.122850] usbtv: Unknown symbol video_device_release_empty (err 0)
[ 7977.122895] usbtv: Unknown symbol vb2_ioctl_reqbufs (err 0)
Not super familiar with compiling kernel modules
Nice one. Do you plan to include IR support so it will be possible to switch programs and turn it off and on with remote? http://www.keiang.de/Content-pid-51.html
Well this could already be possible with lirc and as far as i know the support is already included for ir diodes, but correct me if i am wrong.
Also it would be nice to support WS2801 chip.
Instead of using a pi, could you use say vid capture in a htpc and output led signal to say a arduino?
This is what I’d be more interested in as I already have a low-power linux-based server that could do all this processing without need for an additional Pi. Plus my media is played through several sources so the capture card seems ideal. I will be trying soon and see if I get anywhere, I’ll report back with findings.
I’ve just set this up, and it appears that there’s a problem with the RCA converter. Without the converter plugged in, everything works fine i can split the signal and get HD on both outputs of the splitter – but with it connected, the HDMI feed is downgraded to 480p. It seems that the splitter will take the lowest common denominator that is connected to it, and report that resolution to the device – this is causing my PS4 to display at 480p, which is horrible to say the least.
Can anyone recommend an HDMI to Composite converter that will report signal capabilities of 1080p so i don’t get downscaled by the splitter?
As i think about it more, i wonder if this is the converter not being able to accept HDCP – is that a possibility here. Doesn’t an HDMI signal get dropped to 480p if you can’t negotiate HDCP?
Nope, not HDCP – also found that if i unplug the converter, reboot the PS4 and get everything back to 1080p… plugging the converter in again results in no LEDs lighting and no signal to the easycap. Clearly that converter is the culprit, so back to my original question. Any links to converters capable of accepting a 1080p input available in the US would be greatly appreciated. And sorry for the spammy rapid fire replies.
Hi, did you manage to get what you were looking for ?
I have the same problem and am face with a dilemma : 480 with LEDS or 1080p without… The HDMI feed adapts to the lowest receiver which is the HDMI2AV converter. If I unplug it the TV receives 1080p once again…
Look for one that lists 1080p as an input. I got one of the cheap ones because my new camera DVR had no analog outputs on it, and I wanted to modulate it. First one wouldnt work properly, because although the NVR would output 480P the user interface was basically useless with things overlapping and going off screen. Another one that was about $35 has a scaler in it and works fine.