Guest - Testers are needed for the reworked CDateTime core component. See... https://forum.kodi.tv/showthread.php?tid=378981 (September 29) x
  • 1
  • 7
  • 8
  • 9(current)
  • 10
  • 11
I have created an addon to remove all black bars, including hard coded
Thanks, will take a look
Reply
(2024-02-23, 22:52)archegon Wrote: I have released an update that added back the Android Workaround method.

Also added the ability to detect multiple aspect ratios based on online metadata.

Auto refreshing of the zoom on multiple aspect ratios media, this is toggleable in the options, but it is NOT available for the android workaround method.

osumoclement, please take a look and if everything is working fine, feel free to incorporate the updates upstream.

Latest release
New issue found while watching. Smile  I'm watching Red Dwarf, the old BBC sci fi comedy series  in my mix of shows, today an episode spun up an episode from 1997.  Now this is a series that is '4:3 but with pillar boxes because it's remuxed off a Blu-Ray', but the opening credit section is also letter boxed.  On my 16:9 screen, it cropped and zoomed based in the letter boxing in the opening, though it's pillar boxed the entire way, however this constitutes a series that'd best be played 'un zoomed' on a 16:9 screen.

So the 30 sec opening looks like this:
Image

But the rest of the episode is like this:

Image

I hate to say it but I'm sure continued use of this addon will lead to additional posts like these, just finding things not accounted for.  I'm sure this is far from the only 4:3 series with a 16:9 intro to make the intro 'more cinematic' even if the show itself is not.  It was a trope for a while in the late 1990s and early 2000s.  Would some kind of 'multi sample' option be possible?  As in say take 4-5 samples through the run time, and only go with the 'majority' result?  Pretty sure that's how handbrake's autocrop works.
Reply
Are you using the latest version of the add on with the multi aspect ratio support?

I tried season 1 episode 1 of red dwarf and the add on correctly detected the multiple aspect ratio, it then kept refreshing the zoom every 5 seconds.

That feature requires internet and sufficient video metadata to perform a search on imdb.

If it still does not work for you then try the episode again and include logs, I'll check it out.
Reply
(2024-02-28, 03:46)archegon Wrote: Are you using the latest version of the add on with the multi aspect ratio support?

I tried season 1 episode 1 of red dwarf and the add on correctly detected the multiple aspect ratio, it then kept refreshing the zoom every 5 seconds.

I'll get a log when I can but I found the 'refresh' function didn't do anything, it stuck with the original zoom.  I'll test a bit.

That said, Red Dwarf s1 won't work as the opening is also 4:3.  Seasons 1-4 all have 4:3 openings with no 'faked' letter boxes.  Season 5-6 do have faked letter boxes on their opening however they're also RED letter boxes so that's still just 'image'.  But Season 7 is when it starts with black letter boxing in the opening sequence and season 7 is where I'm having the issue.
Reply
I am using the latest version on Kodi 21 and my device is FireTV Cube 3rs gen.  It doesn't have any effect whatsoever and tried several versions and nothing seems to work. 

Btw, as others have mentioned, it works fine on Windows 11.

How do I configure a key to launch Zoom?  I am using Kore app on the windows subsystem for Android. I can navigate using Kore but not sure how to send a command or assign a key to zoom.  Any ideas?
Reply
For the addon to work on Android, you have to enable the Android & Embedded Systems Workaround from the addon settings

To configure a key that toggles zoom, just create a custom keymap with this:
Code:
<key>RunScript(script.black.bars.never,toggle)</key>
Reply
Thank you for the pointer. I enabled Android workaround and the Kodi 21 (latest nightly) on my FireTV Cube doesn't trigger anything. I still see black bars. On windows, it works fine.  Anything else to try?  There is ONLY one setting for Android or is there something else?

The keymap you showed, how do I trigger from a windows machine?  I use Kore android app on my Windows (WSA).

Btw, when the video is playing with the black bars, I go to the addon (v1.0.22) and hit Toggle Status but don't see message that flash on TV.  I guess it's not triggering anything. I looked the kodi.log and saw some errors related to the addon.

Last few lines of the log:

