•   
  • 1
  • 54
  • 55
  • 56(current)
  • 57
  • 58
  • 106
  •   
[RELEASE] Official XBMC boblight Addon
Thats true.

What about a text field in the Settings for filename OU and SBS

Code:
currentPlayingFile = xbmc.Player().getPlayingFile()
            if re.search(r'OU', currentPlayingFile, re.I):
                boblight to OU mode
                
            if re.search(r'SBS', currentPlayingFile, re.I):
                boblight to SBS mode
Reply
Hello,
I added a new Option for automatic 3D-Mode, which checks the file/folder name of the current movie.
If "3D" or "SBS" exist in the name, the sbs-mode get used. If "OU" exist in the name, the top/bottom-mode get used.

If you copy all 3D movies to a folder with "3D" in name (e.g. "3D movies"), the 3D-boblight mode get automatically enabled for these movies.

Here is the current patch:
Code:
diff -u -r script.xbmc.boblight-master/script.xbmc.boblight/default.py script.xbmc.boblight/default.py
--- script.xbmc.boblight-master/script.xbmc.boblight/default.py    2013-04-25 10:37:00.000000000 +0200
+++ script.xbmc.boblight/default.py    2013-05-21 13:27:49.153902897 +0200
@@ -168,7 +168,7 @@
       else:
         ret = "musicvideo"
   settings.handleCategory(ret)
-
+  settings.handle3Dmode()

def run_boblight():
   main = Main()
@@ -189,14 +189,22 @@
         if not settings.staticBobActive:
           capture.waitForCaptureStateChangeEvent(1000)
           if capture.getCaptureState() == xbmc.CAPTURE_STATE_DONE and player_monitor.isPlaying():
-            width = capture.getWidth();
-            height = capture.getHeight();
+            widthori = capture.getWidth();
+            heightori = capture.getHeight();
+        if settings.bob3Dmode == 1: # sbs
+              widthused = widthori / 2
+            else:
+              widthused = widthori
+        if settings.bob3Dmode == 2: # top/bottom
+              heightused = heightori / 2
+            else:
+              heightused = heightori
             pixels = capture.getImage();
-            bob.bob_setscanrange(width, height)
+            bob.bob_setscanrange(widthused, heightused)
             rgb = (c_int * 3)()
-            for y in range(height):
-              row = width * y * 4
-              for x in range(width):
+            for y in range(heightused):
+              row = widthori * y * 4
+              for x in range(widthused):
                 rgb[0] = pixels[row + x * 4 + 2]
                 rgb[1] = pixels[row + x * 4 + 1]
                 rgb[2] = pixels[row + x * 4]
diff -u -r script.xbmc.boblight-master/script.xbmc.boblight/resources/language/English/strings.xml script.xbmc.boblight/resources/language/English/strings.xml
--- script.xbmc.boblight-master/script.xbmc.boblight/resources/language/English/strings.xml    2013-04-25 10:37:00.000000000 +0200
+++ script.xbmc.boblight/resources/language/English/strings.xml    2013-05-21 14:16:11.141037102 +0200
@@ -12,6 +12,7 @@
   <string id="104">Disable boblight</string>
   <string id="105">Override used category</string>
   <string id="106">Category</string>
+  <string id="107">3D Mode</string>

   <!--Movie/MusicVideo/Other-->
   <string id="200">Movie</string>
@@ -26,6 +27,12 @@
   <string id="220">Custom</string>
   <string id="221">Slow</string>
   <string id="222">Fast</string>
+
+  <!--3D-->
+  <string id="230">Off</string>
+  <string id="231">SideBySide</string>
+  <string id="232">Top/Bottom</string>
+  <string id="233">Automatic (File name)</string>
  
   <!--MusicVideo-->
   <string id="300">Musicvideo</string>
diff -u -r script.xbmc.boblight-master/script.xbmc.boblight/resources/language/German/strings.xml script.xbmc.boblight/resources/language/German/strings.xml
--- script.xbmc.boblight-master/script.xbmc.boblight/resources/language/German/strings.xml    2013-04-25 10:37:00.000000000 +0200
+++ script.xbmc.boblight/resources/language/German/strings.xml    2013-05-21 13:10:13.291120202 +0200
@@ -12,6 +12,7 @@
   <string id="104">Boblight ausschalten</string>
   <string id="105">Erzwinge Kategorie</string>                                                                                                                                                              
   <string id="106">Kategorie</string>
+  <string id="107">3D Modus</string>

   <!--Movie/MusicVideo/Other-->
   <string id="200">Film</string>
