Kodi Community Forum
I have created an addon to remove all black bars, including hard coded - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27)
+---- Forum: Video Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=154)
+---- Thread: I have created an addon to remove all black bars, including hard coded (/showthread.php?tid=369869)

Pages: 1 2 3 4 5 6 7 8 9


RE: I have created an addon to remove all black bars, including hard coded - lrusak - 2022-12-02

(2022-10-09, 10:03)osumoclement Wrote:
(2022-10-09, 00:31)HeresJohnny Wrote:
Code:
I tried this on CoreELEC / Kodi20 and unfortunately, it throws an error:

I encounter the same error when I try running the addon on Kodinerds build (which has support for MKV Dolby Vision). If you check the log just above the exception, you'll probably see this error:xbmc CRenderManager::Capture - unknown capture id: 0

If you check RenderManager.cpp it defines the capture ID as 0 by default unsigned int CRenderManager::m_nextCaptureId = 0;. It seems in LibreElec and other non-vanilla Kodi the capture ID is not zero, and the frame captured is empty leading to index out of range. The actual block where the error is thrown is this:
cpp:

it = m_captures.find(captureId);
if (it == m_captures.end())
{
CLog::Log(LOGERROR, "CRenderManager::Capture - unknown capture id: {}", captureId);
return;
}

I do not yet know what CaptureID is and why it's different in non-Vanilla Kodi versions, but this is something I am keen to solve and hopefully if anyone has some insights on this I would appreciate

RenderCapture won't work on many GLES platforms that use special hw renderers. You wither have to disable all hw decoding or use vaapi (x86 only).


RE: I have created an addon to remove all black bars, including hard coded - PatK - 2022-12-04

Having enjoyed this add-on for a few days, it's now part of my featured arsenal. In favour of some quick disconnect; reset in the video osd to normal, then choosing 'shift' with an adjustment to accommodate subs, snaps back to 'custom' invalidating 'shift' in some video (but not all), a minor glich I can live with for the overall large payout.


RE: I have created an addon to remove all black bars, including hard coded - osumoclement - 2022-12-04

(2022-12-02, 16:57)lrusak Wrote: RenderCapture won't work on many GLES platforms that use special hw renderers. You wither have to disable all hw decoding or use vaapi

I am curious on why RenderCapture does not work on GLES but does work on VAAPI (which I suppose also uses hardware rendering)? Why is this limitation in GLES?


RE: I have created an addon to remove all black bars, including hard coded - osumoclement - 2022-12-04

(2022-12-04, 19:50)PatK Wrote: reset in the video osd to normal, then choosing 'shift' with an adjustment to accommodate subs, snaps back to 'custom' invalidating 'shift' in some video
Is this behavior confirmed to be caused by the addon? Try disabling the addon on the videos you see this and see if there's any change


RE: I have created an addon to remove all black bars, including hard coded - lrusak - 2022-12-22

(2022-12-04, 19:55)osumoclement Wrote:
(2022-12-02, 16:57)lrusak Wrote: RenderCapture won't work on many GLES platforms that use special hw renderers. You wither have to disable all hw decoding or use vaapi

I am curious on why RenderCapture does not work on GLES but does work on VAAPI (which I suppose also uses hardware rendering)? Why is this limitation in GLES?

In GLES render capture is only implemented by CLinuxRendererGLES. This class is also inherited by the vaapi renderer.

Other renderers on GLES may not even use OpenGLES (for example mediacodec or drmprime renderers).

Since rendercapture is expensive (reading back the pixels) it may not be performant to add (or possible) on these special hw renderers.


RE: I have created an addon to remove all black bars, including hard coded - osumoclement - 2022-12-22

Thank you, that clears things up for me


RE: I have created an addon to remove all black bars, including hard coded - DAlba - 2022-12-25

Is it possible to use this to analyze video played but instead of zooming have it send IP command to projector lens memory/screen motorized masking system?
Alternatively, will this change what Kodi API reports in StreamDetails for aspect ratio? My Control 4 driver can handle sending the IP commands but unfortunately Kodi shows all my MKV movies as 1.78 ratio as originally encoded on bluray discs.


