Kodi Community Forum

Full Version: script.ambibox for ambient lighting [Windows Only]
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13
(2016-07-27, 21:21)popy Wrote: [ -> ]Have you tried the latest github version: https://github.com/AmbiBox/AmbiBox-XBMC/...master.zip

That's version 1.0.7.1 and gives an errormessage:

22:05:07 T:9308 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\Pascal\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<--

I didn't have this error with 1.0.9. In 1.0.9 it's connected, but the lights stay dark.

Worked fine in Jarvis and older, and boblight still works with Krypton.
(2016-07-27, 18:56)TRiON Wrote: [ -> ]Tried with the 1.0.9.0 version on Krypton and older version.

Both the 1.0.9.0 version and the older version do not hang on my windows 10 pc. But direct capture is broken with both, have to use screen capture method of Ambilight.

However, boblight does work on wtih direct capture on Kodi Krypton, so seems to me the addon is broken, but i'm no expert.

Direct capture is working for me on a W10 and W7 PC using Krypton alpha 2 until the hang occurs.
As always, a log upload and a link is much more useful than telling me it's broken even if you are not an expert.
(2016-07-27, 22:26)TRiON Wrote: [ -> ]
(2016-07-27, 21:21)popy Wrote: [ -> ]Have you tried the latest github version: https://github.com/AmbiBox/AmbiBox-XBMC/...master.zip

That's version 1.0.7.1 and gives an errormessage:

22:05:07 T:9308 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\Pascal\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<--

I didn't have this error with 1.0.9. In 1.0.9 it's connected, but the lights stay dark.

Worked fine in Jarvis and older, and boblight still works with Krypton.

There's no way with the API changes that 1.0.7.1 will ever work with Krypton.
I pushed another update to GitHub that updates the method to obtain video info in Krypton.
(2016-07-24, 17:25)KenV99 Wrote: [ -> ]I pushed a revision that should be compatible with Krypton down to Gotham. https://github.com/AmbiBox/kodi.script.ambibox
However, the RenderCapture issue mentioned in post #114 has not been addressed by the Kodi developers up to the nightly build on 7/23/16.
So for the adventurous, try at your own risk. It is possible that on different hardware, this *might* not cause Kodi to hand. Only way to know is to try it.

There is nothing more that can be done on my end to address the issue at this time. Just waiting on the Kodi developers.

Thanks for the updates.
I have tried 1.0.9.0 (github version) but it does not work in my W10 machine with Kodi v17 (git 11.08).
Like the old versions, the script and ambibox communicating (profiles getting switched) but kodi direct doesnt grab video data (ambilight stays at the same color).

Here is a debug log on my google drive: https://drive.google.com/file/d/0B4JpRMZ...sp=sharing

Currently running GUI Capture mode which works flawlessly.

thx
pOpY
(2016-08-14, 18:23)popy Wrote: [ -> ]
(2016-07-24, 17:25)KenV99 Wrote: [ -> ]I pushed a revision that should be compatible with Krypton down to Gotham. https://github.com/AmbiBox/kodi.script.ambibox
However, the RenderCapture issue mentioned in post #114 has not been addressed by the Kodi developers up to the nightly build on 7/23/16.
So for the adventurous, try at your own risk. It is possible that on different hardware, this *might* not cause Kodi to hand. Only way to know is to try it.

There is nothing more that can be done on my end to address the issue at this time. Just waiting on the Kodi developers.

Thanks for the updates.
I have tried 1.0.9.0 (github version) but it does not work in my W10 machine with Kodi v17 (git 11.08).
Like the old versions, the script and ambibox communicating (profiles getting switched) but kodi direct doesnt grab video data (ambilight stays at the same color).

Here is a debug log on my google drive: https://drive.google.com/file/d/0B4JpRMZ...sp=sharing

Currently running GUI Capture mode which works flawlessly.

thx
pOpY

