In order to create ambilight effect for any video signal, the key thing is to buy the right video grabber. When you see that someone installed “easycap” grabber you may suspect that when you buy one you will have the setup that is ready to use. This is very wrong assumption… :) unless you are lucky – and this is why…
Installation and testing of the grabber consists of several steps:
0) you need to have specific version of Raspbian in order to install and use video grabbers. For utv007 the one from 2013-07-26 worked the best. For stk1160 the one from September’13. Download it and dump to sd card.
1) configure raspbian by extending the partitions (through raspi-config)
2) install the driver
3) install mplayer
Before we go to installation steps few words about the hardware…
Easycap usb grabber comes with (at least) 4 different chipsets – these types are very well described on this web site . You can check there how to distinguish one version from another based on lsusb output.
I have had 3 of them: somagic, utv007 (Fushicai) and STK1160.
Another interesting thing is that there are many different versions of grabbers based one the same chipset! Actually I have not found a way to distinguish exact manufacturer and usually you don’t need to know anything except the chip. I wrote “usually” because I was unlucky enough to buy stk1160 grabber that had awful cropping which is not common issue with this type of grabber…
The only thing I managed to get from the first one is message : insufficient memory :) so i will not cover all the work I did.
STK1160 worked (almost) out of the box, BUT i had significant cropping of image in horizontal and vertical direction.
“Wait! Why did you write ‘almost’?” For some dumb reason, I had to execute the following statement
sudo sh -c "echo 'options easycap bars=0' >> /etc/modprobe.d/easycap.conf"
Otherwise I was getting nice image for about 1sec and then very nice and sharp grey stripes. Go figure…
Mplayer was laggy. I had also slow response time for the ambilight effect (not mentioning lack of color accuracy caused by significantly cropped image). Maybe I had some faulty piece, becasue I have heard that for others it works well.
Based on my experience. I would rather not recommend it to anyone.
[update] cropping can be avoided by specifying PAL as video standard. There is no cropping in such case.
UTV007 took some time to install, but it was worth an effort. Video was nice and less laggy than stk1160 chip. And here is how you can install it: (based on https://github.com/gkaindl/ambi-tv/issues/48)
REMEBER! You need right version of Rasbian (see above) and 4GB SD card
sudo apt-get -y install usbutils
sudo bash get-kernel-source.sh
sudo mkdir -p /lib/modules/3.6.11+/extra
sudo cp usbtv.ko /lib/modules/3.6.11+/extra
sudo depmod 3.6.11+
sudo modprobe videobuf2_core
sudo modprobe videobuf2_vmalloc
sudo modprobe usbtv
What you’re doing here, is you download ambi-tv code which has driver for UTV007 and you compile it plus you load driver and other modules to memory. Be patient, because downloading kernel sources takes a lot of time.
To have it working after reboot you need to modify
sudo nano /etc/modules
Add foillowing lines:
In order to see video from our grabber the most common way is to use mplayer.
sudo apt-get -y install mplayer
After it is installed run it loke this:
mplayer tv:// -tv device=/dev/video0 -hardframedrop
I hope you see video on the screen that is connected via HDMI :)
It you see artefacts, you can overclock RPi to get rid of them.