RE: I have created an addon to remove all black bars, including hard coded - vurt - 2022-12-28

My wife hates black bars so this is a godsend if it works.

I tried to install the zip from github on my setup: Kodi 18.9, EmbyCon 1.9.135—this runs on Android on Nvidia Shield TV Pro.

Code:
Failed on install add-on from zip file
The dependency on xmbc.python version 3 could not be satisfied



RE: I have created an addon to remove all black bars, including hard coded - Karellen - 2022-12-28

(2022-12-28, 19:03)vurt Wrote: Kodi 18.9,
Too old. You need v19 as the minimum. v19.5 is the most recent release.


RE: I have created an addon to remove all black bars, including hard coded - osumoclement - 2022-12-28

(2022-12-25, 22:53)DAlba Wrote: Is it possible to use this to analyze video played but instead of zooming have it send IP command to projector lens memory/screen motorized masking system?

Yes, but you'd have to do some modifications to the source code. In fact, the core functionality of this script I got from this addon (CIHAutoNox) and it is used for exactly what you have described. All you have to do is replace the xbmc.executeJSONRPC calls in this script with code that sends the IP commands.
(2022-12-25, 22:53)DAlba Wrote: Alternatively, will this change what Kodi API reports in StreamDetails for aspect ratio?

I am not too sure about this but I don't think it does.
(2022-12-25, 22:53)DAlba Wrote: Kodi shows all my MKV movies as 1.78 ratio as originally encoded on bluray discs.

How's your setup like?


RE: I have created an addon to remove all black bars, including hard coded - vurt - 2022-12-29

(2022-12-28, 20:10)Karellen Wrote:
(2022-12-28, 19:03)vurt Wrote: Kodi 18.9,
Too old. You need v19 as the minimum. v19.5 is the most recent release.

Thank you, guessed as much Undecided


RE: I have created an addon to remove all black bars, including hard coded - jdimz23 - 2022-12-29

This black bar remover has made my life a living hell. It completely blurs 30% of the right side of the screen everytime I choose a movie or tv show to watch. Almost every single link.


RE: I have created an addon to remove all black bars, including hard coded - Dangelus - 2022-12-30

(2022-12-29, 22:50)jdimz23 Wrote: black bar remover has made my life a living hell.
I would have just stopped using it when it got to the “living hell” stage but what do I know? The tone of your post is perhaps not the greatest self introduction to our community either.
(2022-12-29, 22:50)jdimz23 Wrote: It completely blurs 30% of the right side of the screen everytime I choose a movie or tv show to watch.
How about providing some debug information to help the developer improve the addon? Only if you want to make a positive and constructive contribution that is I guess.
(2022-12-29, 22:50)jdimz23 Wrote: Almost every single link.
Almost every single “link” huh? I’m guessing your installation may fall foul of our Forum Rules regarding Banned Add-ons (wiki) so perhaps it might not be worth submitting that Debug Log after all…


RE: I have created an addon to remove all black bars, including hard coded - QianyuLi - 2023-02-09

@osumoclement
Very interesting add-on, can it add options to adapt to more situations?
For example, the TV show I'm currently watching is older, so although the frame is nearly 16:9, it has hard-coded top and bottom black edges.
Currently the add-on automatically scales to almost no black edges on top and bottom (probably due to inaccurate edge analysis, so it doesn't cut completely) but it also results in loss of left and right screen.
I would like it to minimize the top and bottom black edges without losing the left and right screen. This is possible with manual adjustment.
To counteract the problem of less than accurate analysis edges, add-ons should be allowed to manually set positive and negative values.


RE: I have created an addon to remove all black bars, including hard coded - osumoclement - 2023-02-09

(2023-02-09, 08:26)QianyuLi Wrote: Very interesting add-on, can it add options to adapt to more situations?

Yes, feature requests are welcome.
(2023-02-09, 08:26)QianyuLi Wrote: I would like it to minimize the top and bottom black edges without losing the left and right screen. This is possible with manual adjustment.

How are you achieving this with manual adjustment? I assume you are using "Stretch 16:9" option?