Kodi Community Forum
Release script.ambibox for ambient lighting [Windows Only] - 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: Service Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=152)
+---- Thread: Release script.ambibox for ambient lighting [Windows Only] (/showthread.php?tid=198173)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13


RE: script.ambibox for ambient lighting [Windows Only] - Halonkira - 2016-01-15

Hi! I´m new in the forum. I´ve been using this addon for weeks, and I noticed that when I play a 3D video (even playing the video on 2D mode), the leds of up and down doesn´t react, only the leds on the sides change its color.
I read the logs, and plugin detects an incorrect aspect ratio, because the file has the black bars as part of the video, so plugin detects an aspect ratio of 16:9, when the correct is "2.40".

I´ve tried to write a segment of code that calculates the correct aspect ratio in that case, with a small ratio of error in that case, but I can´t figure out how I must modify the existent code to capture the frames correctly to make all leds work with the correct aspect ratio.

If it´s possible, I want to contribute to the development of the plugin, if I can help on it.


RE: script.ambibox for ambient lighting [Windows Only] - Myonic - 2016-02-25

Hi, new too. Just upgraded my Kodi to version 16 and now... Ambibox (Kodi Direct) broke; as in, it functions, but just a few seconds, then the leds freeze, then a few moments later it works again, freezes, etc. etc.

It's not low fps (the ambibox program shows 20+ fps).
I've removed the entire Ambibox add-on in Kodi and added it again. Did not work.
Played with some settings in Ambibox itself, does not work.
Dis- and reconnected the Arduino Uno, to no avail...

Anyone got any ideas?


RE: script.ambibox for ambient lighting [Windows Only] - KenV99 - 2016-02-26

No log = no help


RE: script.ambibox for ambient lighting [Windows Only] - KenV99 - 2016-02-26

(2016-01-15, 20:15)Halonkira Wrote: Hi! I´m new in the forum. I´ve been using this addon for weeks, and I noticed that when I play a 3D video (even playing the video on 2D mode), the leds of up and down doesn´t react, only the leds on the sides change its color.
I read the logs, and plugin detects an incorrect aspect ratio, because the file has the black bars as part of the video, so plugin detects an aspect ratio of 16:9, when the correct is "2.40".

I´ve tried to write a segment of code that calculates the correct aspect ratio in that case, with a small ratio of error in that case, but I can´t figure out how I must modify the existent code to capture the frames correctly to make all leds work with the correct aspect ratio.

If it´s possible, I want to contribute to the development of the plugin, if I can help on it.

If the black bars are part of the video, then there is no getting around this. In direct mode, the addon gets the video frames in real time from Kodi's frame buffer, so the black bars are part of each frame..
I've tried, believe me to write routines to crop out that part of the video in python. Since python is interpreted and this requires matrix manipulations, it is too slow to do this 30x a second.
It could possibly be done with a compiled C++ routine that directly accesses the memory where the frame is stored, but compiled code is not allowed in the official repo, so there are no plans to do this.

The frame is copied into shared memory on line 1245 which in turn calls the routine at 1370-1400. The actual guts of the memory copy stars at 1411.
You can see that this has been optimized as much as possible by using Ctypes calls for the actual memory transfer.
Prior to this call you would need to copy over the portions of the image into a different memory address, removing the black bars and then pass this other address to the Ctypes call.
This could be accomplished with a cpp bitblt call.
You would also need to plan ahead for the fact that this buffer size would be smaller by changing the numbers passed in the routine at 1370-1400.
The ambibox executable access this shared memory.

More power to you if you want to try to tackle this by compiling some cpp code and then using something like swig to call it from python.

Or take the easy way out and crop your videos.


RE: script.ambibox for ambient lighting [Windows Only] - sualfred - 2016-02-27

@KenV99

Could you add an option to keep the LEDs alive while the screensaver is active? Currently it's going to be disabled as soon as the screensaver starts


RE: script.ambibox for ambient lighting [Windows Only] - jrd3d - 2016-03-23

ambibox not launching and/or crashing when I launch Kodi 16

kodi log:
http://pastebin.com/BTNXTrHd

ambobix addon settings:
http://pastebin.com/qD5wS1KX

Thank you in advance for your help!

hardware info:
Core i5
EVGA nvidia GTX 780
16GB DDR3 RAM

this worked great for over a year on my previous Windows 10 install but I recently upgraded to a larger hard drive/SSD and did a clean install of Windows 10 along with the latest version of Kodi and now the ambibox kodi addon won't launch at all or it crashes with the typical error message stating to check the log. Please let me know any suggestions as I love this addon!


RE: script.ambibox for ambient lighting [Windows Only] - KenV99 - 2016-03-23