Code:
2024-07-07 20:03:15.753 T:32615   error <general>: BlackBarsNever: Error occurred: IMDB ID not found from search.
2024-07-07 20:03:15.753 T:32615    info <general>: BlackBarsNever: Video Player Dimensions: 3840x2157
2024-07-07 20:03:15.753 T:32615   error <general>: BlackBarsNever: Unable to get aspect ratios online.
2024-07-07 20:03:15.753 T:32615    info <general>: BlackBarsNever: Video Player Dimensions: 3840x2157
2024-07-07 20:03:15.753 T:32615    info <general>: BlackBarsNever: Video Resolution: 1920x1080, Video Player Aspect Ratio: 1.78, Image Dimensions: 854x480
2024-07-07 20:03:15.754 T:32615   error <general>: CRenderManager::Capture - unknown capture id: 0
2024-07-07 20:03:15.754 T:32615    info <general>: BlackBarsNever: Non-Black pixels Percentage: 0.0
2024-07-07 20:03:15.754 T:32615    info <general>: BlackBarsNever: Frame is too dark. Attempt 1 of 36. Waiting to retry...
2024-07-07 20:03:20.754 T:32615   error <general>: CRenderManager::Capture - unknown capture id: 0
2024-07-07 20:03:20.754 T:32615    info <general>: BlackBarsNever: Non-Black pixels Percentage: 0.0
2024-07-07 20:03:20.754 T:32615    info <general>: BlackBarsNever: Frame is too dark. Attempt 2 of 36. Waiting to retry...
2024-07-07 20:03:24.202 T:32455    info <general>: CVideoPlayer::CloseFile()
2024-07-07 20:03:24.205 T:32455    info <general>: VideoPlayer: waiting for threads to exit
2024-07-07 20:03:24.212 T:505      info <general>: CVideoPlayer::OnExit()
2024-07-07 20:03:24.213 T:505      info <general>: Closing stream player 1
2024-07-07 20:03:24.213 T:505      info <general>: Waiting for audio thread to exit
2024-07-07 20:03:24.230 T:536      info <general>: thread end: CVideoPlayerAudio::OnExit()
2024-07-07 20:03:24.230 T:505      info <general>: Closing audio device
2024-07-07 20:03:24.262 T:505      info <general>: Deleting audio codec
2024-07-07 20:03:24.266 T:505      info <general>: Closing stream player 2
2024-07-07 20:03:24.266 T:505      info <general>: waiting for video thread to exit
2024-07-07 20:03:24.311 T:535   warning <general>: OutputPicture - timeout waiting for buffer
2024-07-07 20:03:24.311 T:535      info <general>: thread end: video_thread
2024-07-07 20:03:24.312 T:505      info <general>: deleting video codec
2024-07-07 20:03:24.821 T:32455    info <general>: VideoPlayer: finished waiting
2024-07-07 20:03:24.821 T:32455    info <general>: CVideoPlayer::CloseFile()
2024-07-07 20:03:24.822 T:32455    info <general>: VideoPlayer: waiting for threads to exit
2024-07-07 20:03:24.822 T:32455    info <general>: VideoPlayer: finished waiting
2024-07-07 20:03:25.754 T:32615    info <general>: BlackBarsNever: Non-Black pixels Percentage: 0.0
2024-07-07 20:03:25.755 T:32615    info <general>: BlackBarsNever: Frame is too dark. Attempt 3 of 36. Waiting to retry...
2024-07-07 20:03:28.705 T:32455    info <general>: VideoPlayer::OpenFile: smb://192.168.192.23/Videos/Natpuna Ennanu Theriyuma1080p.mp4
2024-07-07 20:03:28.706 T:3145     info <general>: Creating InputStream
2024-07-07 20:03:28.875 T:3145     info <general>: Creating Demuxer
2024-07-07 20:03:30.239 T:3145     info <general>: Opening stream: 0 source: 256
2024-07-07 20:03:30.239 T:3145     info <general>: Creating video codec with codec id: 27
2024-07-07 20:03:30.240 T:3145     info <general>: CBitstreamConverter::Open bitstream to annexb init
2024-07-07 20:03:30.243 T:3145     info <general>: CDVDVideoCodecAndroidMediaCodec::Open Testing codec: OMX.amlogic.audio.decoder.ac3
2024-07-07 20:03:30.243 T:3145     info <general>: CDVDVideoCodecAndroidMediaCodec::Open Testing codec: OMX.amlogic.audio.decoder.ac4
2024-07-07 20:03:30.244 T:3145     info <general>: CDVDVideoCodecAndroidMediaCodec::Open Testing codec: OMX.amlogic.audio.decoder.eac3
2024-07-07 20:03:30.244 T:3145     info <general>: CDVDVideoCodecAndroidMediaCodec::Open Testing codec: OMX.amlogic.av1.decoder.awesome
2024-07-07 20:03:30.244 T:3145     info <general>: CDVDVideoCodecAndroidMediaCodec::Open Testing codec: OMX.amlogic.avc.decoder.awesome
2024-07-07 20:03:30.351 T:3145     info <general>: CDVDVideoCodecAndroidMediaCodec::Open Using codec: OMX.amlogic.avc.decoder.awesome
2024-07-07 20:03:30.351 T:3145     info <general>: Creating video thread
2024-07-07 20:03:30.352 T:3158     info <general>: running thread: video_thread
2024-07-07 20:03:30.352 T:3145     info <general>: Opening stream: 1 source: 256
2024-07-07 20:03:30.353 T:3145     info <general>: Finding audio codec for: 86018
2024-07-07 20:03:30.353 T:3145     info <general>: CDVDAudioCodecAndroidMediaCodec::Open() Use default handling for non encrypted stream
2024-07-07 20:03:30.354 T:3145     info <general>: CDVDAudioCodecFFmpeg::Open() Successful opened audio decoder aac
2024-07-07 20:03:30.354 T:3145     info <general>: OpenStream: Allowing max Out-Of-Sync Value of 80 ms
2024-07-07 20:03:30.354 T:3145     info <general>: Creating audio thread
2024-07-07 20:03:30.355 T:3159     info <general>: running thread: CVideoPlayerAudio:Tonguerocess()
2024-07-07 20:03:30.423 T:3159     info <general>: Creating audio stream (codec id: 86018, channels: 2, sample rate: 44100, no pass-through)
2024-07-07 20:03:30.470 T:32482    info <general>: CActiveAESink::OpenSink - initialize sink
2024-07-07 20:03:30.490 T:32482    info <general>: Trying to open: samplerate: 44100, channelMask: 12, encoding: 4
2024-07-07 20:03:30.496 T:32482    info <general>: Minimum size we need for stream: 22640 Bytes
2024-07-07 20:03:30.496 T:32482    info <general>: Audiotrack buffer params are: period time = 32.086 ms, period size = 11320 bytes, num periods = 4
2024-07-07 20:03:30.496 T:32482    info <general>: Created Audiotrackbuffer with playing time of 128.344671 ms min buffer size: 45280 bytes
2024-07-07 20:03:30.565 T:32455    info <general>: Instancing CRendererMediaCodecSurface
2024-07-07 20:03:30.565 T:32455    info <general>: CRendererMediaCodecSurface::Configure
2024-07-07 20:03:30.576 T:32482    info <general>: CAESinkAUDIOTRACK::Initializing with: m_sampleRate: 44100 format: AE_FMT_FLOAT (AE) method: PCM stream-type: PCM-STREAM min_buffer_size: 45280 m_frames: 1415 m_frameSize: 8 channels: 2
2024-07-07 20:03:30.755 T:32615   error <general>: CRenderManager::Capture - unknown capture id: 0
2024-07-07 20:03:30.755 T:32615    info <general>: BlackBarsNever: Non-Black pixels Percentage: 0.0
2024-07-07 20:03:30.755 T:32615    info <general>: BlackBarsNever: Frame is too dark. Attempt 4 of 36. Waiting to retry...
2024-07-07 20:03:35.755 T:32615   error <general>: CRenderManager::Capture - unknown capture id: 0
2024-07-07 20:03:35.756 T:32615    info <general>: BlackBarsNever: Non-Black pixels Percentage: 0.0
2024-07-07 20:03:35.756 T:32615    info <general>: BlackBarsNever: Frame is too dark. Attempt 5 of 36. Waiting to retry...
2024-07-07 20:03:40.756 T:32615   error <general>: CRenderManager::Capture - unknown capture id: 0
2024-07-07 20:03:40.756 T:32615    info <general>: BlackBarsNever: Non-Black pixels Percentage: 0.0
2024-07-07 20:03:40.756 T:32615    info <general>: BlackBarsNever: Frame is too dark. Attempt 6 of 36. Waiting to retry...
2024-07-07 20:03:45.757 T:32615   error <general>: CRenderManager::Capture - unknown capture id: 0
2024-07-07 20:03:45.757 T:32615    info <general>: BlackBarsNever: Non-Black pixels Percentage: 0.0
2024-07-07 20:03:45.761 T:32615    info <general>: BlackBarsNever: Frame is too dark. Attempt 7 of 36. Waiting to retry...
Reply
Quote:I enabled Android workaround and the Kodi 21 (latest nightly) on my FireTV Cube doesn't trigger anything
You have installed a fork of my addon that does not have Android Workaround. For the Android workaround to work, install my addon from here https://github.com/osumoclement/script.black.bars.never
Quote:The keymap you showed, how do I trigger from a windows machine?  I use Kore android app on my Windows (WSA)
Read this page. You would have to create an xml file containing this:
Code:

<?xml version="1.0"?>
<keymap>
  <FullscreenVideo>
    <keyboard>
      <key id="xxx">RunScript(script.black.bars.never,toggle)</key>
    </keyboard>
  </FullscreenVideo>
</keymap>

xxx is the key id you prefer, which you can find by reading this
Reply
(2024-07-08, 15:57)osumoclement Wrote: You have installed a fork of my addon that does not have Android Workaround. For the Android workaround to work, install my addon from here https://github.com/osumoclement/script.black.bars.never

Yes, I installed your version first (v1.0.10) and enabled the Android workaround and didn't work. Also, tried several version of yours from 1.0.3 and nothing seems to work.

Then, I tried the fork from @archegon and that doesn't work either on FireTV Cube Gen 3, fwiw.
Reply
Okay, post the debug log from my addon
Reply
(2024-07-08, 19:26)osumoclement Wrote: Okay, post the debug log from my addon

Here you go as this has the error and the last few lines of kodi.log:
Code:
2024-07-08 12:58:46.632 T:30698    info <general>: CAESinkAUDIOTRACK::Initializing with: m_sampleRate: 44100 format: AE_FMT_FLOAT (AE) method: PCM stream-type: PCM-STREAM min_buffer_size: 45280 m_frames: 1415 m_frameSize: 8 channels: 2
2024-07-08 12:58:46.659 T:30670    info <general>: Loading skin file: VideoFullScreen.xml, load type: KEEP_IN_MEMORY
2024-07-08 12:58:51.100 T:31314   error <general>: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
    - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
   Error Type: <class 'AttributeError'>
   Error Contents: 'NoneType' object has no attribute 'find_all'
   Traceback (most recent call last):
     File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.black.bars.never/addon.py", line 35, in onAVStarted
       self.abolishBlackBars()
     File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.black.bars.never/addon.py", line 141, in abolishBlackBars
       original_aspect_ratio = getOriginalAspectRatio(title, imdb_number=imdb_number)
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.black.bars.never/imdb.py", line 60, in getOriginalAspectRatio
       aspect_ratio_li = soup.select_one("#aspectratio").find_all("li")
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   AttributeError: 'NoneType' object has no attribute 'find_all'
   -->End of Python script error report<--
   