While playing a file, can you please open the Ambibox executable (from systray, 'Show') and check what it is reporting as the 'Capture Speed' while using KodiDirect?
I pushed yet another update that at least for now on Krypton is a test build.
Now if the capture system NEVER get a valid image from Kodi, your lights should be blue.
In the log you are going to notice a lot of missed frames. This is part of the Kodi issue that I've been mentioning in the previous posts.
You are definitely going to notice a drop in the smoothness of your lights.

Given the amount of time that has passed since I reported this issue to the Kodi developers and the lack of action on the bug ticket, I am becoming pessimistic that this will be fixed.
Jarvis may be the last working edition for KodiDirect on Ambibox.
How come that direct capture works with Boblight and Krypton? Shouldn't the capture code be the samen?
(2016-08-17, 00:21)TRiON Wrote: [ -> ]How come that direct capture works with Boblight and Krypton? Shouldn't the capture code be the samen?

As best as I can tell, it is because boblight captures a very small amount of screen data:
https://github.com/bobo1on1/script.xbmc....default.py
lines 42-43

In my post to the Kodi bug tracker, I noted that the smaller the requested frame, the longer it takes for the system to eventually hang.
You can try this yourself in Krypton with the ambibox addon - set the quality to highest and play a 1080p file vs quality set to low and see how long it takes for Kodi to hang.

Their 32x32 capture may be fine if you have that number or fewer LEDs on each side, but if you have more, then you are going to have repeated data sent to multiple LEDs.
Mine seems to have stopped working too, and I *think* it's the Win10 anniversary update. Rolling it back and it works fine. Unfortunately, it reinstalls itself. It works fine in test mode, but KodiDirect just produces static lights. I have got it working by putting Kodi into a full screen window, and then changing the capture method to one of the generic Windows methods. I did note that the AU enables the game recording mode, so thought that could be conflicting with the full screen capture method that Ambilight is using, but disabling that feature has made no difference.
Just to add. I've tried the new Kodi beta (well the nightly from Friday) and it works fine with the setup above. Also, the blacks look a lot better with the new video player.
Also tried the latest nightly and deleted and installed the latest version from github (had to rename kodi.script.ambibox-master to cript.ambibox-master to be able to install, both the file and the folder inside renamed)

But now it crashes Kodi imediatly, tried lowering settings, but still imediatly crashing.

Lot's of warnings saying: WARNING: CRenderCaptureDX: D3D11_QUERY_OCCLUSION not supported,

Here is the last part of the log file:

