OSMC and Hyperion

Dear Anthrax

I have hyperion.ng up and running on my Vero4K thanks to you!!!:clap:
I would like to implement the subprocess as well in order to control better during standby and pause. Could you give more advice and hints regarding the implementation…?

I am a newbie but try to learn

Best

Peter

Following this guide, I got it up and running and have enjoyed for a while now. I just can’t figure out how to disable at menu…

Hi @Brakiss,

glad you got it up and runnning - I use this addon to control hyperion which isn’t very documented very well (meaning not at all) but should be pretty self explanatory:
[Testers wanted] Hyperion-Control for Kodi · Issue #474 · hyperion-project/hyperion.ng · GitHub

Standby/Resume is handled via these new OSMC scripts:

cheers
Anthrax

1 Like

It doesn’t make sense to put this in this thread. Either put it in the thread that you already had open on the topic or if you haven’t opened one open one.
Normal rules apply if debug logs don’t show any CEC activity it hardly can be the Vero.

yeah, I know how forums work, but get carried away sometimes…
[moved it]

my problem has nothing to do with CEC woes though imho. I can see that OSMC wakes the TV when resuming and this is great! But I dont want the Vero to wake ‘itself’ in the middle of the night and activate the 160LEDs behind the TV and the 7 Hue lights in the living room…

Anthrax

Sorry @Anthrax that is a little much for me, I apologize. (Noob) is there line breaks there I am missing?

Is it possible that the TV is waking up (with screen off) to check for firmware updates and/or TV channel changes and this event is waking up OSMC box.

@Brakiss, what do you mean? My last reply? Try to click on down arrow next to the text preview in the post and it will expand…

cheers

@Anthrax Ahhh I did not see that pulldown, Thank you sir!

I noticed since using Hyperion my audio/video playback gets out of sync every 20-30 minutes or so.
Happens with SD, HD and UHD.
I clear this behaviour with skipping back 5 seconds.
I’ve read in a previous post more people have this same issue.
Anyone got this resolved yet?

Not yet – I’m still not sure what causes this yet. Using a different grabbing mechanism doesn’t seem to resolve the problem.

It’d be interesting to know if those that experience the slowdown have the double_write_mode parameter set or not.

Dear Anthrax, first of all thanks for your post and help. I am so happy that hyperion.ng is running flawless on my Vero4k with Arduino Uno R3 and WS2801. I am a new to compiling but not afraid of learning. it turned out to be more easy than expected because of your guide.

I have know a very simple question regarding update of Hyperion.ng… not that I want to change anything for now, but What should I do when i want to update hyperion.ng? I can see that the version which I cloned has been updated for armlogic 2 days ago

should I just login to the hyperion.ng dir as root and do

# if you chose the master repo update your local files with
  git pull origin 

Thanks in advance

peter

1 Like

Yepp, this should do!

I wrote a little build_hyperion.sh script for myself:

#!/bin/bash
sudo /usr/bin/apt-get update
sudo /usr/bin/apt-get -y install git cmake build-essential qtbase5-dev libqt5serialport5-dev libusb-1.0-0-dev python3-dev libxrender-dev libavahi-core-dev libavahi-compat-libdnssd-dev libmbedtls-dev
cd /root/hyperion.ng
git pull origin [optional: the branch name]
cd /root/hyperion.ng/build
cmake -DPLATFORM=amlogic -DENABLE_AMLOGIC=ON -DENABLE_DISPMANX=OFF -DENABLE_FB=ON -DENABLE_OSX=OFF -DENABLE_SPIDEV=OFF -DENABLE_TINKERFORGE=OFF -DENABLE_V4L2=ON -DENABLE_WS281XPWM=OFF -DENABLE_X11=OFF -DENABLE_TESTS=ON -DENABLE_PROFILER=OFF -DCMAKE_BUILD_TYPE=Release ..
make -j $(nproc)
sudo /usr/bin/apt-get -y remove --purge libegl1-mesa 
sudo /usr/bin/apt-get -y install libqt5concurrent5 libqt5core5a libqt5dbus5 libqt5gui5 libqt5network5 libqt5printsupport5 libqt5serialport5 libqt5sql5 libqt5test5 libqt5widgets5 libqt5xml5 qt5-qmake 
[optional: systemctl restart <service-name>]