@@ -26,6 +27,12 @@
   <string id="220">Eigene</string>
   <string id="221">langsam</string>
   <string id="222">schnell</string>
+
+  <!--3D-->
+  <string id="230">Aus</string>
+  <string id="231">SideBySide</string>
+  <string id="232">Top/Bottom</string>
+  <string id="233">Automatisch (Dateiname)</string>
  
   <!--MusicVideo-->
   <string id="300">Musikvideo</string>
Nur in script.xbmc.boblight/resources/lib: boblight.pyc.
diff -u -r script.xbmc.boblight-master/script.xbmc.boblight/resources/lib/settings.py script.xbmc.boblight/resources/lib/settings.py
--- script.xbmc.boblight-master/script.xbmc.boblight/resources/lib/settings.py    2013-04-25 10:37:00.000000000 +0200
+++ script.xbmc.boblight/resources/lib/settings.py    2013-05-21 13:38:38.829052919 +0200
@@ -19,6 +19,7 @@

import sys
import xbmc, xbmcgui
+import re

__scriptname__ = sys.modules[ "__main__" ].__scriptname__
__addon__      = sys.modules[ "__main__" ].__addon__
@@ -57,6 +58,8 @@
     self.networkaccess              = __addon__.getSetting("networkaccess") == "true"  
     self.overwrite_cat              = __addon__.getSetting("overwrite_cat") == "true"
     self.overwrite_cat_val          = int(__addon__.getSetting("overwrite_cat_val"))
+    self.bob3D                      = int(__addon__.getSetting("bob3D"))
+    self.bob3DMode                  = 0
     self.screensaver                = xbmc.getCondVisibility("System.ScreenSaverActive")
     self.bobdisable                 = __addon__.getSetting("bobdisable") == "true"
     self.current_option             = ""
@@ -181,6 +184,43 @@
     threshold     = 0.0
     return (saturation,value,speed,autospeed,interpolation,threshold)

+  #handle the fix settings for 3D mode
+  def detect3DmodeFix(self):
+    log('settings() - detect3DmodeFix (mode: %s)' % str(self.bob3D))
+    self.bob3Dmode=0 # no 3D
+    if self.bob3D == 1:
+      self.bob3Dmode=1 # sbs
+    if self.bob3D == 2:
+      self.bob3Dmode=2 # top/bottom
+
+  #handle the filename for 3D autodetection
+  def detect3DmodeFilename(self):
+    if xbmc.Player().isPlaying():
+      currentPlayingFile = xbmc.Player().getPlayingFile()
+    else:
+      currentPlayingFile = "not playing"
+    log('settings() - detect 3DmodeFilename (file: %s)' % currentPlayingFile)
+    self.bob3Dmode=0 # no 3D
+    if re.search(r'3D', currentPlayingFile, re.I):
+      self.bob3Dmode=1 # default for 3D = sbs
+    if re.search(r'OU', currentPlayingFile, re.I):
+      self.bob3Dmode=2 # top/bottom
+    if re.search(r'SBS', currentPlayingFile, re.I):
+      self.bob3Dmode=1 # sbs
+
+  # handle 3D mode
+  def handle3Dmode(self):
+    log('settings() - handle3Dmode')
+    if self.bob3D == 0:
+      self.detect3DmodeFix()
+    if self.bob3D == 1:
+      self.detect3DmodeFix()
+    if self.bob3D == 2:
+      self.detect3DmodeFix()
+    if self.bob3D == 3:
+      self.detect3DmodeFilename()
+    log('settings() - used mode: %s' % str(self.bob3Dmode))
+
   #handle all settings according to the static bg light
   #this is used until category "other" can do real boblight
   #when no video is rendered
Nur in script.xbmc.boblight/resources/lib: settings.pyc.
Nur in script.xbmc.boblight/resources/lib: tools.pyc.
diff -u -r script.xbmc.boblight-master/script.xbmc.boblight/resources/settings.xml script.xbmc.boblight/resources/settings.xml
--- script.xbmc.boblight-master/script.xbmc.boblight/resources/settings.xml    2013-04-25 10:37:00.000000000 +0200
+++ script.xbmc.boblight/resources/settings.xml    2013-05-21 13:09:52.864907073 +0200
@@ -9,6 +9,8 @@
     <setting id="hostport" type="number" subsetting="true" enable="eq(-2,true)" label="103" default="19333" />
     <setting id="sep2" type="sep" />
     <setting id="bobdisable" type="bool" label="104" default="false" />
