Light effect for any device with Video output based on raspbmc or OpenELEC and RaspberryPi

“Good news, everyone!”. If you succeeded in creating light effect using the previous entry:  https://blog.jokielowie.com/en/2014/02/efekt-swietlny-dla-media-playera-operatego-o-raspberty-pi/ you must’ve noticed that it’s limited to the content being played by raspbmc or OpenELEC. Luckily thanks to constant development by hyperion’s creator (tvdzwan) we’ve just got ability to use the effect with other devices that have video output the http://pl.wikipedia.org/wiki/Composite_video. Usually modern STB, Blu-Ray player or amplituners sport a SCART output or the yellow colored ‘Video’ output. What is important – they allow both HDMI and Composite video outputs to be working simultaneously.

What is needed ?

This time we need to get a cheap $10 ‘TV grabber ‘ or Video DVR’ USB dongle. It has Composite Video and Audio (L+P) inputs, and those sticks are used to transfer to new world movies from old VHS cassettes:

Ikona dla Grabbera
Raspberry Pi – with grabber

Hardware and software configuration

So those $10 dongles with different names (i.e. EzCap) are equipped with two chipsets: STK1160 or Fushicai. To check which is in our dongle issue

OpenELEC

Both are supported by latest OpenELEC (Ghost 13), but make sure that lsmod contains (but not limited to) this modules when Fushicai chipet is present:

When STK1160 is present lsmod contains (but not limited to) this modules:

The working grabber can be checked in many ways, for starters let’s issue:

Plese do remeber if you’ve identfied video0 – or maybe video1 this is important for configuration.

So we’re ready to test – lets grab our first video frame:

The result should be the screenshoot.png file – you can use the Pictures menu in  OpenELEC to view it or transfer via Filezilla to PC and view it there.

If you don’t have input video the picture is going to look like this:

Brak sygnału Composite
No Composite signal

If the composite input signal is present and OK you will get a greenish picture – just like form the first days of television:

Niezły domyślny sygnał Composite
Good quality Composite signal

So it works! Don’t worry about the greenish tint we will get rid of with by decimating the frame – we don’t need such precision. Now the part of the kernel that takes care of the grabbing is called Video 4 Linux 2 or simply V4L2. This is enough to make it running – please add the new section of the configuration to /storage/.config/hyperion.config.json but before last bracket:

Now lets allow OpenELEC to use remote controll – menu Settings->Services->Remote Control->Allow other programs to control remotely. This is crucial to tell OpenELEC that we’re in menu or we’re palying a movie using OpenELEC – which will use the proper source for LED control.

Let’s test then! The effect should be visible while you’re in  OpenELEC or raspbmc main menu (so right after start), but please check if Hyperion, is grabbing the frames while in menu. To turn of the grabbing – go to   hyperion.config.json – and change –  “grabMenu” : false,:


What’s the stress for Rpi 1 ? Using 96 LED,  Raspberry PI B 256MB (the oldest model available) looks like this:

But what if you no longer have Composite/AV output from your other devices ? The answers is simple – use HDMI splitter and HDMI to AV converter.