2024-07-08 12:59:22.238 T:31832   error <general>: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
    - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
   Error Type: <class 'AttributeError'>
   Error Contents: 'NoneType' object has no attribute 'find_all'
   Traceback (most recent call last):
     File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.black.bars.never/addon.py", line 213, in <module>
       p = Player()
           ^^^^^^^^
     File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.black.bars.never/addon.py", line 31, in __init__
       self.abolishBlackBars()
     File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.black.bars.never/addon.py", line 141, in abolishBlackBars
       original_aspect_ratio = getOriginalAspectRatio(title, imdb_number=imdb_number)
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.black.bars.never/imdb.py", line 60, in getOriginalAspectRatio
       aspect_ratio_li = soup.select_one("#aspectratio").find_all("li")
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   AttributeError: 'NoneType' object has no attribute 'find_all'
   -->End of Python script error report<--
                                                   
2024-07-08 12:59:32.169 T:30670    info <general>: CVideoPlayer::CloseFile()
2024-07-08 12:59:32.169 T:30670    info <general>: VideoPlayer: waiting for threads to exit
Reply
Okay, is the media you tried on already imported into Kodi (in such a way that Kodi has metadata i.e Movie/Episode title and IMDB ID)? Is it a movie or a TV show?
Reply
(2024-07-08, 20:37)osumoclement Wrote: Okay, is the media you tried on already imported into Kodi (in such a way that Kodi has metadata i.e Movie/Episode title and IMDB ID)? Is it a movie or a TV show?

It is a movie and it hasn't been imported into Kodi.  It's a foreign movie and don't think IMDB has any info on it.

The movie file is in a NAS and I navigate to the directory and play the file.  It works fine on Windows, btw.
Reply
I see. Android Workaround method needs the media to have an IMDB entry, so that's why it's not working. Also, it would probably not have worked either if you played directly by navigating to directory (media needs to have been imported first to KODI so it can find an IMDB Id). On Windows, the addon uses a different approach, it analyzes video frames to figure out what's the aspect ratio. Meaning it can detect the proper aspect ratio on any file, even one you just shot on your own camera. Android lacks this ability due to technical limitations, that's why I came up with the Android Workaround to help a bit.
Reply
(2024-07-08, 21:08)osumoclement Wrote: Android lacks this ability due to technical limitations, that's why I came up with the Android Workaround to help a bit.

Bummer!  I watch movies ONLY on Android and I guess I will have to live with what we have now... couple of clicks to get to the zoom settings and set it manually. 

I would think that Android will have more features than Windows to set something like this easily.

Btw, is there a way to get to the in-built zoom settings from a keyboard shortcut and that will make it a little bit easier to set it manually?
Reply
  • 1
  • 7
  • 8
  • 9(current)
  • 10
  • 11

Logout Mark Read Team Forum Stats Members Help
I have created an addon to remove all black bars, including hard coded0