+    <setting id="sep4" type="sep" />
+    <setting id="bob3D" type="enum" subsettings="true" label="107" default="0" lvalues="230|231|232|233" />
   </category>
   <category label="200">
     <setting id="movie_preset" type="enum" label="201" default="1" lvalues="220|221|222" />

Kind regards,
Uwe Heinritz.
Reply
Could you check the patch again or upload the patched files?

I get an error in line 10.
Reply
Hello,
I applied the patch against the current source code (loaded from git). I got no errors during patch.
Maybe the formating is wrong after copy/paste the diff to the forum.
Could I upload the diff-file to the Forum? I could not find any attach/upload button.

Uwe.
Reply
I think you would have to use a hoster for the files. I'm trying again later on my Linux machine.
Reply
Hello,
I uploaded the file here:
boblight3d_2.diff

Uwe
Reply
Nvm I wait for something similar in the master.

Thanks for the work.
Reply
Hello friends.
I am Enrique from Spain.
I have installed the boblight addon, with the arduino Uno and Adalight.
This is my setup.
Pioneer KRP-500A 50" with 98 leds and using the 5v 25A of the power supply of HTPC.
34 leds top
17 leds left
17 leds right
34 leds bottom

Some pics:



Image

Image

Image

Image

Image



And videos:













But I have a problem with the black bars in the movies at top and botton of the TV.
I don't understand why in some movies with black bars in top and botton , the led's are OFF , and in another movies the LEDS are ON.( both movies with black bars)
can any explain me?

There are some movies, as The hobbit , Wall-E and anothers, that are the LEDS OFF in the top at bottom.
is there any solution?

I have seen in the 56 or 57 page that Memphiz recommend to increase the vscan. It is ok?
This is my boblight conf.
can any help me pleaseHuh

Do I need to change the lines

vscan 0 5.88

and


vscan 94.12 100

for 0-20 and 80-100 or what?


Please sorry for my limited english.
Reply
@calibra3
Try playing with the vscan values for top + and bottom - and increase and decrease them with 10 (at least that's what i did) and eventually ended up with +/- 11
Also take the leds on the corners and leave the leds on the sides untouched.

Example:
Top Led
Code:
Before:
[light]
name            20
color           red     ambilight 58
color           green   ambilight 59
color           blue    ambilight 60
hscan           20 25
vscan           0 8.33

After:
[light]
name            20
color           red     ambilight 58
color           green   ambilight 59
color           blue    ambilight 60
hscan           20 25
vscan           0 19.33

Bottom Led
Code:
Before:
[light]
name            50
color           red     ambilight 148
color           green   ambilight 149
color           blue    ambilight 150
hscan           75 80
vscan           80.67 100

After:
[light]
name            50
color           red     ambilight 148
color           green   ambilight 149
color           blue    ambilight 150
hscan           75 80
vscan           91.67 100

Now i have a question for you Tongue
How did you made the frame for your leds?
What material did you use etc
Reply
i use same type of frame Big Grin
Image
Reply
@calibra3
Can you get that darn configuration of the forum? Use pastebin.com for that
It's killing tablet users!
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
Check the resolution of the movies.

Some movies use the full 1080 pixels with blackbars instead of 800pixel for example.

If thats the case there is not much you can do other than using two different config files I think.


I have to say I like how the light looks with the LEDs mounted pointing to the Wall.
Reply
Thanks Teko.
Then I try to modify the boblight.conf and play with the variable vscan.......

This weekend I will do some videos with this problem of black bars with two movies that have this bars and one of them the four side are with the leds on, and another only the vertical sides.

the frame is this, with size 20mm x 35mm and the leds are ws2801 square flat version ( not bullet)
Image

the boblight.conf in pastebin.

http://pastebin.com/gecHye04
Reply
(2013-05-23, 13:22)calibra3 Wrote: Thanks Teko.
Then I try to modify the boblight.conf and play with the variable vscan.......

This weekend I will do some videos with this problem of black bars with two movies that have this bars and one of them the four side are with the leds on, and another only the vertical sides.

the frame is this, with size 20mm x 35mm and the leds are ws2801 square flat version ( not bullet)
Image

the boblight.conf in pastebin.

http://pastebin.com/gecHye04

He meant you should delete the configuration from your old post because in the mobile version there is no scrollbar for the code, so it's just one giant post.
Reply
Ok Teko.
I have modified my post.
Reply
  •   
  • 1
  • 54
  • 55
  • 56(current)
  • 57
  • 58
  • 106
  •   



Logout Mark Read Team Forum Stats Members Help
[RELEASE] Official XBMC boblight Addon3
This forum uses Lukasz Tkacz MyBB addons.