Hyper, hyper,… Hyperion

How to create a standalone ambilight gadget based on Hyperion and Raspberry Pi

Update 1: Now includes effect engine. Also update Hyperion on Android.
Update 2: The installation script takes care now of startup even, if upstart script is not available. The main difference is that you do not need to use rc.local anymore.

 

1. What do you need:

    • Raspberry Pi
    • At least 4GB SD card
    • LEDs (I am using WS2801 based one. I’d recommend you to get those one since they are 8 bit. Also remember that WS2811 based one are not supported.)

WS2801_LEDS

  • USB Video grabber (Use one based on STK1160, since it is supported out of the box in RPi. I assume you can also use one based on UTV007 chip. Somagic based one, do not work under ARM architecture.) This one works eBay link.

USB_Grabber

  • Powered HDMI splitter

HDMI_Splitter_1

  • HDMI2AV converter (it converts HDMI to S-Video signal). Be careful that it is HDMI2AV and not AV2HDMI.

HDMI2AV

  • A good power supply (5V 5A for example this)
  • Power jack

power_jack

  • Few HDMI cables
  • S-video male to male cable or adapter
  • Some wires, solder, soldering iron,…
  • Optional: If you are going to power LED, RPi and HDMI Splitter from one power supply, you can buy on e-Bay this DC splitter. (always double check polarity +/-)

DC_Splitter

 

2. Lets begin….

First download the following image »2013-09-25-wheezy-raspbian.zip« from http://downloads.raspberrypi.org/raspbian_latest and image it to SD card with Win32DiskImager. After that insert newly created SD card into RPi and power it up. Now when RPi is up and on network, SSH into it and execute command:

sudo raspi-config

These two pictures shows, what you need to enable, under advanced settings (SSH and SPI) to get SPI and SSH work.

Advanced OptionsEnable SPI

Then enable root account:

sudo passwd root

You can now insert your USB grabber and check if it is recognized with:

lsusb

If it is,  you should see new port in /dev/video0

(Note: here I am covering only USB grabber based on STK1160 chip. If you have other one, then you have to make it work first, before continuing. Some chip-sets are not working under ARM.)

Now it is time to install pre-requirements:

sudo apt-get update
sudo apt-get install libqtcore4 libqtgui4 libqt4-network libusb-1.0-0 libprotobuf7 ca-certificates mplayer python-dev
cd /tmp
wget -N raw.github.com/tvdzwan/hyperion/master/bin/install_hyperion.sh
sudo sh ./install_hyperion.sh
sudo rm /etc/init/hyperion.conf

(ignore the error at the end of the script “install_hyperion.sh”. It is upstart script related and we will not use it anyway.)

Ok so hyperion is installed and almost ready to go. We just need to make it autostart.

sudo nano /etc/rc.local

And add the following startup commands in it. You can experiment with mplayer switches to find the sweet spot and feel free to share it:

/usr/bin/gpio2spi </dev/null >/dev/null 2>&1 &
/usr/bin/mplayer -tv driver=v4l2:width=72:height=58:device=/dev/video0 -vo fbdev -fs -fps 15 tv:// </dev/null >/dev/null 2>&1 &

The hardest software part is done. Now you need to create configuration file for Hyperion.

Go to https://github.com/tvdzwan/hyperion/wiki/configuration  and download config tool. Also read the manual, so that you will know how to create it :)

After you have created config file “hyperion.config.json” copy it to /etc/ and replace it with present one. The easiest way to copy file is with WinSCP and root account or. you can copy into /tmp directory and then move it with cli command.

sudo mv /tmp/hyperion.config.json /etc/

 

Scripts….

If you want you can create additional scripts under /media/scripts/ which you will be able to execute if you would like to use different inputs on USB grabber. For example as standalone ambilight to process TVs internal tuner like DVB-S, C or T. Check connection diagrams for an example. To use S-Video out, your TV must support this feature. You will also need the connector with In/Out switch like this one on the picture below.

Scart

Those scripts are easy and they can look like (TV_ambilight.sh):

#!/bin/bash
killall mplayer
killall hyperiond
/usr/bin/mplayer -tv driver=v4l2:width=72:height=58:input=2:device=/dev/video0 -vo fbdev -fs -fps 15 tv:// </dev/null >/dev/null 2>&1 &
/usr/bin/hyperiond /etc/hyperion.config.json </dev/null >/dev/null 2>&1 &

Notice the command switch :input=2: This defines the yellow input on USB grabber.

If you own an Android phone, then I’d recommend to download ScriptKitty.google-play-logo1.jpeg.

With this app and root access to your RPi you will be able to execute scripts, that you have create under /media/scripts/ with your phone. This way you can switch different video inputs or. make scripts whatever you like to do for you.

For Hyperion there is also a nice app on GooglePlay which allows you to control Ambilight from your phone over network.
I’d also recommend this app to find the perfect light calibration for your leds. You can simulate in real time every settings and later put it into Hyperconf tool to create perfect config file. Also consider buying full version to support developers. Click on icon below to download it.

Hyperion

 

Hardware part

I will not cover any details on hardware part since it is covered on official Hyperion site https://github.com/tvdzwan/hyperion/wiki/hardware

Connection diagrams:

Drawing1 Drawing2

Since I am using a good power adapter, I am able to power all devices with a single power brick. So I am powering RPi over GPIO pins, HDMI splitter, HDMI2AV does not need any power, since it is juiced over HDMI and of course LEDs.

diagram_custom

Note: this should be your last step and make this one when you are certain, that everything is working as it should and triple check wires (polarity +/-) before connecting to power, because you can destroy them easily. Also for every connection use separate GND.or. it is possible that LEDs will flicker.

 

How can I connect my RPi to WiFi with CLI???

First you need compatible USB Wi-Fi adapter.With the following commands you can connect RPi to your Wi-fi network.

Now lets connect to Wi-Fi over CLI:

wpa_cli
> scan
> scan_results
> add_network
> set_network 0 ssid "your_SSiD"
> set_network 0 psk "YourPassword"
> enable_network 0
> save_config
iwconfig

command will show your current wireless config.
Using the

ifconfig

command to show you ip address for the wlan0 interface.

 

Feel free to buy me a house…

 donate-with-paypal

 

Below are few pictures and links, just to get some ideas….

In development stage as you can see…Quick preview of ambilight on XBOX 360 and Raspberry Pi: First time played on TV

2013-11-25 16.45.00-large 2013-11-25 21.12.31-large 2013-11-25 21.12.42-large 2013-12-02 07.47.16-large 2013-12-02 07.48.03-large

160 thoughts on “Hyper, hyper,… Hyperion

  1. Hello, is it possible to take LPD8806 RGB-LED`s instead of yours?
    I have a ambi-tv setup and i`m not very happy with it, i would love to try hyperion with my led`s? is there any tutorial for wheezy? good work…

    • Hi.yes 8806 leds will work with hyperion since they are supported. There is no tutorial atm but I am going to write one in few days. The basic setup will be simple and since you have already managed ambiTV this step should be much easier. The benefit will also be that you will be able to use Android app to switch colors and probably also inputs.

      • can`t wait for your tutorial! :-) got hyperion now working via raspbmc and its great!!! but i don`t want to start raspbmc everytime i want to use hyperion! i`ll have a look on the app in a minute or so…
        thank you in advane!!!

  2. OHHHH!!! Thanks man
    I have some questions:
    - Can you do a tutorial step by step how to cinfigure the rasperry pi and all stuff?
    - What is better and brighter…bulbs led or strip led?

  3. This is Great! Will it work in integration with raspbmc and xbmc or individual software running on rPi? Would you like to share your software or we must wait until is done stable version? Very nice project.

    Best regards.

    • It is already made and you can try it. It is Hyperion and it was not written by me. Originally it is meant for Raspbmc but i have made it act as standalone.

      • Yes , i am familiar with hyperion + raspbmc. But idea is to expand the functionality of Hyperion as you do.
        My point is! Is it possible to run at the same time on one rPi your standalone setup (TV, DVD, consoles etc) AND raspbmc for playing media stuffs. ALL in ONE ambilight and HTPC!
        I`m confused about your standalone setup!!! You gonna use raspbmc or perhaps something else as a software base on rPi? Please explain me.
        Best regards.

        • In tutortial I will use 2013-09-25-wheezy-raspbian image as base. In latest Raspbmc usb capturing is not working. This tutorial will be explained as standalone so without XBMC. But as i said nothing stops you to use it in on other images like Raspbmc and try to figure it out.
          This is meant as alternative to AmbiTV which is not actively developed and users can than use Hyperion as standalone.

          • Can you tell me how soon the tutorial will be finished. I can`t wait to see :).
            Best regards.

        • My point is I want to use your standalone system for all purpose ambilight at the same time I use XBMC on raspberry PI.

          • Thank you for your reply. I figure out what you mean. Sory for my last message was before i was reading your reply. Thank you .

  4. Idea: Version 2 of your stand alone system. Instead of rPi use of laptop, arduino and pc based software! Other components are the same! For those who demand more power full HTPC.
    Best regards.

  5. F***!!! need to by another videograbber… i have the logilink from the ambi-tv tutorial and i don’t get it work :-( i have to wait a few days for amazon…
    but thank you verry much for the tutorial!!!

  6. Hi,

    I also own the same grabber like _Jackson_.

    So ambi_tv is working fine for me. But I’d like to give hyperiond a try.
    But I have one problem.

    If I execute “sudo mplayer -tv driver=v4l2:width=72:height=58:input=2:device=/dev/video0 -vo fbdev -fs -fps 15 tv://”

    I get the following message:

    VO: [fbdev] 720×576 => 720×576 BGR 16-bit [fs]
    screensize is smaller than video size
    FATAL: Cannot initialize video driver.

    FATAL: Could not initialize video filters (-vf) or video output (-vo).

    v4l2: ioctl set mute failed: Inappropriate ioctl for device
    v4l2: 11 frames successfully processed, 2 frames dropped

    If I execute it with “-vo x11″ instead of “-vo fbdev”. I can see the video fine.

    Hyperiond is started and running. But my LEDs don’t do anything.

    Did I missed anything else? Do I have to configure anything else.

    By the way, if I use hyperiond with xbmc, or also boblight it works like a charm.

    Thanks for helping

    • Hmmm… First for every driver the switches are different. I have two grabbers and both uses different switches for mplayer.
      I assume that if you are using x11 you will need to create a configuration file to capture smaller square in the middle of the screen.
      The second thought is that it can be a problem for hyperion to capture x11.
      Also worth a try is to execute a static command to see if the leds are ok:
      hyperion-remote –priority 50 –color red

        • just a short update.

          Problem for me is starting mplayer in fullscreen mode is not working.

          If I start it with “mplayer -tv driver=v4l2:width=72:height=58:device=/dev/video0 -vo fbdev -fps 15 tv://” hyperiond starts grabbing and the leds are working.

          • No need to star in full screen. If it works then it is all good. Just try to find out the perfect configuration with Hyperion configurator.
            As i have already said finding the perfect play for mplayer and USB grabber is tricky. Every USB grabber chip perform different. So feel free to post your grabber info and the command of mplayer. It can be helpful for other users.

  7. So you power all the stuff with only one power supply of 5v and 6A, right?
    also i bought an easycap from aliexpress, didint know if it is going to come with the stk1160 chip, lets wait and see!!

    • Yes i am able to power everything from one power supply. It has to be good one. This should be your last step when building this project.
      The link i have provided to eBay at the beginning is USB grabber based on STK1160.

  8. no luck until now…
    compiled the drivers, video0 is in dev, mplayer works but hyperion is not working correctly:-( hyperion boot sequence is working fine and after that i only get flickering led`s at the bottom right!
    hate to wait for the new grabber:-(
    @YoBnEb: are you from germany?

    • I think you have to play around with th mplayer width and height and also with the framegrabber settings in the hyperiond config file.

      I tried several values for the last two hours and all leds are working (not only bottom right). But the leds don’t match the tv picture ;-(

      Maybe I will try it again tomorrow.

      And yes I’m from Germany.

  9. Where did you get the right-angle connectors shown in the last few photos? I’ve already got the LEDs and the like purchased, but I didn’t even think to look for something like that when I got them.

  10. i managed to do all the setting and when boot up, i can see the rainbow light , but when i play movie from media player or laptop, the light doesn’t show up,
    do i need to install mplayer into my raspberry pi?

    • Sure you do. Mplayer is one of the major component. Read again the tutorial, because later on you are going to call the mplayer with specific parameters to be able to display lights.

  11. Hi, great tutorial. I’m still undecided but, before I buy everything I need, I have some question. Can the HDMI splitter manage 3D signal from 3D blu-ray player? If so, I will have, from one output, a 3D image to TV and, from second output, a 3D image on HDMI2AV to Raspberry pi. Can Hyperion manage 3D signal without any issues? So what kind of 3D HDMI splitter I need?
    Sorry for my english.
    Regards

    • Hmm. The problem with 3D image will be the signal that comes to RPi. The image will be processed as side by side i assume. So I am not 100% sure if it will be ok but i have doubts. HDMI 1.3 is capable of 3D so this is ok.

      • My 3d movies are only in Frame packing format (original blu-ray), not side by side or top bottom. So this means I have two images stacked frame by frame I assume. I Hope there is a solution for that.

        • Based on screenshots i have seen, i assume it could also work with frame packing, but do not brake my leg if it foes not :) My bet will be that it works. Feel free to report back.

  12. Hey Guys,

    sorry for my english in advance (i’m a Dutchmen)

    I think I have got the same problem as the gentleman below. For what I can see (my rasbarry pi is headed – my mplayer got 1 sec delay and stutters a lot,

    My cpu is pritty high to (command: “top”) 90-100%
    And i’ve got the following error continuesly:
    Frame too small! (812168<829440) Wrong format?
    V: 0.0 120/120 4% 67% 0.0% 0 0

    I am trying different settings in mplayer i even tryed VLC put it didn't loosen up things.

    Could you please help me with some guidens (and maybe the cool fella bellow)

    YoBnEb: "I tried several values for the last two hours and all leds are working (not only bottom right). But the leds don’t match the tv picture ;-("

    • I found out that whatever i try the resolution stays 720×576

      The code I try is:
      mplayer driver=v4l2:width=72:height=58:device=/dev/video -vf scale=72:58 -vo fbdev -fs -fps 15 -vo fbdev skiploopfilter=all tv://

      • Update:
        with the following command I will get a smaller frame but the video is still delayed and stuttering “mplayer tv:// -vf scale=72:58 -vo fbdev”

        • And what is the cpu usage? (‘top’ command in shell)
          Also which grabber are you using?
          Small delay is possible but nothing noticeable on leds.

  13. I deleted Mplayer, with sudo apt-get –purge mplayer and installed mplayer2 al the problems are gone.

    No latency no stuters and it is running on 720×576, if I resize is (scale) than i get more problems.

    I have only one question.. how can I get rid of this error because it is giving me artifects every 2 seconds:
    Frame too small! (825248<829440) Wrong format?

    • Ok nice info. I have not experienced any performance issues with mplayer and the CPU was around 60%.
      You will get frame too small if something is wrong with resizing or also bad cables can cause this. Also rtry to reduse the captured frames to f.e. 18 this will lower CPU usage and will maybe try to figure it out what could be wrong. I’d suggest to use short cables and experiment with different settings.
      I think in a few weeks or. maybe days there will be a new version of hyperion which will include all the grabbing stuff and take the work from mplayer. I think it will be much better.
      Also take a note to try out the new effect engine in Hyperion which works also in standalone version.

  14. Hi admin, yea, I’ve already set to 8806, screen got picture came out, but led light will no response after the rainbow sign.

      • This chipset uses hacked drivers afaik. Those driver can compile only under specific kernel version. I think someone mention it in the comments. So it will be a little bit different process to get the drivers work.

        • well, actually the fusichai driver manage to get work , i can see the video0 as well as the spidev0 or spidev1.

          can see the rainbow light when boot up, but when play video (screen got image) but still the light no response.

          any idea that i make a mistake?

          Thx

          • Well configuration file is not setup right.
            To troubleshoot first see if you can see a video from svideo source (hook it to a hdmi monitor).

  15. Hey

    Happy new year in advance

    I followed your guide, got everything working, lights work according to the picture displayed on mplayer.

    The problem I have, I got a splitter, one going to the pi via the grabber and the other to the tv. If I watch the video on the TV, then hyperion is 1 sec delayed so the lights don’t match the image on the TV. But if I watch through the pi, then its fine, laggy but fine

    I ran through the config of hyperion, and reinstalled it step by step but still no joy.

    Any help/advice would appreciate it

    Thanks

    • I think someone of the users has experienced similar problem. So if CPU usage is not 100% then try with mplayer2 instead of mplayer. Search through the comments.

        • Hey,

          Mplayer kinda worked, the picture is now in sync with the other hdmi which goes straight into the tv.

          but the image at times, jumps, but when it jumps its a different colour.

          lets say the image is red, 50% of the screen will jump but when it jumps is a blueish or basically another color.

          seems im slowly getting there lol

          Thanks

          • Jumps what? Why it jumps? How does it reflect to the screen (use HDMI output to see what it does)?
            Maybe the problem can be the svideo cable.

  16. Hey, ok the problem is in the grabber and the pi

    I found post from Manotje90 (above) in a Danish forum. (thank god for google translate). I have the same grabber as him and got the same problems. He managed to fix it.

    trying to get hold of him for advice.

    Sorry, when I said it jumps, I meant I see artefacts on the screen. Its cause Mplayer is getting that error, Frame too small! (825248<829440) Wrong format?

    so I see artefact on the screen.

    Thanks

  17. Dear Admin,

    I got everything set up: I can see the HDMI video input on my TV via the video output of the Pi, so the video is grabbed. However the led string (WS2801) is just displaying random colors. I’ve been trying different configurations for hours, but it never seems to display the video input.

    Could you please post your hyperion.config.json configuration, so I can compare?

    I just use the default rc.local:
    usr/bin/gpio2spi /dev/null 2>&1 &
    /usr/bin/mplayer -tv driver=v4l2:width=72:height=58:device=/dev/video0 -vo fbdev -fs -fps 15 tv:// /dev/null 2>&1 &
    /usr/bin/hyperiond /etc/hyperion.config.json /dev/null 2>&1 &

    This is my hyperion.config.json (so far), witdh: 29 leds – height: 18 leds:
    http://pastebin.com/7pZqcAxx

    • Do not paste the whole config file on the blog.
      Well your problem seems electrical one. There are few options to troubleshoot:
      1. Check if GND connections are good.
      2. Check if your stripe is RGB or. GBR or. whatever. You can do this by manually executing the ‘hyperion-remote –priority 50 –color red’ and then continue with green and blue there i a parameter in configuration utility to define the color order. Different stripes uses different order.
      3. Also make sure that you are using the latest hyperion (just rerun the script) because one version has the problem with not displaying the red or green color. Also use latest config utility.
      4. Hook a monitor to RPi HDMI port and check if the capturing works ok.
      5. Also you can execute affect engine first to check if that works (check official site).

    • Hi Elgar,
      maybe the grabing size is your poroblem.

      “framegrabber” :

      599.
      {

      600.
      “width” : 72,

      601.
      “height” : 58,

      602.
      “frequency_Hz” : 10.0

      603.
      },

      I was having the same problem.

      My config was – width 34 leds:hight 20 leds. And i start with the default config file. I have used the configuration tool and only changed the led configuration there to my number of leds.
      And everything works fine :)

      Then i start to “tune” the configuration and when i choose a 4x display grabing size in my config…json file: width 136:hight 80 …
      everythig goes to random color /in my point of view/

      So – there is some relation between framegrabber sizes and displaying of “right” colours …

      Now i’m with 160:100 and everything works again :)

        • Dear Admin & tatiVladi,

          The problem with the random colors was indeed the ground. I connected the ground of the LED’s directly to their seperate power supply. Now that they are connected to the Pi, it works.

          It took me a long time to configure Mplayer and the config…json file. I noticed that it makes a difference if you use the 2013-09-25-wheezy-raspbian or the newest one. I used the 09/25 one. Unfortunately if I keep the displayed video size of Mplayer small, it works without lag or flickering, but I can’t get the LED’s to capture the small frame. When I have a bigger resolution (720×576) the LED’s work perfectly, but I got a delay of almost 1 sec.

          My solution was to zoom the smaller image:
          /usr/bin/mplayer -tv driver=v4l2:width=384:height=288:device=/dev/video0 scale -zoom -vo fbdev -fs -fps 25 tv:// /dev/null 2>&1 &

          and set my config…json to width=768 height=576.

          Now I got a new problem: everything works, but when I mount the LED’s to the TV they pick up signals from the TV and get interference, they start displaying random colors again. This clearly is a hardware problem.

          Is there a way to fix this?

          Best

          • Are you sure there is no contact between leds and tv-shield?
            Also turn off the tv and leave ambilight on so that the leds will still react to the picture.
            I am sure this is electrical problem with your wiring.

          • Dear Admin,

            It indeed is an electrical problem. The LED’s or wiring aren’t making contact with the TV shield. The problem also occurs when you just hold the LED string near the TV without touching it.

            Any thoughts on how to fix it? Do you need more info?

            Best

  18. Hi Admin,
    first of all i would like to thank you about your blog, and to apologize for my english. I’m french.

    I was looking for an ambilight project for my home theater since few weeks/months (maybe).
    The advantage of your project is the versatility of the various “input” sources.
    Today, I decided to buy all the equipment needed for this project. I want to clarify that I have never used a soldering iron in my life lol, but I’ll still try to train before receiving parcels.

    Since I am not very expert in electronics, I decided to buy which will minimize the various welds.

    So I purchased to connect all on a single power supply:

    1) 5v 10A 5.5mm adapter :
    http://cgi.ebay.fr/ws/eBayISAPI.dll?ViewItem&item=310776117180&ssPageName=STRK:MESINDXX:IT&_trksid=p3984.m1436.l2649

    2) a power splitter :
    http://cgi.ebay.fr/ws/eBayISAPI.dll?ViewItem&item=170744997570&ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649

    3) a micro usb to 5.5mm adapter ( solder less) :
    http://cgi.ebay.fr/ws/eBayISAPI.dll?ViewItem&item=221346584882&ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649

    4) jumper wire :
    http://cgi.ebay.fr/ws/eBayISAPI.dll?ViewItem&item=231012688798&ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649

    5) Power jack like in the tutorial :
    http://cgi.ebay.fr/ws/eBayISAPI.dll?ViewItem&item=141016252867&ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649

    6) a micro -switch button ( I saw in one of your photos, I search the net how to incorporate it , I finally found ) :
    http://cgi.ebay.fr/ws/eBayISAPI.dll?ViewItem&item=321273565650&var=510197741035&ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649

    Regarding the LEDs, I found L-shappened solderless connectors:
    http://cgi.ebay.fr/ws/eBayISAPI.dll?ViewItem&item=321185452683&ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649

    and other connectors:
    http://cgi.ebay.fr/ws/eBayISAPI.dll?ViewItem&item=261357074597&ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649

    I should probably solder between the wire and the first LED …

    I bought these LED stripes:
    http://cgi.ebay.fr/ws/eBayISAPI.dll?ViewItem&item=310773647613&ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649

    Finally, I bought a raspberry Pi model B, a housing and three heatsink.
    I bought the same video splitter, hdmi converter and easycap video capture adapter as the tutorial.

    Until I receive the various components ( in 2-3 weeks , I think) , I have some questions:

    1) Can you explain me how to connect the raspberry pi micro- usb ( I do not want to make a mistake by connecting twice ( micro USB and power jack) ) .
    I want a dc jack for raspberry micro -usb and also connect the LED with another dc jack splitter . How can I do this?

    2) Is it possible to detail by photos or other how the LEDs are connected ?
    I ask myself for mounting between the raspberry and the first LED .

    3) In what sense connect different LED (clockwise or counterclockwise ) ?

    4) I read in your tutorial that you used the ” 09.25.2013 – wheezy – raspbian.zip ” picture. for several updates came out , so do I use the latest version on the Raspbian site?

    5 and last question for tonight lol) ) Is it possible to define a “dead zone led” in the Hyperion software?
    (I have a sheath for wires in the middle of the lower part of my tv , 2-3 leds max)

    Again thank you for this project, your very detailed tutorial and I hope the answers you ‘ll give me .

    A + Alibi

    Ps: If something is wrong with my setup please let me know ( I might have to contact the ebay seller)

    • First all stuff seems ok. Only connectors for leds will not fit since 5050 are too narrow for ws2801 stripes.
      1. You can power the Pi through gpio pins or. micro usb connector. Just use splitter. You can power both leds and pi with the same AC7DC.
      2. The schema on the blog tells more than photos. Just reread :)
      3. The Hyperion config utility tells you that. Imagine that you are sitting in front of the tv. Just fire the config utility and dream….
      4. You can try. Since the development rushes it sometimes brakes the stuff in other images. For reference i have gave you the one that works. But of course just use the latest one.
      5. Again download Hyperion config utility and start clicking on it. You will get a lot of answers. Bottom gap on first tab (Hardware) will give you the result you are looking at.

      cheers

  19. Hi, thanks for the excellent tutorial, I’m busy with gathering the components, but want to verify if I got the right powered HDMI splitter selected:
    http://www.ebay.com/itm/HDMI-Splitter-1-x-2-Port-Amplifier-For-1080P-3D-HDVD-HDTV-HDCP1-4-Blue-RAY-/161086240584?pt=US_Video_Cables_Adapters&hash=item25817cf748
    I need a HDMI 1.4 splitter, because I’m using the ARC on my Samsung C series LED TV

    Secondly, what is the use of the button on your Pi setup? And how is it connected?

    • Well a lot of sellers do not know that v1.4 is for ARC and not truehd, 3d…. To be sure ask seller if it support arc. I doubt it is really 1.4.
      The button is a reset for rpi.

      • Sorry to bother again, but my quest to find a suitable splitter is still going on :-)
        I found this NON-powered splitter, and I think it will work with my setup:
        - Onkyo TX-SR578 HDMI out > DeLock Splitter > 2m HDMI 1.4 cable > Samsung LED 46C8700 HDMI 2 (ARC) port

        What do you think? Will NON-powered splitters work?

          • I know that you would like to get the answer but honestly i do not know. Those splitters are non powered and non HDCP compliant. You can get those non powered from ebay for few USD so it will not be a too big loss if you do a miss-hit with that :) But feel free to leave a feedback from your experience. And BTW i wanted to use ARC too but i was not happy with the result as only stereo was given back as ARC. So I have used optical cable instead of ARC and tthe optical can process DTS. So maybe it is not worth the effort and use the same solution as i did.

  20. Quick question, Hyperion project be able to capture a widescreen image? When I hook up my Pi to the tv while everything is up and running, the picture is cropped. Is this due to the usb grabber? Is there a way to capture a 16X9 screen?

        • After about 3 hours I am back here. The picture is still cropped, and I do a test by moving a red block around the edge of the computer to see the response. The top left and bottom are acceptable, however the right side is still cropped. The mplayer line I am using is /usr/bin/mplayer -tv driver=v4l2:width=160:height=90:input=2:device=/dev/video0 -vf pp=lb -aspect 16:9 -vo fbdev -fs -nosound tv:// /dev/null 2>&1 &, can somebody take a look and tell me what I need to change to make the image capture my entire screen.

          • On the same topic. My setup is NTSC and I am using the AV converter to go to PAL because if I don’t, I get no picture. Will the USB grabber accept a NTSC signal if I designate the norm=ntsc in the mplayer command line?

  21. Question for all who have this working, if you hook everything up then plug your RPI in to see what the RPI is doing, is your screen capture the entire widescreen image, or is it cropped? If it is the entire widescreen image what is your mplayer line in the /etc/rc.local file, and what are your frame grabber settings in hyperion? Is there a relationship between those?

  22. What are the main-differences between WS2801-LEDs (32 LEDs/m) and LPD8806-LEDs (48 LEDs/m)? Will the LPD8806 be brighter and/or more exactly controlled than the WS2801?

    And do you recommend waterproof- or non-waterproof-strips?

    • 8806 are 7bit only. 2801 are 8bit. The result is nicer fade in and out of colors. 8806 also has 2 leds per one controller chop. 2801 usually has 1 led per 1 IC. There are also some wariants of 2801 but they are all the same. Main difference is 8 vs 7 bit.

  23. Can anyone crack this problem? I hooked up the AV converter directly to my tv and the image fills the screen correctly. When I hook the signal up to the RPI and have Hyperion, I run an HDMI from the RPI to the TV and the displayed image is offset to the right and cropped at the top and bottom. I am using all of the default settings in the tutorial. The missing part on the right of the screen is not being grabbed, so when I put a red image on that part of my screen the leds don’t react. If I slide the red block to the left the same amount that is missing the leds change to red. How to I offset/shift the image in the RPI to encompass the entire input signal. Is this have to do with using the v4l2 driver? I am able to change the resolution, no matter what I change in the rc local or hyperion config my image is offset. Thank you for any assistance.

      • Figured out my problem. Aspect ratio from the STK1160 grabber. The program is looking for a 1.25 aspect and I was sending a 1.33 aspect. With some tweaking I am capturing at 45 FPS and Pi is only at 80%. LEDs react real time and very smooth. Now I am just wondering if I should overclock more to get closer to 60fps. Has anyone tried this with a beaglebone black since it is faster than the Pi?

  24. Hi

    Thank you for this great tutorial!
    Everything is connected and works. I have one problem.
    The video stream (raspberry pi + mplayer) comes 2 seconds later than in the tv. Any ideas how i can fix this problem?

    When i plug the grabber into my laptop everything (video stream) goes without problems.

    Michael

    • The width=72:height=56 really doesn’t do anything except select the lowest capture setting on the usb grabber. For me it was 320X240 which is 4:3. The net resolution up is 360X288 which is 5:4 and it worked. So in your mplayer line just use width=360:height=288 and it worked for me. The problem I am seeing although it doesn’t effect my video quality is that when you run “/usr/bin/mplayer -tv driver=v4l2:width=360:height=288:input=2:device=/dev/video0 -vf pp=lb -aspect 16:9 -vo fbdev -fs -nosound tv:// ” and view the read out it says “Current input: 0 ” “Opening video decoder: [raw] RAW Uncompressed Video Could not find matching colorspace – retrying with -vf scale…” Everything is working, I just can’t figure out why I am not able to change the input and select the correct capture resolution. My CPU usage is only 30% at 30 FPS. I think I am capturing at 640X480 and could lower the CPU usage if I capture and 360X288 since I am scaling to that resolution anyway. Any ideas?

      • Which card do you have. those mplayer lines are always hit and miss :) Good that users are writing your lines that works with the system so other users can benefit from your experience.
        About input; what usb capture device do you have? With four yellow inputs? On that device inputs are 0,1,2,3. so I assume that on the other one with stereo input the video inputs are 0,1.
        But when you run mplayer then during the time that mplayer is starting up it lists the information what the usb grabber supports and between that info there is also info about inputs and their numbering.

        I am not using this setup anymore because i am using ambilight on HTPC and inside XBMC also for other inputs.
        So hyperion is working native over arduino or. teensy and the other HDMI inputs (XBOX360,…) are processed by USB grabber and same htpc. On that system i run this command (it will not work on RPi but i am listing it here just for reference if something useful will be inside).

        mplayer -vo x11 -tv driver=v4l2:input=0:device=/dev/video0 -display localhost:0.0 -vf yadif tv:// /dev/null 2>&1 &

        • I am using a sabrent grabber with svideo, composite. No matter what input I use it always selects 0. inputs: 0 = CVBS0; 1 = CVBS1; 2 = CVBS2; 3 = CVBS3; 4 = CVBS4; 5 = S-VIDEO; Current input: 0 Current format: UYVY Selected input hasn’t got a tuner! It list more inputs than what I have. I have tried all inputs and it doesn’t change, always defaults to “0″. I am using V4L-CTL to change the capture format and it does when I query for the format. However when I run the mplayer command again it changes back to 640X480. Is there another option besides mplayer or mplayer 2 that works?

  25. Hi everybody!

    Short question, as I’m not sure, if I understand that correct.

    I do want the following:
    SAT-Receiver (PayTV-Box) and RPi as streaming client from a NAS. Does this work without any switching? So I can have the LEDs lightning with the signal from the SAT (normal TV program) or with a film from the NAS -> RPi…

    Should look like this:
    http://storeimgs.net/img-52dfbc5a9ee92.html

    Thanks a lot, if somebody could help here. I asked in different boards, but nobody can give me an exact answer. Or maybe I’m thinking to complicated…not sure… ;)

    THX

    • Well you could but there is a catch. This kind of setup will need to have Raspbmc on pi. The problem is that you will need to do some scripting to switch between grabber and xbmc. On full HTPC client this is possible but RPi does not work with x11 as far as i know. So in RPi ATM the only option is a possibility to write some switching scripts. There is also a problem with USB grabber drivers on some kernels; on some it works on other versions it does not.
      But there is a light at the end of the tunnel… There is a Hyperion in development that will support v4l driver from inside Hyperion but I do not know how far it is.

      • Thank you very much for your help.That is an answer, I can work with. :)

        Till now, I didn’t know for sure, so I’ll have to try other ways. Waiting is one, and another is to check for a linux based SAT-receiver to get a hold of the files on the NAS. :)

        Thanks a lot, I will def. stay tuned, maybe it works in a few weeks or months! :)

  26. Hi, i have a 55″ samsung Tv, i want to ask you which LEDs should i choose and how much, 32leds/m Strips or more like 50leds/m? Maybe you can Show me which ones would be nice for me.

    And the USB-grabber, you posted a link in the tut, there are 4 Inputs, that means i can use it for for One Input from the hdmi2av converter and One Input for the s-Video Output of the Tv?

    Thanks for helping me.

    • I think i need more Ampere on my power Supply for the LEDs, cause of my 55″ Tv. One LED needs 0,06 Ampere, when i Take 50 LEDs/m i need 200 LEDs. That means that i need a power Supply with 5V and 12A and more, i dont know how much more for using One power Supplement.
      What do you prefer? One power supply or two for the Big number of LEDs?

      • Which ws2801 are 50 leds per meter? I am using for around 100 leds 5v6A. You could also use 12V power supply and use a DC converter from 12v to 5v, but be sure to make a measurement before you connect the leds, to avoid frying leds.

  27. I’ve been trying to get this to work for hours now. I picked up all of the exact parts as listed in your tutorial… the easycap video grabber is based on the STK1160 chipset… the only difference is with the lights. Rather than the strips, I used the WS2801 string (http://www.aliexpress.com/item/12mm-WS2801-pixel-module-IP66-DC5V-input-full-color/449802558.html). I already had the lights from my setup using an Arduino, which works great, but I wanted a standalone setup to use with my PS4.

    I have the same issue mentioned from a couple of others. After following the tutorial exactly, the lights just flicker random but similar colors… after trying “hyperion-remote –priority 50 –color red” the LEDs stop flickering, but it doesn’t turn red, nor when I try with green or blue does it change. It just stays the same peach color with some whites mixed in. Same color as when the Pi starts up.

    Can you please help? Thanks.

    • Okay, I’ve made progress. Apparently the string lights are a little different than the strips. They need to have the blue wire connected as well. So, blue wire to DNC (25). Now hyperion-remote works in changing the colors… but now, for some reason I only see half of my lights. 50 of them, rather than the 100. The other half is completely turned off. I made so many changes that I think I will start from scratch, now that I know the initial problem was the wiring of the LEDs.

      • Well they are not different if they are WS2801 based. All ws2801 ICs have four connectors GND, power, Data and clock and all leds no matter if they are stripes or. strings need to have all four connections.
        There are few variations of WS2801 but the do only differ in RGB order.

        • Yes, it was my mistake… I hadn’t connected the blue GND wire to the Pi… only to the GND of my power supply. I’m in the process of reinstalling the software, so hopefully all 100 of my LED’s light up. Once I connected it properly, only half of my LED’s were lit.

  28. Hi newbie here and probably a basic question:

    I have added the two lines indicated at this step:
    And add the following startup commands in it. You can experiment with mplayer switches to find the sweet spot and feel free to share it:

    But I get this error:
    /usr/bin/mplayer: 1: /usr/bin/mplayer@ syntax error: word unexpected (expecting “)”)

    I did put the lines just after an print ip line command and before the
    exit 0 line.

    Anybody help with this? I have a feeling I am being an idiot!
    thanks

  29. Okay, the lights seem to be working okay. All of the hyperion-remote settings work, and all 100 lights function. However, when trying to grab the screen, all I get is a green box and scrolling text v412: select timeout…

    see here: http://i.imgur.com/PRkVTT2.jpg

    I tested the HDMI2AV by connected it to a TV, and I get my HDMI source just fine. Also, when I unplug the component (s-video) cable from the Easycap for a split second I see my HDMI source on the screen, but it’s only for a few milliseconds. Is there something I’m doing wrong?

      • If I select an input… for example /usr/bin/mplayer -tv driver=v4l2:width=72:height=58:input=1:device=/dev/video0 -vo fbdev -fs -fps 24 tv:// /dev/null 2>&1 &, I get just a black screen. Still no video. Tried all inputs.

    • This is driving me crazy. I just can’t get it to grab video. I don’t understand why it isn’t working, when I’m using the exact same hardware and the exact same software.

    • Using “mplayer tv:// -tv driver=v4l2:width=360:height=288:outfmt=uyvy:device=/dev/video0:input=2:fps=15 -hardframedrop” I get a green screen and:

      [code]pi@raspberrypi ~ $ mplayer tv:// -tv driver=v4l2:width=360:height=288:outfmt=uyvy:device=/dev/video0:input=2:fps=15 -hardframedrop
      MPlayer svn r34540 (Debian), built with gcc-4.6 (C) 2000-2012 MPlayer Team
      mplayer: could not connect to socket
      mplayer: No such file or directory
      Failed to open LIRC support. You will not be able to use your remote control.

      Playing tv://.
      TV file format detected.
      Selected driver: v4l2
      name: Video 4 Linux 2 input
      author: Martin Olschewski
      comment: first try, more to come ;-)
      Selected device: stk1160
      Capabilities: video capture read/write streaming
      supported norms: 0 = NTSC; 1 = NTSC-M; 2 = NTSC-M-JP; 3 = NTSC-M-KR; 4 = NTSC-443; 5 = PAL; 6 = PAL-BG; 7 = PAL-H; 8 = PAL-I; 9 = PAL-DK; 10 = PAL-M; 11 = PAL-N; 12 = PAL-Nc; 13 = PAL-60; 14 = SECAM; 15 = SECAM-B; 16 = SECAM-G; 17 = SECAM-H; 18 = SECAM-DK; 19 = SECAM-L; 20 = SECAM-Lc;
      inputs: 0 = Composite0; 1 = Composite1; 2 = Composite2; 3 = Composite3; 4 = S-Video;
      Current input: 2
      Current format: UYVY
      Selected input hasn't got a tuner!
      v4l2: ioctl set mute failed: Invalid argument
      vo: couldn't open the X11 display ()!
      vo: couldn't open the X11 display ()!
      vo: couldn't open the X11 display ()!
      VO XOverlay need a subdriver
      [VO_SDL] SDL initialization failed: Unable to open a console terminal.
      vo: couldn't open the X11 display ()!
      vo: couldn't open the X11 display ()!
      vo: couldn't open the X11 display ()!
      ==========================================================================
      Opening video decoder: [raw] RAW Uncompressed Video
      Could not find matching colorspace - retrying with -vf scale...
      Opening video filter: [scale]
      Movie-Aspect is undefined - no prescaling applied.
      [swscaler @ 0x2273740] BICUBIC scaler, from uyvy422 to rgb565le using C
      VO: [fbdev] 720x576 => 720x576 BGR 16-bit
      Selected video codec: [rawuyvy] vfm: raw (RAW UYVY)
      ==========================================================================
      Audio: no sound
      Starting playback...
      v4l2: select timeout
      V: 0.0 1/ 1 ??% ??% ??,?% 0 0
      v4l2: select timeout
      V: 0.0 3/ 3 ??% ??% ??,?% 0 0
      v4l2: select timeout
      V: 0.0 4/ 4 ??% ??% ??,?% 0 0
      v4l2: select timeout
      V: 0.0 6/ 6 ??% ??% ??,?% 0 0
      v4l2: select timeout
      V: 0.0 7/ 7 ??% ??% ??,?% 0 0
      v4l2: select timeout
      V: 0.0 9/ 9 ??% ??% ??,?% 0 0
      [/code]

      Also, when I unplug and replug the composite cable in and out I see my source image very very shortly in black and white and hazy with static. It lasts for just a fraction of a second. I’ve tried different cables and different settings. Nothing works. I know I’m on the right input, because the others I get a black screen and

      [code]Frame too small! (825716<829440) Wrong format?[/code]

      • In future use pastebin for posting those information, to keep the blog clean.
        I have to update the post, since there has been changes to Hyperion and v4l grabbing. No mplayer is needed anymore and i think also it will work in XBMC. I am not using RPi anymore for standalone RPi but will take a look into the new method. Usually different kernels are cousing problems so if you are not using the same kernel it is likely that you will experience problems. But as i have said, go to Hyperion wiki and read about new grabbing option as in future releases mplayer will be abandoned.

        • Since u don’t use it anymore, will we still get some help or updates?
          Cuz i’m fighting with this setup for a while allready, but can’t find the the solution.
          I sticked with your tutorial, seems it worked out very well. Af a reboot of the pi i get a colorswirl, and after it around my tv a couple of led’s just give white light. Sometimes a flicker. Can someone give me some hints?

          Greets Frans from holland

  30. wohooo, I found out it is problem with power. Raspberry pi is not strong enough to power usb easycap directly. When I use powered usb hub it works! :)
    Well, so the last problem is – leds are about 0,5-1s slower than image on my screen. Any idea? Many thanks

  31. I have a series 6 Samsung tv I just want to capture the dtb signal. I don’t think it has svideo out – is there any other way to do this?

  32. Hi,

    Does anyone managed to get the usb capture device working under raspbmc? I’ve installed it and tried to run it with hyperion-v4l2 and I’m getting an error “VIDIOC_STREAMON error 90, Message too long”

    Great tutorial btw! Thx!

  33. thanks for your great tuto BeiLLiac4,

    Is there a way to have all the LEDs shut when there is no signal in the USB grabber.
    For example, if I shutdown my PS3, the LED turns White/Reddish rainbow wierd.
    I have to unplug my AC/DC to shut them down.

    thanks a lot in advance.

    • The weird rainbow is due to this HDMI2AV model I believe. The rainbow is actually vertical stripes of white, yellow, cyan, green, magenta, blue, and black and then repeated. You can check by stopping the hyperiond service and issuing a hyperion-v4l2 command with –screenshot. (Screenshots are saved in the current working directory.)

  34. In your setup, it only allows hyperion to use 1 HDMI input for the ambilight. Is tehere a way to make multiple i.e. 2 HDMI inputs? So i donthave to switch inputcables. I.e. 1 xboxand 1 blu ray player?

  35. First of all great tutorial! Thanks a lot for all of this work.
    For weeks i am trying to get this thing work, but failed time after time.
    Many times a new install, and now it seems to do at least something…
    What happens now:
    I connected my pi with an external monitor.
    I see the pi booting.
    After the boot i see the colorswirl behind my tv.
    After this i see on the monitor a black screen with a small window inside of it.
    The small window gives me, after boot a couple of seconds the same image as my tv gives (movie) And than this image turns into 7 bars vertical from black till white.
    Sometimes it shows me a millsec of image, than it dissapears.
    Behind my tv, on the left and right side i se some LED’s flickering some colors, not matching the movie.
    Using putty from my laptop, hitting: “sudo mplayer -tv driver=v4l2:width=72:height=58:input=2:device=/dev/video0 -vo fbdev -fs -fps 15 tv://
    gives me some numbers counting, what asumes me the grabber is working.
    Hitting: hyperion-remote –priority 50 –color red
    gives me a no command found error.
    What makes me think hyperion is failing.
    I dont know what to do anymore, does someone have some idea’s?

    Frans

    • I will attempt to help you. Mplayer is terrible so try using this. I can explain later if you want what each term means. Put this in your rc.local file instead of the mplayer line.

      /usr/bin/hyperion-v4l2 –input 2 –width 360 –height 288 –crop-width 5 –crop-height 5 –size-decimator 3 –frame-decimator 1 –signal threshold 0.07 –skip-reply
      /usr/bin/hyperiond/etc/hyperion.config.json /dev/null 2>&1

      Make sure your switch on your HDMI2AV if set to PAL.

      In your HYPERCON editor, uncheck the frame grabber since you don’t need it if you are making a standalone unit. If these numbers are incorrect you will get some weird stuff with your lights. Let me know because there are other things to try. It took me a few months to get mine working with no issues.

      • Make sure your “input” is correct. If the USB grabber has S-Video the yellow RCA will be input 2, if the USB grabber has multiple yellow RCAs connections, make sure you are plugged into the one labels 2.

  36. What i forgot to tell whas the hyperion app runs like a sun… So it seems hyperion is running well this way.
    nutshell:
    grabber is grabbing, colorswirl runs, app works, small image on external monitor changes after some sec into black grey white bars, sometimes a glimpse of movie, both right and left side some LED’s flickering.
    Dunno what to do anymore.

    Thanks in advance

  37. hey,
    i’ve installed and configured everything so far. i can control the led’s with the android app but if i start a video on the other raspberry pi, which i use as an htpc (and which is plugged in to the hdmi input port of the hdmi splitter), nothing happens. i guess that the video grabber (stk1160) or something else do not work properly. do you have a solution? thanks.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>