OSMC and Hyperion

I think hyperion.ng does the AML / FB selection by itself. Portisch mentioned something like this and this code looks like its doing that: hyperion.ng/AmlogicGrabber.cpp at 74766fd62631a35d90872278b3bf9d88d4dfffdd · hyperion-project/hyperion.ng · GitHub

This also explains the observed behaviour that the FB setting only grabs the menu, and AML option grabs both (although not really successfully for video).
Somehow hyperion.ng/AmlogicGrabber.cpp at 74766fd62631a35d90872278b3bf9d88d4dfffdd · hyperion-project/hyperion.ng · GitHub can access but not read from the capture device

I have no idea what I am doing, but I tried “cat /dev/amvideocap0” and it prints a data stream while video is running (and gives “11 - Resource temporarily unavailable” when no video is running). So I have no idea why hyperion cannot read from that device

Yes I see what you mean. Things have certainly moved along a bit.

Well I’m trying unsuccessfully to recreate the issue over here, which given the same platform and software is odd. I’m using an Arduino via USB as my LED driver, so I’ve got that back in without the LEDs for now (tried FILE as the driver too). Hyperion wont know any different.

Problem: You say you get no lights when playing video (using NG)?
If I have NG running at all, be it grabbing, colour mood blobs or whatever, then I cannot play any video source. I’m trying the movies on my network share and streaming live TV from my TVHeadend server.
The screen goes black for a moment, then comes back to the menu, with a “now playing” notification on the top right, but nothing actually plays on screen.
I assume this is not your experience?
Are you using my pre-built binaries or have you done your own? In which case which build options have you selected?

I am using an Teensy vis USB/SPI with the same device configuration as for classic.
I let your installer compile from (latest) source and selected AMLOGIC, FB and SPI as far as I can remember.
Playback works both for local files as well as via Plex on April update OSMC.

How did you configure the grabber? I had some issues depending on height and width, but it did not stop video playback for me

Thanks, those options worked fine for me too.

Found it through a process of elimination. Having the V4L2 option enabled causes the no output situation. There were log errors to go with it - which I’ve only seen reported in connection with the Spotify addon. I’ll add some advice on that to the installer and change the pre-built binaries.

I’m not convinced you’d need the SPI option as you’re not driving the LEDs directly from the Vero that way, the Teensy is. Not that it likely breaks anything.

So now we are on the same page. Time to look at the source side of things.

Nice observation.

I thought it might be a permissions issue with /dev/amvideocap0 but it was a false positive. Have you tried watching the webGUI Live preview and skipping forward/back 10 seconds? You’ll see the frame at the point you skipped displayed and it looks like your lights should reflect that also.

If you’re running hyperiond --debug you’ll also log at the moment you did it:

[hyperiond AMLOGICGRABBER] Read of device failed: 11 - Resource temporarily unavailable

I’m wondering if this is related to the OSD getting involved at that point? Although pausing doesn’t seem to trigger it. Neither does anything to do with live TV streaming, so far as I can tell.

I’m also curious what all the "No carrier" messages are about, spamming the output.

Same issue here. Exact same error in my debug logs as well regarding resource unavailable. Everything works fine, menu wise but that is it.

Built from newest @hissingshark builder. Followed instructions. Only thing enabled is QT, FB and Amlogic. Odd that it always tries VPU mode.

[hyperiond AMLOGICGRABBER] (INFO) VPU mode
[hyperiond AMLOGICGRABBER] (ERROR) Read of device failed: 11 - Resource temporarily unavailable
[hyperiond AMLOGICGRABBER] (DEBUG) (Grabber.cpp:82:setWidthHeight()) Set new width: 64, height: 64 for capture

Let’s spin a new kernel.

I agree.

Had to install classic from binary and add amlogic and framebuffer to the json file located in /etc/hyperion.

Only way I can get hyperion to work at the moment. Get a lot of A/V sync issues related to hyperion. Colors just aren’t as correct as hyperion.ng

@sam_nazarko
User Anthrax had NG working earlier in the year.
I’ve built from the last commit his fork had pulled from f7d5c2c9 and it is working on our current kernel. I’m now several builds into bisecting where the NG changes have broken things for us. Presently up to a working:
Feb 14, 2019 Merge pull request #538 from Portisch/Amlogic_Grabber 91054d8
So this may not be a kernel issue yet.

For anyone interested in trying it I’ve updated the installer so that you can optionally give a commit hash when starting the installer. When you select build from source it will build from there. e.g:
sudo ./install f7d5c2c9

Also note that the configs for the webGUI are stored under /.hyperion, so you may need to delete this folder when testing wildly different versions.

1 Like

FYI -
VPU mode is not an issue per se. These are the log behaviours when NG is running normally with the older commits:

In Kodi menu OSD:
[hyperiond AMLOGICGRABBER] <INFO> FB mode

During video playback:
[hyperiond AMLOGICGRABBER] <INFO> VPU mode

f2eef4e “Amlogic: implement CAP_FLAG_AT_END mode” is the deal breaker. Reasons to be determined.

Last good commit was 101855f.
The installer binaries are now built from this commit and source builds will default to this commit unless another is specified.

Good luck with your testing.

Hello hissingshark,
first of all thanks yor your build!

I tried your new build, but still getting unexpected error.
[hyperiond V4L2:auto] Throws error: Only pixel formats UYVY, YUYV, and RGB32 are supported

[hyperiond HYPERION] setInputImage() used without registerInput() for priority ‘0’, probably the priority reached timeout

“Unexpected reply signature: got “”, expected “a{sv}””

I don’t know where i made mistake or where is fault.

I’d say you built with V4L2 enabled when you selected your options. Try again without. Meant to add that to the advisory - thanks for the reminder.

The pre-built binaries should be fine as they’re built without.

Awesome, thank you for figuring this out.

Does it run without desync for you now?
As far as I could tell from the conversations over at Coreelec this commit (the CAP_FLAG_AT_END in specific) was the key point to fix that issue.
Maybe we need some kernel fix to support that after all, or maybe something else in that commit broke things. I will try to test the individual changes once I find time for that

1 Like

Those are not errors

Sam

That’s good news :slight_smile:

Currently still building. I will turn hyperion.ng logs on debug and attempt to play a video and see what happens. I have a feeling I’m still going to be seeing FB mode on the OSMC menu. Reinstall classic again. I’m feeling hopeful though!

Very familiar with this one though.

I ran that command and nothing happened.

That is a warning, which is not an error, unless -Werror is set (which it isn’t, here).

Just leave it and it looks like it will build

Just keep the build going, copy any errors at the end

Sam