00:34:36 T:3008 NOTICE: ### [AmbiBox] - StereoMode: 2D
00:34:36 T:3008 NOTICE: ### [AmbiBox] - Switching to profile XBMC for XBMCDirect
00:34:36 T:3008 NOTICE: ### [AmbiBox] - Instellen profiel XBMC
00:34:37 T:3008 NOTICE: ### [AmbiBox] - XBMCDirect throttle = 5.0, qual = 0, captureX = 74, captureY = 42, thread = True, instr = True
00:34:37 T:3008 NOTICE: ### [AmbiBox] - Delay: 0.0 ms
00:34:37 T:3008 NOTICE: ### [AmbiBox] - XBMCDirect using threading
00:34:37 T:10812 NOTICE: ### [AmbiBox] - XBMCD_threaded run event
00:34:37 T:10812 NOTICE: ### [AmbiBox] - Initial video framerate reported as 50.0
00:34:37 T:10812 NOTICE: ### [AmbiBox] - Missed frame at 1
00:34:37 T:8524 NOTICE: Previous line repeats 2 times.
00:34:37 T:8524 NOTICE: Opening stream: 0 source: 256
00:34:37 T:8524 NOTICE: Creating video codec with codec id: 28
00:34:37 T:8524 NOTICE: CDVDVideoCodecFFmpeg::Open() Using codec: H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
00:34:37 T:8524 NOTICE: Opening stream: 1 source: 256
00:34:37 T:8524 NOTICE: Opening stream: 2 source: 256
00:34:37 T:10812 NOTICE: ### [AmbiBox] - Missed frame at 1
00:34:37 T:4700 NOTICE: Previous line repeats 1 times.
00:34:37 T:4700 NOTICE: Creating audio stream (codec id: 86019, channels: 6, sample rate: 48000, no pass-through)
00:34:37 T:10812 NOTICE: ### [AmbiBox] - Missed frame at 1
00:34:37 T:3708 NOTICE: Previous line repeats 6 times.
00:34:37 T:3708 WARNING: CRenderCaptureDX: D3D11_QUERY_OCCLUSION not supported, performance might suffer
00:34:37 T:10812 NOTICE: ### [AmbiBox] - XBMCDirect Capture successful @ counter=1
00:34:37 T:10812 NOTICE: ### [AmbiBox] - KodiDirect succes
00:34:37 T:3708 WARNING: CRenderCaptureDX: D3D11_QUERY_OCCLUSION not supported, performance might suffer
00:34:37 T:10812 NOTICE: ### [AmbiBox] - Missed frame at 2
00:34:37 T:3708 WARNING: CRenderCaptureDX: D3D11_QUERY_OCCLUSION not supported, performance might suffer
00:34:37 T:10812 NOTICE: ### [AmbiBox] - Missed frame at 2
00:34:37 T:3708 WARNING: CRenderCaptureDX: D3D11_QUERY_OCCLUSION not supported, performance might suffer
00:34:37 T:10812 NOTICE: ### [AmbiBox] - Missed frame at 2
00:34:37 T:3708 WARNING: CRenderCaptureDX: D3D11_QUERY_OCCLUSION not supported, performance might suffer
00:34:37 T:10812 NOTICE: ### [AmbiBox] - Missed frame at 2
00:34:37 T:3708 WARNING: CRenderCaptureDX: D3D11_QUERY_OCCLUSION not supported, performance might suffer
00:34:37 T:10812 NOTICE: ### [AmbiBox] - Missed frame at 2
00:34:37 T:3708 WARNING: CRenderCaptureDX: D3D11_QUERY_OCCLUSION not supported, performance might suffer
00:34:38 T:1840 WARNING: CRenderManager::WaitForBuffer - timeout waiting for buffer
00:34:41 T:1840 WARNING: Previous line repeats 2 times.
00:34:41 T:1840 NOTICE: CDVDVideoCodecFFmpeg::CDropControl: calculated diff time: 40000
00:34:47 T:4700 NOTICE: CVideoPlayerAudio:Tonguerocess - stream stalled
Using a separate script written specifically to test Kodi's frame rendering subroutines, I find that it takes longer for it to hang with the latest build.
Using a 960x400 pixel capture of a 30fps stream, it hangs on frame 3874.

That warning has been happening since alpha 1. I don't know why a QUERY_OCCLUSION call is needed at all. This is used for detecting when one layer obscures another in multilayer graphics. My assumption has always been that the 'tap' in the video buffer is prior to Kodi placing any controls or any other overlay on top of the video, but who knows.A similar error is generated on Linux systems, but it does not cause a hang and the the rendering systems works as expected.

So, it seems to me (as I stated in my original bug report to the Kodi devs) that there is an error in the Render request routine in Kodi on windows that is dependent on the frame size requested such that smaller frames take longer to cause the hang. This seems like a memory leak and dependent on one's own system (memory and or graphics memory), the leak continues until it grows large enough to cause the hang,

So with a low enough frame size, some systems may get through an entire video file without hanging, while others cannot.
I know you said that boblight captures only 32x32, but that still means about 128 leds witch is more than my 75 leds I have and it can play all day long without problems, is it possible to also do that also with ambibox, then at least we have a working solution with krypton until they fix it.

At the moment even at the lowest settings it instantly hangs on my system.
(2016-08-29, 18:14)TRiON Wrote: [ -> ]I know you said that boblight captures only 32x32, but that still means about 128 leds witch is more than my 75 leds I have and it can play all day long without problems, is it possible to also do that also with ambibox, then at least we have a working solution with krypton until they fix it.

At the moment even at the lowest settings it instantly hangs on my system.

OK. Latest github uses 32x32 as lowest.

But I have to ask, why not just use boblight?
In many ways, this is a dead project for me. The devs aren't interested in fixing this and I have long ago moved to using an RPi with hyperion and a frame capture device for my lights.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13