OSMC and Hyperion

captures amlogic and fb. video and menu. it works! how can I get it to start itself on it’s own between reboots?

Only way to get it to work correctly is to start ./hyperiond from the terminal from

root@osmc:~/hyperion-vero4k/hyperion_nextgen/source_nextgen/build/bin

starting from anywhere else with output no errors, show hyperion working with systemctl status but it does not capture anything. I have to have the terminal up as well as the webUI to capture amlogic and FB at the moment. Did I do something incorrectly?

Also, see this in logs.

“Unexpected reply signature: got "", expected "a{sv}"”
[hyperiond AMLOGICGRABBER] VPU mode
[hyperiond AMLOGICGRABBER] AMSTREAM_EXT_GET_CURRENT_VIDEOFRAME failed.
[hyperiond AMLOGICGRABBER] GE2D capture interface not available! try Amvideocap instead

@sam_nazarko

I will get the webUI starting it either way but starting hyperiond from the hyperion-vero4k build/bin folder is the only way to get it to actually capture. When I ran the command first, my settings from the WebUI were not transferred over but when I set it up correctly via the WebUI that is started with running ./hyperiond rather than systemctl start hyperion. Completely different, results. One works, one doesn’t. How can I start hyperion.service from the hyperion-vero4k folder? If I just simply type systemctl start hyperion, it WebUI shows up and everything but zero capturing, menu or video.

@hissingshark I hope my explanation makes sense lol

I am capturing video fine but I have a terminal window open also as well as the WebUI. Only way I could get it to work. systemctl start hyperion does nothing but start the webserver, no capturing. Remote control area where the current source is being used is blank. Move same exact settings over to the other WebUI from your folders and it works. I knew something was off when it had all the options to update to 2.1.1 in the WebUI. The one I am currently using (yours) does not. Works perfectly at the moment. Just want to figure out how to start it on reboots. My show just ended and it switched back to FB no problem :slight_smile:!

Even though it’s working. There is something still not right. Maybe I need to copy some files somewhere outside of the hissingshark installer?

32%20PM

final edit: removed hyperion.service from /etc/systemd/system and reinstalled hyperion.ng from source. started with systemctl start hyperion. Captures fine.

Here are the debug logs from the WebUI. Service is working with video and menu.

To have the service start automatically:

sudo systemctl enable hyperion

1 Like

@maxanier How are you getting on with it?

By “without desync” I take it you meant the brief periods of slow down with loss of AV sync, rather than some dysync setting?

I’ve not had time to watch a lot recently, but it hasn’t happened to me YET. I get the odd stutter on screen, like a subliminal message, but if I rewind back over that moment it doesn’t appear again. Maybe an improvement on the problem, or an unrelated phenomenon…

The only other thing that I’ve seen is the picture freezing briefly after un-pausing, whilst the audio starts straight away. That I’ve now been able to discount as it’s been reported elsewhere without Hyperion - a Leia thing - and Sam is already working on it.

1 Like

That should be fixed now.

Sam

1 Like

Would you mind sharing your sketch? I’m still struggeling to get all my leds working (300) but with my arduino it’s only working up to 255 properly. I tried this with a Teensy but coulnd’t get it working at all. Cheers.

Yesterday I tried the commit you found and was able to watch a full 4k movie with out any “desync” :partying_face:

Maybe the CAP_FLAG_AT_END change I mentioned was only necessary for a different Amlogic device.

I might try to find out what exactly broke with that commit and how it can be fixed for our Vero4k@OSMC, but since things appear to be running smoothly now, it will be low priority.

Unfortunately, I can’t find the sketch anymore.

Pretty sure it was based on this one Adalight/LEDstream.pde at master · adafruit/Adalight · GitHub
But might I have had to modify it slightly, can’t remember

We had been having a good run, but then had a moment last night watching BBC iPlayer! That won’t have been 4K. In fact I don’t have any 4K content at all to try. All 1080p here.

thank you, ill give it a shot

Use this sketch.

https://github.com/dmadison/Adalight-FastLED

I have my baud rate set at 115200. Needs to match the same settings in the webUI. Just select Adalight with that fastled sketch on your board.

@sam_nazarko when I installed hyperion.ng I experimented with getting it to start on boot. I am using the new Kodi app to do it but I also have systemctl enable hyperion so I believe I have to ways in place to start hyperion.ng on boot.

My question is that I accidentally added it to a service in the OSMC settings app, its greyed out and says (stopped). Obviously, this does not need to be here but I can’t remember how I added it. I referenced a different thread to add it into this folder that I can’t find at the moment.

Also, if I am using a @hissingshark build that I compiled from the installer, is there a way to update to any changes you make on git w/o doing a full uninstall and reinstall? I just want to commit your changes to my install.

Here is a photo of what I screwed up. Where might I find this folder lol?

I see the same thing. I can even hit pause and it continues to play until it syncs back up. I usually can hit play after and maybe in 5 seconds or so it will skip forward. I’ve been playing with difference capture frequencies and sizes also, which could be the issue. Also, maybe we should try turning off blackborder detection and see it it helps with A/V sync issues.

Greetings all.

According to its developers Hyperion is on the cusp of moving from Alpha to Beta!

The a/v sync bug is now fixed on Vero4K using Hyperion.ng and the latest kernel. It turns out we were missing some changes that had been included on other distros that the fixes had been targeted for.

