Giter Site home page Giter Site logo

hyperion-android-grabber's People

Contributors

abrenoch avatar boralyl avatar lokalise-bot avatar ninovanhooff avatar paulchen-panther avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hyperion-android-grabber's Issues

Secure sources

Don't know the first thing about this yet, but it is bound to be an issue.

Apps like Netflix and Amazon Video are DRM protected, but this might be able to by bypassed using root and xposed.

buildNotification with intent null on android tv

PendingIntent pIntent = PendingIntent.getActivity(mContext, PENDING_INTENT_REQUEST_CODE, intent,

crash on android tv emulator Oreo 8.0 and Mi Box 3 Oreo 8.0 when call intent.migrateExtraStreamToClipData(); PendingItent.java line 340

I don't set setContentIntent for the builder when isTv
UiModeManager uiModeManager = (UiModeManager) mContext.getSystemService(UI_MODE_SERVICE); if (uiModeManager.getCurrentModeType() == Configuration.UI_MODE_TYPE_TELEVISION) { isTv = true; }

Grabber sometimes get stuck immediately after starting?

I've only seen this a handful of times, but basically the screen content being sent to the LEDs does not change when switching the app.

I'm not sure what exactly the cause is yet, but clearing the app from the memory and restarting the grabber service eventually seems to solve the problem.

Stops grabbing

Not sure what the exact source of this problem is yet, but the result is the screen grabber stops running (as indicated by the absence of the cast icon in the notification bar). The problem seems to be either the HyperionScreenEncoder Runnable is dying off, or the HyperionScreenService IntentService it was launched from is being terminated. I'm trying to run that intent service as a foreground service, but I'll have to do some work to see if that is actually working as expected (https://stackoverflow.com/questions/6645193/foreground-service-being-killed-by-android). I am getting the notification that the service is in the foreground, but I'm not sure what impact that is having on the screen grabber (and the notification seems to be a bit too persistent - should have a exit button).

Seems to be the only major hold-up right now!

Reload settings when settings are closed / updated

It seems that the TV app does not notice that the host has been filled until the app is restarted

reproduce:
with a fresh install of the app:

  • start the app
  • open settings. the host is 0.0.0.0
  • change host
  • close settings
  • click the on/off button

expected: hyperion is turned on
actual: toast message: Host must not be empty

After an app restart, the host is used, so the persistence is not the problem. Settings should be reloaded when settings are closed.

I'd be happy to fix this

Stopping grabber

can swipe the app out of memory on a phone, but the TV build doesn't seem to behave that way.

Basically the grabber doesn't stop sending data when it should.

Remove the video encoder

The most I can anyway; I'm not sure exactly how reliant I am on the behavior of this yet (original code is not mine).

Ideally the encoder gets stripped down to the bare essentials that allows it to ecode the screen to an EGL surface, then implement a decoder for the hyperion image instead.

Grabber image quality configuration

Might still need to determine the best way to represent this as a setting... This should be very simple for the end user to figure out, and not something they need to guess at.

A good way may be to simply have the user note how many LEDs wide & tall their setup is. Seems like that should give us a good bitrate range to aim for when scaling the captured image from the device running the grabber.

EGLSurface -> RGB byte array

Basically decode the pixel data from the surface into a byte array that we can send over the hyperion protobuf socket.

Scan for hyperion server on the local network

Punching in ip addresses and port numbers sucks, especially on a TV. Let's try to find a running hyperion server if the settings haven't been filled yet. Currently working on this

✓ investigate technical feasibility
✓ Implement Scanner
▶ TV UI
◌ Mobile UI

No software licence

Adding a licence to the project will make it easier for people to contribute

Grabber image contains padding

Black padding on either top/bottom/sides depending on the screen orientation (and probably other things).

Explains some users feeling like the colors are not as vibrant as they should be, and should explain #30

captures only a small part of the screen

Hi

running on 5.1.1 its only captures the pixels from upper left corner.
Tried with out scaling, but as expected extremly slow...

My idea is capture with full resolution and scale after
Image img = reader.acquireLatestImage();
before
'savePixels(ing)'
I am a PLC Programmer no Android.
Any suggestions on doing this or why it is only captures a small part?

The Good and The Bad

First of all thank you @abrenoch 😘

I am currently super worried and pissed at the current state of things... let me explain. Android is not a small or niche platform, but still when it comes to some stuff it get's left behind.

SPMC is a great kodi fork very important for android / shield tv users especially because it's ability to run the Hyperion-Ambilight Addon while hardware acceleration is turned off. If I turn off hardware acceleration on any kodi build I can't playback any video file without stutter... but as most of you know SPMC got discontinued few weeks ago which really worries me about the future. I don't wanna be stuck with SPMC forever. I know these developers sacrifice their free time and don't owe us anything! I'm not complaining just voicing my concerns that's all.

It's really cool that @abrenoch has made this application! I use SPMC/kodi and YouTube on my shield tv and it's great that I'm not dependent on the kodi youtube addon because it's sucks and is limited to only 720P.

The Grabber works fine but sometime freezes and I have to manually restart it. But has some pro's and con's.

Pro's:
not limited to kodi/SPMC
has a settings for framerates
good black border recognition very quick
hasn't has a issues with different framerates (causes no delay while watching 24fps movies)

Con's:
isn't 100% reliable yet stops working randomly
right side of LED's not bright as the rest!
no settings option for how much % in the picture should be scanned
no settings like the Hyperion addon which enables to set picture width and high I have mine set to 225 and 120 which results in a more accurate effect. shield tv can handle stuff like this. there is a noticeable difference in the ambilight effect between the addon and this apk.

I just hope @abrenoch continues development on this very promising app.

Grabber status showing connection before connection error was returned

With the new changes that broadcast the grabber status, if the host is unavailable, the animation showing the grabber has started would play for just a moment before the connection error was returned, which the animation would stop playing as expected.

Same issue as before but the reverse now 😆

Alternate interface for TV

Project was started with support for android TV, so a simple interface will need to be tossed together to deploy a test for the shield.

Bugs and improvements

Platform:

  • Mobile:

    • (BUG) Toast "message_service_started" not in the foreground in landscape mode
    • (BUG) Warning toast (error_empty_host) appears as often as the application was in the background
  • General:

    • (IMPROVEMENT) HyperionNotification.java move Hardcoded Strings (NOTIFICATION_CHANNEL_LABEL, NOTIFICATION_TITLE and NOTIFICATION_DESCRIPTION) to XML.

Consolidate strings into common directory

To make it easier to use lokalise to handle user contributions to the translations, we should move all the strings to the common directory. Otherwise we would need to manually organize those values every time a translation is added or updated.

We should probably organize the default values and the pref_key_* values to a different file as well so they don't get mixed up with the translation strings. Lokalise only supports string values anyway so we would have to store those in a different file regardless,

Handle screen rotation

This probably is not at all relevant to the tv build, but when grabbing on a mobile device and the screen is rotated, then the content of the grabbed screen gets all funky. Maybe we would need to re-initialize the grabber on rotation events? Would take a little experimenting.

Quick settings tile not showing connection error toast

If the MainActivity is not running when the settings tile is toggled, the grabber will fail to start without showing the toast notification.

Easy enough to add a toast to HyperionGrabberTileService, but it might need something to check if HyperionGrabberTileService has a BroadcastReceiver registered before showing the toast in MainActivity, or else the notifications will double-up. Seems like that should be easy to achieve with a static boolean in HyperionGrabberTileService.

Color tuning

Maybe this is better suited for hyperion itself, but wanted to consider it.

Grabber should fail to start if the provided host in unreachable?

It seems like when turning on the grabber, and the host is unreachable, the grabber should be turned back off and convey to the user that the provided host is unreachable.

Any thoughts on this from anyone? Seems like the right move to me, though we may need to look at how this interacts with the reconnect behavior (maybe not).

Out Of Memory

git hash 4f09e7c (image quality branch)

java.lang.OutOfMemoryError: Failed to allocate a 134287376 byte allocation with 25165824 free bytes and 62MB until OOM, max allowed footprint 161279872, growth limit 201326592
        at com.abrenoch.hyperiongrabber.common.network.Hyperion.receiveReply(Hyperion.java:139)
        at com.abrenoch.hyperiongrabber.common.network.Hyperion.sendRequest(Hyperion.java:127)
        at com.abrenoch.hyperiongrabber.common.network.Hyperion.clear(Hyperion.java:45)
        at com.abrenoch.hyperiongrabber.common.network.HyperionThread$1.clear(HyperionThread.java:46)
        at com.abrenoch.hyperiongrabber.common.HyperionScreenEncoderBase$1.run(HyperionScreenEncoderBase.java:63)
        at java.lang.Thread.run(Thread.java:764)
07-14 11:59:03.986 688-757/? E/InputDispatcher: channel '623e101 com.abrenoch.hyperiongrabber.tv/com.abrenoch.hyperiongrabber.tv.activities.MainActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
07-14 11:59:03.988 688-757/? E/InputDispatcher: channel 'c3f6976 com.abrenoch.hyperiongrabber.tv/com.abrenoch.hyperiongrabber.tv.activities.ManualSetupActivity (server)' ~ Channel is unrecoverably broken and will be disposed!

Stops randomly

Not sure the best way to describe this. Using the grabber on a Shield. Works perfect for a while then the lights will freeze. Going to grabber, turn off and on and all good. No consistency in how long it works, but works no longer than 35 mins.
Any logs or anything I can look at?
Using Alpha 2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.