Congrats on the working setup - I bet it’s a huge difference and really amplifies the Home Theater experience :wink:

Post a pic if you like… I’m trying do one tonight

1 Like

Last night I found the solution to the top/bottom row not lighting up problem I had three months ago, just wanted to share.

In the client’s/Vero’s config, I had to change the threshold value to 0.26

// BLACKBORDER CONFIG
"blackborderdetector" :
{
        "enable" : true,
        "threshold" : 0.26,
        "unknownFrameCnt" : 600,
        "borderFrameCnt" : 50,
        "maxInconsistentCnt" : 10,
        "blurRemoveCnt" : 1,
        "mode" : "default"
},

and also comment the framegrabber part

    //"framegrabber" :
    //{
    //      "width" : 64,
    //      "height" : 64,
    //      "frequency_Hz" : 10.0,
    //      "priority" : 891
    //},

to get the top and bottom row of LEDs to light up when playing 21:9 material that has black bars at the top and bottom.

The bars of uncropped 21:9 material transferred to a blu-ray usually take up 140 pixels in height each which leaves you with 800 pixels for the movie itself. 140 + 800 + 140 = 1080. 800 is 74,074 % of 1080. Hence the 26 % … I guess. I have to admit the Hyperion blackborder detection documentation sounds a little different, though:

The blackborder detection threshold value is a percentage indication. It describes the the percentage of 255 a pixel needs to have for either red, green or blue, in order to be treated as non-black. So a threshold of 14% means that any pixel with a red, green or blue value bigger than 36 (255 * 14% = 35.7 ≈ 36) is treated as non-black. All other pixels are regarded as black.

I can just say it only works with 0.26, with values below it doesn’t. ¯\(ツ)/¯ Commenting the framegrabber part makes the LEDs turn off while not playing a movie but that’s negligible. Anyway, thought this might help someone with the same problem finding this thread.

With this parameter set to 1, every UHD file becomes an unwatchable green-white-pink pixel soup.

On which version of OSMC are you? You’re running a Vero 4K+ right?
I’m on a nightly build from around the end of January and as stated above the stuttering issues with 4K material is pretty much gone for me (well excpet for the occasional hiccup which can be fixed by skipping back 10 seconds).

I remember the pink/green issue you describe with some old versions of hyperion and hyperion.ng and on the odroid c2 - on the Vero this is a thing of the past for me (hope it stays that way :wink: )

cheers
Anthrax

1 Like

Nice to read it’s gone in some advanced builds. The Hyperion client runs on a Vero 4K with OSMC’s December 2018 update, normal stable release channel, nothing fancy. The Hyperion server responsible for the LEDs does so as well on a RasPi 3B.