(2016-03-23, 06:05)jrd3d Wrote: ambibox not launching and/or crashing when I launch Kodi 16

kodi log:
http://pastebin.com/BTNXTrHd

ambobix addon settings:
http://pastebin.com/qD5wS1KX

Thank you in advance for your help!

hardware info:
Core i5
EVGA nvidia GTX 780
16GB DDR3 RAM

this worked great for over a year on my previous Windows 10 install but I recently upgraded to a larger hard drive/SSD and did a clean install of Windows 10 along with the latest version of Kodi and now the ambibox kodi addon won't launch at all or it crashes with the typical error message stating to check the log. Please let me know any suggestions as I love this addon!

This looks most likely that there is an issue on the ambibox executable's side. Can you check the logs there and that it is working correctly.


RE: script.ambibox for ambient lighting [Windows Only] - jrd3d - 2016-03-23

I will check it when I get home. Do you think it is because I imported the settings that I backed up on my old Windows install? If I need to flush them out and reinstall Ambibox and setup the profiles from scratch again I will. That is the only thing that I can think of.


RE: script.ambibox for ambient lighting [Windows Only] - KenV99 - 2016-03-23

(2016-03-23, 16:38)jrd3d Wrote: I will check it when I get home. Do you think it is because I imported the settings that I backed up on my old Windows install? If I need to flush them out and reinstall Ambibox and setup the profiles from scratch again I will. That is the only thing that I can think of.

Under the 'Additional settings' tab, ensure that the checkbox next to 'Turn On/Off API server' is checked and that you have a green dot and that it is set to Port 3636.
Also ensure that you do not have any other conflicting server trying to run on that port.


RE: script.ambibox for ambient lighting [Windows Only] - KenV99 - 2016-03-23

(2016-02-27, 15:24)sualfred Wrote: @KenV99

Could you add an option to keep the LEDs alive while the screensaver is active? Currently it's going to be disabled as soon as the screensaver starts

On the very first page of settings there is a setting for this already. Is it not working for you?


RE: script.ambibox for ambient lighting [Windows Only] - jrd3d - 2016-03-24

Thanks @KenV99, it works beautifully now!
The funny thing is that it wasn't working when I was running version 1.0.6 with the API server turned on and it crashed immediately. So I figured I would turn off the API to see if that made a difference and I also downloaded version 1.0.82 and it still didn't work. After turning the API back 'on' on version 1.0.82 then it worked like it use to on my old Windows install. I shouldn't have introduced 2 variables at the same time during my trouble shooting.


RE: script.ambibox for ambient lighting [Windows Only] - sualfred - 2016-03-25

(2016-03-23, 17:00)KenV99 Wrote:
(2016-02-27, 15:24)sualfred Wrote: @KenV99

Could you add an option to keep the LEDs alive while the screensaver is active? Currently it's going to be disabled as soon as the screensaver starts

On the very first page of settings there is a setting for this already. Is it not working for you?

Stupid me..... Tongue Simply overlooked it. Thx.


RE: script.ambibox for ambient lighting [Windows Only] - Potzo - 2016-03-25

I am on jarvis and this is the error I get when I try installing this:
Code:
21:59:29 T:2696   ERROR: Texture manager unable to load image from memory
21:59:31 T:3728   ERROR: Previous line repeats 3 times.
21:59:31 T:3728   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.ImportError'>
                                            Error Contents: No module named xbmcsim
                                            Traceback (most recent call last):
                                              File "C:\Users\potzo\AppData\Roaming\Kodi\addons\script.ambibox-master\default.py", line 36, in <module>
                                                import xbmcsim as xbmc
                                            ImportError: No module named xbmcsim
                                            -->End of Python script error report<--



RE: script.ambibox for ambient lighting [Windows Only] - dragostino - 2016-05-23

Hi all, does anyone know if it is possible to change the code of the plugin so that leds are on in evvening/night and off during the day?
I've seen in other plugins for ambilight the possibility of specify the hours of the day when leds are on...
Thanks


RE: script.ambibox for ambient lighting [Windows Only] - HansDampfHH - 2016-05-28

Hey, after i upgrade my Kodi from 15 to 16.1 everything seems fine until i notice that i have dropped/skipped frames when i watch TV.
If i disable AmbiBox everything is perfect, if i enable AmbiBox i get back the lost frames.

Any hints what i can do?
I use Kodi 15 for a long time now with my Windows machine and AmbiBox.
Perfect solution until now. I hope i can solve this problem because it is time to update my Kodi.

Here is the Kodi-log: http://pastebin.com/9qTsJfHi
Need more input?