You will need to:


Backup your configs:
There is an option to export your configs from the web GUI. You can then re-import them after the update.
Configuration->General->Import/Export Configuration->Export


Install the June OSMC update as usual:
uname -r should show at least 3.14.29-150-osmc
If you don’t then the AML grabber will be broken altogether.


Update my installer:
Easiest just to delete the hyperion-vero4k folder and clone it again:
(git clone https://github.com/hissingshark/hyperion-vero4k).


Update hyperion.ng
sudo ./install from inside the folder
Select Hyperion.ng->Install from binary


Restore your configs:
Configuration->General->Import/Export Configuration->Choose file then Import


NOTE - The pre-built binaries are updated to the latest stable commit and built for Framebuffer and AML grabbing. There’s no need to be compiling from source unless you specifically need another option like using external grabbers or want to be testing newer versions (there’s no real need to do that - if it was working I’d likely have updated the binaries anyway).

6 Likes

thanks for the update @hissingshark … i switched to your installer (had the version anthrax posted some month ago) since the june update gave me the sad face while playing video. looking good again :slight_smile:

Dear @hissingshark @sam_nazarko thanks for awesome work. Now i am able to run hyperion NG on VERO without glitch. I have jist Arduino Nano, Vero 4K and LED WS2801.
Just a few things to do for others who are interested. If you have external grabber you will need to make your own build from @hissingshark sources. At least i hope so. Am i right @hissingshark?
If you are using amlogic grabber follow these instructions OSMC and Hyperion - #537 by hissingshark

After all you need to change double_write_mode parameter of amvdec for H265(HEVC) and VP9(Youtube etc) decoder to value 3. I hope that everyone with VERO otherwise will have problems to make hyperion works with HEVC and VP9. Exact problem i don´t know. Bellow is just for info what parameters for doublewirte mode means.

/* DOUBLE_WRITE_MODE is enabled only when NV21 8 bit output is needed */
    /* hevc->double_write_mode:
    	0, no double write;
    	1, 1:1 ratio;
    	2, (1/4):(1/4) ratio;
    	3, (1/4):(1/4) ratio, with both compressed frame included
    	0x10, double write only
    */

I am using a little modified script from @portisch CoreElec dev, but you can do that your way.
I have in hyperion.service following

  ...
    ExecStartPre=/bin/sh -c "exec sh /usr/share/hyperion/bin/platform.sh start"
    ExecStart=/usr/bin/hyperiond
    ExecStopPost=/bin/sh -c "exec sh /usr/share/hyperion/bin/platform.sh stop"
    ...

and script file platform.sh

#!/bin/sh

if [ -d /sys/module/amvdec_h265 ] && [ -d /sys/module/amvdec_vp9 ];then
    case "$1" in
    "start")
	sudo chmod 0666 /sys/module/amvdec_h265/parameters/double_write_mode
	sudo chmod 0666 /sys/module/amvdec_vp9/parameters/double_write_mode
        echo 3 > /sys/module/amvdec_h265/parameters/double_write_mode
        echo 3 > /sys/module/amvdec_vp9/parameters/double_write_mode
    ;;
    "stop")
	sudo chmod 0666 /sys/module/amvdec_h265/parameters/double_write_mode
	sudo chmod 0666 /sys/module/amvdec_vp9/parameters/double_write_mode
        echo 0 > /sys/module/amvdec_h265/parameters/double_write_mode
        echo 0 > /sys/module/amvdec_vp9/parameters/double_write_mode
    ;;
    esac
fi

This will automatically rewrite permissions and values for double write paramaters for start and back to default values if you stop hyperion. Don´t forget to made platform.sh executable (chmod +x platform.sh) and chmod it to 0666.

Best regards
Tomas

Perhaps you can clear this up for me? I’ve never had the opportunity to test an external grabber. My understanding is that you would need to build with V4L2 selected? Is that right?

I do not include this in my builds because that grabber appears to override the AML grabber with the effect that during video playback:

  1. There is no grabbing in the web GUI preview window;
  2. There’s a notification in the top right of the TV to say a video is playing, and the "resume from " option indicates that the video has been playing, but no playback happens on screen.

It may be that with a USB grabber connected it would work normally, but without one I cannot tell!

Is this only for usage with USB grabbers and stuff? Why must I need to turn on double write mode?

Also, besides the script app for Kodi, is there a way to have the LEDs turn off while the screensaver is on using hyperion.ng?

The script can also enable hyperion.ng at startup if you don’t have it done so already.

Hey @hissingshark,

after an afternoon of fiddling and using your AWESOME installer I now have a working Ambilight on my Vero4K+ again.

BUT (and there always is one): For the life of me I can’t figure out how to have the leds turned on automatically - this has never been an issue before…

  1. I have imported the old config and it’s working fine.
  2. I have successfully added and testet the hyperion systemd service unit
  3. after rebooting the hyerion webgui runs fine but the lights are off
  4. only after toggling disable hyperion → enable hyperion in the webgui the lights come on :frowning:

Does anybody have any explanation/idea?

cheers
Anthrax

1 Like

Have a look at this addon - this should fit your needs

Anthrax

2 Likes

Same thing here. @hissingshark

Do I need a comment for a specific branch after running sudo ./install.sh?

As in ‘sudo ./install.sh f7d5c2c9’