osumoclement / script.black.bars.never

An addon to automatically remove black bars in KODI
GNU General Public License v3.0
12 stars 2 forks source link

problem on coreelec #1

Closed ananias47 closed 1 year ago

ananias47 commented 1 year ago

hi my friend i find out that on windows 10 works well but on coreelec in some cases doesnt work

osumoclement commented 1 year ago

Hi, I am investigating this. It doesn't seem to work on many of these kinds of due to something to how they render video. Can you disable hardware acceleration and try see if it now works?

ananias47 commented 1 year ago

yes my friend with hardware acceleration off it works well but the odd thing is that manual zoom works well on coreelec in videos where your addon dont work. ps : i know that on android version of kodi doesnt work manual zoom either

osumoclement commented 1 year ago

So with hardware acceleration turned off the addon works well in all videos?

ananias47 commented 1 year ago

yes but the videos are laggy

osumoclement commented 1 year ago

I have same problem so this needs investigation. It may take a while to solve though

osumoclement commented 1 year ago

Hi, there's a new release which sort of helps in cases like these. Try it out (enable the Android workaround) and let me know if it helps

ananias47 commented 1 year ago

I try it on coreelec and it give me many log errors and it doesn't work

osumoclement commented 1 year ago

Can you post a screenshot of the errors I check

ananias47 commented 1 year ago

Screenshot_20230620_165337_ES File Explorer Screenshot_20230620_165343_ES File Explorer Screenshot_20230620_165349_ES File Explorer Screenshot_20230620_165359_ES File Explorer

osumoclement commented 1 year ago

I have uploaded new code, use it and tell me if it works

ananias47 commented 1 year ago

I try it but nothing happened and i have this errors when i press toggle status Screenshot_20230620_175828_ES File Explorer Screenshot_20230620_175821_ES File Explorer

osumoclement commented 1 year ago

Okay, send screenshot of addon settings

ananias47 commented 1 year ago

What i must sent?? I already did it on previous post

TwilightMercy commented 1 year ago

You need to configure the addon settings exactly like in the picture, no need to press Toggle status

image

ananias47 commented 1 year ago

I already did this

ananias47 commented 1 year ago

Hi i tested it on android and it seems that it doesn't work

osumoclement commented 1 year ago

I have identified the problem will fix soon

osumoclement commented 1 year ago

There's a new release which should work

ananias47 commented 1 year ago

hi my friend now i tested it and it works on movies but it doesnt work on same episodes on series and on netflix addon

osumoclement commented 1 year ago

Okay, will investigate

Benik3 commented 1 year ago

Hi. You wrote in readme that capturing doesn't work on Coreelec with HW acceleration. But Hyperion add-on (which grab screen and drive ambilight LEDs) works fine. Maybe it could help you with grabbing screen on Coreelec :)

osumoclement commented 1 year ago

Hi. You have CoreELEC? And Hyperion works with hardware acceleration enabled?

Benik3 commented 1 year ago

Yeap I have Coreelec 20 on x96 box (amlogic s905x3).
The hyperion works without any problem with HW acceleration enabled.

osumoclement commented 1 year ago

I see, have you tried this addon on the CoreELEC? Does it work?

Benik3 commented 1 year ago

I'm now out of my home, but I can test it next week :)

osumoclement commented 1 year ago

Okay :)

TwilightMercy commented 1 year ago

@Benik3 Update when you’ll can Android support is important:)

Benik3 commented 1 year ago

@TwilightMercy I have Coreelec (Linux), not Android.

Anyway I tried it and it doesn't work on Coreelec. In log I have:

2023-07-16 20:59:11.288 T:9667    error <general>: CRenderManager::Capture - unknown capture id: 0
2023-07-16 20:59:11.288 T:9667     info <general>: Interim Aspect Ratio = 178
2023-07-16 20:59:11.291 T:9667    error <general>: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                                    - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                                   Error Type: <class 'IndexError'>
                                                   Error Contents: bytearray index out of range
                                                   Traceback (most recent call last):
                                                     File "/storage/.kodi/addons/script.black.bars.never/addon.py", line 34, in onAVStarted
                                                       self.abolishBlackBars()
                                                     File "/storage/.kodi/addons/script.black.bars.never/addon.py", line 132, in abolishBlackBars
                                                       aspectratio = self.GetAspectRatioFromFrame()
                                                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                                                     File "/storage/.kodi/addons/script.black.bars.never/addon.py", line 89, in GetAspectRatioFromFrame
                                                       __middleScreenDark = self.LineColorLessThan(
                                                                            ^^^^^^^^^^^^^^^^^^^^^^^
                                                     File "/storage/.kodi/addons/script.black.bars.never/addon.py", line 60, in LineColorLessThan
                                                       _bArray[i] &= 0x00
                                                       ~~~~~~~^^^
                                                   IndexError: bytearray index out of range
                                                   -->End of Python script error report<--
osumoclement commented 1 year ago

It's strange because I checked Hyperion and the code they use is same as what I'm using to grab screenshot. I'll do more investigation

Benik3 commented 1 year ago

I think that Hyperion doesn't use CRenderManager, but special Amlogic grabber... https://github.com/hyperion-project/hyperion.ng/blob/64642a44578fe48dce8144c23180d29c160c7906/libsrc/grabber/amlogic/AmlogicGrabber.cpp

osumoclement commented 1 year ago

I think Hyperion uses a standalone app different from Kodi to achieve the screenshot. Wouldn't work for this addon because of that, but means Kodi could use their strategy to implement this in Kodi app internally

TwilightMercy commented 1 year ago

Is there any open issue about that in Kodi’s github?

osumoclement commented 1 year ago

I don't think so

Benik3 commented 1 year ago

I think Hyperion uses a standalone app different from Kodi to achieve the screenshot. Wouldn't work for this addon because of that, but means Kodi could use their strategy to implement this in Kodi app internally

You are right. Hyperion runs as standalone app, there is just add-on for the app so the Hyperion can be controlled from Kodi (e.g. by play/pause of video).

osumoclement commented 1 year ago

Yes, and they do the screenshot using some workarounds specific to CoreELEC, so maybe Kodi could copy that