The RasPi Hyperion installation is about one year old, installed on 2018-02-11, HyperCon log says its version is V1.03.3 (brindosch-2fbbcff/2f01dfa-1495880388 The one on the Vero 4K was installed on 2018-06-25, HyperCon log says its version is master (brindosch-709faea/49a9ca9-1508693345.

The slowdowns still happen about once or twice per movie. Just hit stop and play again, negligible inconvenience.

Hey @Anthrax and Sam! Thanks for the #CompileHowtoOSMC and the other tips!
I am still unable to compile .NG on Vero 4k+. I decided to combine .NG with home assistant, but the compilation fails with the cmake:

cmake -DPLATFORM=amlogic -DENABLE_AMLOGIC=ON -DENABLE_DISPMANX=OFF -DENABLE_FB=ON -DENABLE_OSX=OFF -DENABLE_SPIDEV=OFF -DENABLE_TINKERFORGE=OFF -DENABLE_V4L2=ON -DENABLE_WS281XPWM=OFF -DENABLE_X11=OFF -DENABLE_TESTS=ON -DENABLE_PROFILER=OFF -DCMAKE_BUILD_TYPE=Release ..
Compile log

[ 70%] Built target hyperion
Scanning dependencies of target amlogic-grabber
Scanning dependencies of target commandline
Scanning dependencies of target udplistener
Scanning dependencies of target hyperion-api
[ 70%] Building CXX object libsrc/grabber/amlogic/CMakeFiles/amlogic-grabber.dir/AmlogicGrabber.cpp.o
[ 71%] Building CXX object libsrc/udplistener/CMakeFiles/udplistener.dir/UDPListener.cpp.o
[ 72%] Building CXX object libsrc/api/CMakeFiles/hyperion-api.dir/JsonAPI.cpp.o
[ 72%] Building CXX object libsrc/commandline/CMakeFiles/commandline.dir/BooleanOption.cpp.o
In file included from /root/hyperion.ng/libsrc/grabber/amlogic/Amvideocap.h:7:0,
from /root/hyperion.ng/libsrc/grabber/amlogic/AmlogicGrabber.cpp:18:
/root/hyperion.ng/libsrc/grabber/amlogic/IonBuffer.h: In destructor ‘virtual IonBuffer::~IonBuffer()’:
/root/hyperion.ng/libsrc/grabber/amlogic/IonBuffer.h:153:51: warning: throw will always call terminate() [-Wterminate]
throw std::runtime_error(“ION_IOC_FREE failed.”);
^
/root/hyperion.ng/libsrc/grabber/amlogic/IonBuffer.h:153:51: note: in C++11 destructors default to noexcept
[ 72%] Building CXX object libsrc/grabber/amlogic/CMakeFiles/amlogic-grabber.dir/AmlogicWrapper.cpp.o
[ 72%] Building CXX object libsrc/udplistener/CMakeFiles/udplistener.dir/udplistener_automoc.cpp.o
[ 72%] Building CXX object libsrc/commandline/CMakeFiles/commandline.dir/ColorOption.cpp.o
[ 73%] Building CXX object libsrc/grabber/amlogic/CMakeFiles/amlogic-grabber.dir/IonBuffer.cpp.o
In file included from /root/hyperion.ng/libsrc/grabber/amlogic/IonBuffer.cpp:16:0:
/root/hyperion.ng/libsrc/grabber/amlogic/IonBuffer.h: In destructor ‘virtual IonBuffer::~IonBuffer()’:
/root/hyperion.ng/libsrc/grabber/amlogic/IonBuffer.h:153:51: warning: throw will always call terminate() [-Wterminate]
throw std::runtime_error(“ION_IOC_FREE failed.”);
^
/root/hyperion.ng/libsrc/grabber/amlogic/IonBuffer.h:153:51: note: in C++11 destructors default to > noexcept

[ 86%] Linking CXX executable …/…/bin/hyperion-remote
/usr/bin/ld: cannot find -lpcre16
collect2: error: ld returned 1 exit status
src/hyperion-remote/CMakeFiles/hyperion-remote.dir/build.make:174: recipe for target ‘bin/hyperion-remote’ failed
make[2]: *** [bin/hyperion-remote] Error 1
CMakeFiles/Makefile2:2492: recipe for target ‘src/hyperion-remote/CMakeFiles/hyperion-remote.dir/all’ failed
make[1]: *** [src/hyperion-remote/CMakeFiles/hyperion-remote.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs…
[ 86%] Building CXX object libsrc/webserver/CMakeFiles/webserver.dir/QtHttpRequest.cpp.o
[ 87%] Building CXX object test/CMakeFiles/test_blackborderdetector.dir/test_blackborderdetector_automoc.cpp.o
[ 87%] Linking CXX executable …/bin/test_blackborderdetector
[ 88%] Building CXX object libsrc/webserver/CMakeFiles/webserver.dir/QtHttpServer.cpp.o
[ 88%] Built target test_blackborderdetector
[ 88%] Building CXX object libsrc/webserver/CMakeFiles/webserver.dir/StaticFileServing.cpp.o
[ 88%] Building CXX object libsrc/webserver/CMakeFiles/webserver.dir/WebJsonRpc.cpp.o
[ 89%] Building CXX object libsrc/webserver/CMakeFiles/webserver.dir/WebServer.cpp.o
[ 89%] Building CXX object libsrc/webserver/CMakeFiles/webserver.dir/WebSocketClient.cpp.o
[ 89%] Building CXX object libsrc/webserver/CMakeFiles/webserver.dir/webserver_automoc.cpp.o
[ 90%] Building CXX object libsrc/webserver/CMakeFiles/webserver.dir/webserver_automoc.dir/qrc_WebConfig_NXBAIHQSQM5QBD.cpp.o
[ 90%] Linking CXX static library …/…/lib/libwebserver.a
[ 90%] Built target webserver
Makefile:149: recipe for target ‘all’ failed
make: *** [all] Error 2

Am I missing something?:thinking:

Looks like a library cannot be found, run ldconfig and check symlinks.

Yes, found some missing symlinks, now it somehow compiled. :slightly_smiling_face:
Now on to integrate it with home assistant!
(but that reply was so quick…) Thanks!

I guess that was an early celebration…
Running hyperiond creates the webserver as well. But only custom effects/colors work, no video input.

ldconfig: Cannot stat /usr/lib/arm-linux-gnueabihf/libSDL2-2.0.so: No such file or directory

This is the only complain it gives.
Now the cmake says:

> [ 79%] Built target boblightserver
Scanning dependencies of target amlogic-grabber
[ 79%] Building CXX object libsrc/grabber/amlogic/CMakeFiles/amlogic-grabber.dir/AmlogicGrabber.cpp.o
In file included from /root/hyperion.ng/libsrc/grabber/amlogic/Amvideocap.h:7:0,
                 from /root/hyperion.ng/libsrc/grabber/amlogic/AmlogicGrabber.cpp:18:
/root/hyperion.ng/libsrc/grabber/amlogic/IonBuffer.h: In destructor 'virtual IonBuffer::~IonBuffer()':
/root/hyperion.ng/libsrc/grabber/amlogic/IonBuffer.h:153:51: warning: throw will always call terminate() [-Wterminate]
    throw std::runtime_error("ION_IOC_FREE failed.");
                                                   ^
/root/hyperion.ng/libsrc/grabber/amlogic/IonBuffer.h:153:51: note: in C++11 destructors default to noexcept
[ 79%] Building CXX object libsrc/protoserver/CMakeFiles/protoserver.dir/ProtoServer.cpp.o
[ 79%] Building CXX object libsrc/grabber/amlogic/CMakeFiles/amlogic-grabber.dir/AmlogicWrapper.cpp.o
[ 79%] Building CXX object libsrc/udplistener/CMakeFiles/udplistener.dir/udplistener_automoc.cpp.o
[ 80%] Building CXX object libsrc/commandline/CMakeFiles/commandline.dir/DoubleOption.cpp.o
[ 80%] Linking CXX static library ../../lib/libudplistener.a
[ 80%] Built target udplistener
Scanning dependencies of target framebuffer-grabber
[ 81%] Building CXX object libsrc/protoserver/CMakeFiles/protoserver.dir/message.pb.cc.o
[ 82%] Building CXX object libsrc/grabber/framebuffer/CMakeFiles/framebuffer-grabber.dir/FramebufferFrameGrabber.cpp.o
[ 83%] Building CXX object libsrc/grabber/amlogic/CMakeFiles/amlogic-grabber.dir/IonBuffer.cpp.o
In file included from /root/hyperion.ng/libsrc/grabber/amlogic/IonBuffer.cpp:16:0:
/root/hyperion.ng/libsrc/grabber/amlogic/IonBuffer.h: In destructor 'virtual IonBuffer::~IonBuffer()':
/root/hyperion.ng/libsrc/grabber/amlogic/IonBuffer.h:153:51: warning: throw will always call terminate() [-Wterminate]
    throw std::runtime_error("ION_IOC_FREE failed.");
                                                   ^
/root/hyperion.ng/libsrc/grabber/amlogic/IonBuffer.h:153:51: note: in C++11 destructors default to noexcept
[ 83%] Building CXX object libsrc/grabber/amlogic/CMakeFiles/amlogic-grabber.dir/amlogic-grabber_automoc.cpp.o
[ 83%] Building CXX object libsrc/grabber/framebuffer/CMakeFiles/framebuffer-grabber.dir/FramebufferWrapper.cpp.o
[ 83%] Building CXX object libsrc/protoserver/CMakeFiles/protoserver.dir/protoserver_automoc.cpp.o
[ 83%] Linking CXX static library ../../../lib/libamlogic-grabber.a
[ 83%] Built target amlogic-grabber

Is it possible that is linked with the compiler?
Thanks :slight_smile: