OSMC and Hyperion


#325

Alright, looks like a step into the right direction…

when showing menus or 1080p (max!) video it grabs the following image:
image

when playing 4k/UHD video this gets grabbed and results in green leds :frowning: :
image

I’m still getting this message when trying to grab video:

Oct 28 22:28:08 OSMC hyperiond[2194]: [hyperiond AMLOGICGRABBER] cannot open devices
Oct 28 22:28:08 OSMC hyperiond[2194]: [hyperiond AMLOGICGRABBER] GE2D capture interface not available! try Amvideocap instead
Oct 28 22:28:08 OSMC hyperiond[2194]: cannot open devices
Oct 28 22:28:08 OSMC hyperiond[2194]: GE2D capture interface not available! try Amvideocap instead

So I think it’s not really using GE2D yet… Could you please try to force ge2d in your config:
image

Maybe this thread holds some insight as well…
https://forum.odroid.com/viewtopic.php?f=136&t=20901

Anthrax

PS: are you sure you are using the right config file?

/root/.hyperion/config/hyperion_main.json
vs
/osmc/.hyperion/config/hyperion_main.json


#326

I’m running as root, so I think that’s good enough.
I’ll look in to it shortly.


#327

Another thing: if GE2D is not working, then why do you get green screen? I can’t think of why the AML grabber would’ve broke. Can anyone confirm?

I thought AML grabber works but just becomes laggy over time (have a fix for this as well in the works)


#328

Hyperion tries GE2D first and when this fails /dev/amvideocap0 is used as fallback…

[Update1]
Another thing I found is this:
https://forum.odroid.com/viewtopic.php?f=136&t=20901#p138798

To make the driver work the FORCE_MAX_ZONEORDER parameter in arch/arm64/Kconfig needs to be changed from “11” to “13”.

In the the current osmc kconfig file I found this value to be 11… can I just change this value to 13 and reboot to apply this change?

[Update2] Might not be the best idea:

This is bad patch because changing the MAX_ZONEORDER is bad affect the linux kernel memory management mechanism.

[Update3]
Is there anyway I can test this heavily modified amvideocap.c driver by danielfmo? He seems to have put the most work into this as of yet…
https://raw.githubusercontent.com/danielfmo/linux-odroid-c2/odroidc2-3.14.y/drivers/amlogic/amports/amvideocap.c

cheers
Anthrax


#329

Already spoke to Daniel about amvideocap. Performance still is problematic.

Indeed – I don’t think I got the fallback with my last testing though. You have to fix permissions on /dev/ge2d (will fix with udev rule soon).

GE2D still seems the optimal solution.


#330

Not sure about the udev/permission stuff, but i got the same out as you did post earlier:

root@OSMC:~# hyperiond -v
[hyperiond MAIN] <INFO> Selected configuration file: /root/.hyperion/config/hyperion_main.json
[hyperiond LOGGER] <WARNING> Logger settings overridden by command line argument
[hyperiond Core] <INFO> ColorAdjustment 'default' => [0; 25]
[hyperiond ComponentRegister] <INFO> Json/Proto forwarder: off
[hyperiond LedDevice] <INFO> LedDevice 'file' configured.
[hyperiond Core] <INFO> Creating linear smoothing
[hyperiond Smoothing] <INFO> smoothing cfg 0: interval: -1423433852 ms, settlingTime: 40 ms, updateDelay: 0 frames
[hyperiond Smoothing] <INFO> smoothing cfg 1: pause
[hyperiond ComponentRegister] <INFO> Smoothing: activated
[hyperiond ComponentRegister] <INFO> LED device: activated
[hyperiond Smoothing] <INFO> smoothing cfg 2: interval: -1423338626 ms, settlingTime: 40 ms, updateDelay: 0 frames
[hyperiond Smoothing] <INFO> smoothing cfg 3: interval: 0 ms, settlingTime: 40 ms, updateDelay: 0 frames
[hyperiond Smoothing] <INFO> smoothing cfg 4: interval: 0 ms, settlingTime: 40 ms, updateDelay: 0 frames
[hyperiond Smoothing] <INFO> smoothing cfg 5: interval: -1423294332 ms, settlingTime: 50 ms, updateDelay: 0 frames
[hyperiond Smoothing] <INFO> smoothing cfg 6: interval: 0 ms, settlingTime: 40 ms, updateDelay: 0 frames
[hyperiond Smoothing] <INFO> smoothing cfg 7: interval: 0 ms, settlingTime: 40 ms, updateDelay: 0 frames
[hyperiond Smoothing] <INFO> smoothing cfg 8: interval: 0 ms, settlingTime: 40 ms, updateDelay: 0 frames
[hyperiond Smoothing] <INFO> smoothing cfg 9: interval: 0 ms, settlingTime: 40 ms, updateDelay: 0 frames
[hyperiond Smoothing] <INFO> smoothing cfg 10: interval: 0 ms, settlingTime: 40 ms, updateDelay: 0 frames
[hyperiond Smoothing] <INFO> smoothing cfg 11: interval: 0 ms, settlingTime: 40 ms, updateDelay: 0 frames
[hyperiond Smoothing] <INFO> smoothing cfg 12: interval: 0 ms, settlingTime: 40 ms, updateDelay: 0 frames
[hyperiond Smoothing] <INFO> smoothing cfg 13: interval: 0 ms, settlingTime: 40 ms, updateDelay: 0 frames
[hyperiond Smoothing] <INFO> smoothing cfg 14: interval: 0 ms, settlingTime: 40 ms, updateDelay: 0 frames
[hyperiond Smoothing] <INFO> smoothing cfg 15: interval: 0 ms, settlingTime: 40 ms, updateDelay: 0 frames
[hyperiond Smoothing] <INFO> smoothing cfg 16: interval: 0 ms, settlingTime: 40 ms, updateDelay: 0 frames
[hyperiond Smoothing] <INFO> smoothing cfg 17: interval: 0 ms, settlingTime: 40 ms, updateDelay: 0 frames
[hyperiond Smoothing] <INFO> smoothing cfg 18: interval: 0 ms, settlingTime: 40 ms, updateDelay: 0 frames
[hyperiond Smoothing] <INFO> smoothing cfg 19: interval: -1423277044 ms, settlingTime: 40 ms, updateDelay: 0 frames
[hyperiond Smoothing] <INFO> smoothing cfg 20: interval: 0 ms, settlingTime: 40 ms, updateDelay: 0 frames
[hyperiond Smoothing] <INFO> smoothing cfg 21: interval: 0 ms, settlingTime: 40 ms, updateDelay: 0 frames
[hyperiond Smoothing] <INFO> smoothing cfg 22: interval: 0 ms, settlingTime: 40 ms, updateDelay: 0 frames
[hyperiond Smoothing] <INFO> smoothing cfg 23: interval: 0 ms, settlingTime: 40 ms, updateDelay: 0 frames
[hyperiond Smoothing] <INFO> smoothing cfg 24: interval: 0 ms, settlingTime: 40 ms, updateDelay: 0 frames
[hyperiond Smoothing] <INFO> smoothing cfg 25: interval: 0 ms, settlingTime: 40 ms, updateDelay: 0 frames
[hyperiond Smoothing] <INFO> smoothing cfg 26: interval: -1423268556 ms, settlingTime: 40 ms, updateDelay: 0 frames
[hyperiond Smoothing] <INFO> smoothing cfg 27: interval: -1423268900 ms, settlingTime: 50 ms, updateDelay: 0 frames
[hyperiond Smoothing] <INFO> smoothing cfg 28: interval: 0 ms, settlingTime: 40 ms, updateDelay: 0 frames
[hyperiond Smoothing] <INFO> smoothing cfg 29: interval: 0 ms, settlingTime: 40 ms, updateDelay: 0 frames
[hyperiond Smoothing] <INFO> smoothing cfg 30: interval: 0 ms, settlingTime: 40 ms, updateDelay: 0 frames
[hyperiond Smoothing] <INFO> smoothing cfg 31: interval: 0 ms, settlingTime: 40 ms, updateDelay: 0 frames
[hyperiond Smoothing] <INFO> smoothing cfg 32: interval: 0 ms, settlingTime: 40 ms, updateDelay: 0 frames
[hyperiond Smoothing] <INFO> smoothing cfg 33: interval: 0 ms, settlingTime: 40 ms, updateDelay: 0 frames
[hyperiond Smoothing] <INFO> smoothing cfg 34: interval: 0 ms, settlingTime: 40 ms, updateDelay: 0 frames
[hyperiond Smoothing] <INFO> smoothing cfg 35: interval: 0 ms, settlingTime: 40 ms, updateDelay: 0 frames
[hyperiond Smoothing] <INFO> smoothing cfg 36: interval: 0 ms, settlingTime: 40 ms, updateDelay: 0 frames
[hyperiond Smoothing] <INFO> smoothing cfg 37: interval: 0 ms, settlingTime: 40 ms, updateDelay: 0 frames
[hyperiond EFFECTENGINE] <INFO> 35 effects loaded from directory :/effects/
[hyperiond EFFECTENGINE] <INFO> 19 effect schemas loaded from directory :/effects/schema/
[hyperiond EFFECTENGINE] <INFO> 0 effects loaded from directory /root/.hyperion/custom-effects
[hyperiond MAIN] <INFO> Hyperion initialized
[hyperiond MAIN] <INFO> Json server created and started on port 19444
QObject::connect: No such slot ProtoServer::setVideoMode(VideoMode)
[hyperiond MAIN] <INFO> Proto server created and started on port 19445
[hyperiond ComponentRegister] <INFO> Boblight server: off
[hyperiond Core] <INFO> Register new input source named 'UDPLISTENER' for priority channel '200'
[hyperiond ComponentRegister] <INFO> UDP listener: off
"No carrier"
[hyperiond ComponentRegister] <INFO> Blackborder detector: activated
[hyperiond V4L2:auto] <INFO> Signal threshold set to: {12, 12, 12}
[hyperiond V4L2:auto] <INFO> Signal detection area set to: 0.250000,0.250000 x 0.750000,0.750000
[hyperiond ComponentRegister] <INFO> V4L capture device: off
[hyperiond MAIN] <INFO> set screen capture device to 'amlogic'
[hyperiond ComponentRegister] <INFO> Blackborder detector: activated
[hyperiond FRAMEBUFFERGRABBER] <INFO> Display opened with resolution: 1920x1080@32bit
[hyperiond Core] <INFO> Register new input source named 'AmLogic' for priority channel '250'
[hyperiond MAIN] <INFO> AMLOGIC grabber created and started
[hyperiond ComponentRegister] <INFO> Framegrabber: activated
[hyperiond MAIN] <INFO> Hyperion started
[hyperiond EFFECTENGINE] <INFO> run effect Rainbow swirl fast on channel 0
[hyperiond Core] <INFO> Register new input source named 'Rainbow swirl fast' for priority channel '0'
[hyperiond MAIN] <INFO> Inital foreground effect 'Rainbow swirl fast' started
[hyperiond EFFECTENGINE] <INFO> run effect Warm mood blobs on channel 254
[hyperiond Core] <INFO> Register new input source named 'Warm mood blobs' for priority channel '254'
[hyperiond MAIN] <INFO> Inital background effect 'Warm mood blobs' started
[hyperiond WEBSERVER] <INFO> started on port 8090 name 'Hyperion WebConfig'
[hyperiond AMLOGICGRABBER] <INFO> FB mode
[hyperiond Smoothing] <INFO> set smoothing cfg: 25, interval: -251658240 ms, settlingTime: 40 ms, updateDelay: 0 frames
[hyperiond Smoothing] <INFO> set smoothing cfg: 0, interval: 67108864 ms, settlingTime: 40 ms, updateDelay: 0 frames
[hyperiond EFFECTENGINE] <INFO> effect finished
[hyperiond Core] <INFO> Unregister input source named 'Rainbow swirl fast' from priority register

but the second I play any (256 HEVC 4K or not) video it immediately throws this:

[hyperiond AMLOGICGRABBER] <INFO> VPU mode
[hyperiond AMLOGICGRABBER] <ERROR> AMSTREAM_EXT_GET_CURRENT_VIDEOFRAME failed.
[hyperiond AMLOGICGRABBER] <WARNING> GE2D capture interface not available! try Amvideocap instead

so this seems to fail:

so how would I go about changing the permissions? Is this needed for root as well?

regards
Anthrax


#331

Yes.

Another issue I found is that people seem to be building it for 64-bit, but our userland is 32-bit. This is probably causing a struct problem with the ioctl.


#332

Alright rebuild with:

 cmake -DPLATFORM=amlogic -DENABLE_AMLOGIC=ON -DENABLE_HUEENTERTAINMENT=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 ..

So I hope I now have the 32bit version (I had used amlogic64 the last time I built it…)…
But I still don’t know how to do the udev rules :frowning:


#333

I tried playing around with udev and and added the following line in “999-fix-amlogic.rules”:
ACTION=="add", KERNEL=="ge2d", SUBSYSTEM=="ge2d", GROUP="video", MODE="0660"

But still no dice… Anymore hints?


#334

Not yet. My focus was on getting the update out. Now I can get back to this.


#335

Hi Sam,

in the meantime I got my hands on an used Odroid C2 again and gave it another try.

I now have a working 4K Ambilight with the following environment:

Hyperion drives an Arduino Teensy 3.0 via FastLED library and my own ADALight implementation.
So far I haven’t encountered any lags or glitches while playing HD and UHD content…

Maybe this info will help you making this possible on the Vero 4k+.

Thank you very much!

best regards
Anthrax


#336

I don’t think CE has a working GE2D implementation. This still uses amlgrabber right?

Maybe setting that sysfs value will suffice on OSMC as well with the default grabber

Sam


#337

I just installed a pair of lightstrips on my tv, and was looking to try hyperion. It sounds like there are a few things still being ironed out - should I wait for now?


#338

You may experience some slowdowns with 4K content. But we are still working on a solution.

Sam


#339

I got some time on my hands in the late afternoon and want to give it another go on the Vero 4K+.

I’d like to try two things:

  1. replicate what I did on the Odroid (using the prebuilt CoreELEC addon and double_write_mode
    parameter)
    @sam_nazarko: Is there an easy way to install the CoreELEC addon on the Vero? Or would copy and paste work as well?
  2. going the GE2D route again with udev rule
    @sam_nazarko: any news on the udev rule? I tried this but failed: ACTION=="add", KERNEL=="ge2d", SUBSYSTEM=="ge2d", GROUP="video", MODE="0660"

Anthrax


#340

I think it’s just a binary in the same way it’s built above. I doubt it is using the GE2D interface but you can verify that with verbose output.
I’d start with double write mode first


#341

Is there a current installation and setup anywhere? I see fragments here and there, but was wondering if there was a consolidated post somewhere.

I only ask because I am quite a bit out of my depth with this stuff


#342

For now, I believe it must be compiled from source.
When I get some confirmation of some of the things above, we can create a simple package.

Sam


#343

Sliiightly offtopic question but which value for blackborder detection are you guys using? It might be imagination but since a couple of weeks the LEDs at the top and bottom hardly light up at all when playing non-16:9 material, so everything with black bars at the top and bottom that has an aspect ratio of something between 16:9 and 21:9. FullHD or UHD material works completely fine.

So after initially going with 15 %, I turned it up to 16 % but couldn’t detect any difference. The blackborder detection section of /etc/hyperion/hyperion.config.json looks like this

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

What’s your value for threshold?

For reference: https://hyperion-project.org/wiki/Blackborder-Detection-Threshold


#344

Hi @RJ45,

I never changed the black border detection default parameters and never had an issue with it. On less powerful hardware (RPI) it sometimes took a second to detect and switch the upper/lower leds but with Vero 4K+ I never had this happening to me.

Do you have overscan enabled by any chance? When using hyperion.ng you could check the live video/leds in the web config (might work with HyperCon as well)

Anyways I’ve been testing the Vero with hyperion.ng and the experience was pretty good. What keeps happening though is the occasional hiccup (known slowdown, a/v getting out of sync) every 30-45minutes of UHD…

But I’m a very happy customer now :wink:
For me the Vero 4K+ is now the benchmark over all the other boxes (I tried quite a few) struggling with 4K60FPS Ambilight! (my condolences go out to the people selling 400€ 4K HDMI splitters, linkers and what not)

Currently I’m using this hyperion.ng fork https://github.com/SJunkies/hyperion.ng as it controls my 160 LEDs together with 7 Hue lights with Philips’ new Entertainment API for very impressive ambient lighting results

High fives all around
Anthrax