Search This Blog

Loading...

Monday, April 28, 2014

NFS And XBMC Gotham on Windows - replacement libnfs.dll

Ok, so there was a bit of a saga with libnfs and Windows leading up to the release of XBMC Gotham.  Major issues with libnfs meant that your entire library could get dropped by XBMC when running 'clean library' due to, basically, stale sockets.

You can read about it in painful detail in that thread, but suffice it to say eventually XBMC developer Memphiz and I found a fix.

It's really a two part fix - one part XBMC code, fixed in Gotham beta 4 and on, and one part a fix in libnfs itself.  The libnfs fix does not seem essential, and has not actually made it in to XBMC Gotham.

In theory, errors might just occasionally occur with XBMC (resulting in files being dropped from your library), when using specifically Windows and NFS, and to that end here is a replacement libnfs.dll that I personally recommend you but in your

C:\WHERE_YOU_PUT_IT\Gotham\XBMC\system

..folder.

Replacement libnfs.dll for XBMC Gotham on Windows


Sunday, February 23, 2014

XBMC, Windows, Boblight, and the Woodenshark USB Lightpack

For along time I've seen groovy videos of ambilight systems making people's TV's dance with colour.  You can see a video of the results of all that follows here: http://lightpack.tv/


(and maybe buy your own lightpack!).

The idea is that it's
  • Cool
  • Gives an illusion of your TV being bigger
  • Increases the apparent contrast of the actual screen
  • Reduces eye fatigue as a whole
Well, that's the theory but it's that first point that's the main thing!

Never seen it - there are plenty of youtube videos etc (search for ambilight which is the original Phillips branded system).

Most open source implementations of this futz around with arduinos or Raspberry Pis to control the lights,  and you can buy LED strinps and wire them up to pins etc.  Sounds like a lot of hassle to me, and a waste of machine - why bother with a Pi/arduino as a controller, it's just another device needing power etc, and it should be trivially easy to get a PC to control one of these things.

Then, Woodenshark did a successful Kickstarter project to bring an easy solution to this problem and the result is here: http://lightpack.tv/ - a USB based LED light strip system.  So, I ordered one (about AU $100).  One lightpack works well for TVs up to 50" but you can get more than one and run them together.

Now, the general idea is to drive this thing with some software called Prismatik - latest releases here: https://github.com/Atarity/Lightpack/releases

But - this software does not work so well, and especially with XBMC.  It's got a lot of bugs - you need to disable Aero to get even vaguely decent performance (which you should probably have turned off anyway - who needs aero on an XBMC box?) - but it also doesn't detect what aspect ratio XBMC is playing in etc.  Basically I tried this out and even after a fair amount of config. work it was still slow and not doing what I wanted.

Now, the standard way of controlling these lightpacks in xbmc environments is via the boblight addon.  This little python addon takes care of all the XBMC stuff - detects what you are playing (movie, tvshow, music video etc) - works out the aspect ratio, and then grabs the right colour numbers from the screen to send them out to the lightpack (via a program called boblightd) which in turn triggers the LEDs to light up all at 60 frames a second.

So the XBMC addon talks to a little controller program - boblightd, a daemon (server) that listens to a port, and accepts control signals to send on to the lightpack LEDs.  Like most of these things, it's developed under Linux/unix.  It's not so easy/obvious how to get it going with Windows, but it is possible.  So normally you would still have boblightd running on some sort of micro-controller I guess, but again I wanted to avoid the extra machine.

So - I knew lightpack support had been added to boblightd, but I could not find a working Windows version.  The main xbmc/windows/boblight thread (here) - has a note from uncleted that said:
I switched the Lightpack driver to WinUSB using Zadig and commented out the libusb_detach_kernel_driver call from lightpack device code. It works for me now without crashing. Not sure if WinUSB is really required so I'll have a bit more of a play to find out.

So this is what we're going to do to get it working.

Here's what uncleted worked out and I did in case anyone wants to repeat:
  1. Install cygwin including development, opengl, usb
  2. SVN the boblightd source from:

    svn checkout http://boblight.googlecode.com/svn/trunk/ boblight-read-only
  3. Comment out the offending code block which makes it crash (it's not needed on Windows/Darwin): - lines 100 to 103 of devicelightpack.cpp:

            if ((error=libusb_detach_kernel_driver(devhandle, LIGHTPACK_INTERFACE)) != LIBUSB_SUCCESS) {
              LogError("%s: error detaching interface %i, error:%i %s", m_name.c_str(), LIGHTPACK_INTERFACE, error, UsbErrorName(error));
              return false;
            }

  4. Configure it:

    ./configure --without-portaudio --without-opengl --without-x11
  5. And then make; make install
     
  6. Grab the resulting binary boblightd.exe from \cygwin\usr\local\bin
 But, I have done this for you.  You also need a conf file for your lightpack. I've included a basic one for a sinlge lightpack mounted to a TV using the Andromeda pattern.

All of this you can grab here. - has the boblightd.exe, the conf file, and a few required cygwin dlls.

Unzip all of these into a folder on your htpc called:

c:\boblightd\

Now, one more necessary step - you must change the lightpack's USB driver to a more unix style friendly.  This will mean it no longer works with prismatik (presumably you can restore the older driver if you need this, but don't worry - if you're just using this thing with XBMC, change the driver and away you go).

To do this just download Zadig.  Run this (say yes when it wants to elevate to admin) - and tell it to show you all devices (in the menus) - then choose lightpack and tell it to replace the driver with the latest (included) WinUSB.  Done - not even a reboot (you should hear the device beeps as this happens, and you should now have a device in Device Manager -> Universal Serial Bus *Devices* -> Lightpack.

You'll want to run boblightd at startup before XBMC starts:

c:\boblightd\boblightd.exe -c c:\boblightd\boblight.conf -f

Finally, install and configure the xbmc boblight service addon - you don't need to change any ports/addresses since you're running it locally on the standard port. I set it all to 'fast' mode initially so it reacts quickly.

IMPORTANT NOTE : THIS BOBLIGHTD DOES NOT SEEM TO WORK CONSISTENTLY IF YOU PLUG THE LIGHTPACK INTO SOME USB3 PORTS (well, for me anyway) - use USB 2!!

If you're having issues, run boblightd as above from the command line (without the -f) ... and see what it says.

I have created an issue for boblightd here and presumably they will fix this up:
http://code.google.com/p/boblight/issues/detail?id=79

So to sum up, to get it going (one lightpack) - you need to:
  1. Grab the pre-compiled files
  2. Unzip all to c:\boblightd
  3.  Replace the lightpack USB driver using Zadig to WinUSB
  4. Run boblightd at startup as above
  5. Plug your lightpack into a USB2 port
  6. Install and configure the XBMC boblight service addon
...that's it!

Saturday, August 10, 2013

Simple but effective Confluence mods for Frodo 12.2

I use a pretty much vanilla Confluence skin (helps when developing addons)...but there are a few changes I consider too cool not to have...you can get all of these by grabbing my repo but probably best to just take the changed files from Googlecode and use them in your own Confluence Mod as I make no promises not to do things to my skin you may not like :)

All the .xml linked files below will take you to GoogleCode where you can click on 'raw' and then 'save file as' to get a copy locally...

1. OzWeather Support - I completely replace MyWeather.xml with a custom one to support radars etc for my XBMC OzWeather addon

2. Radar and weather info on pause - DialogSeekBar.xml also gets radar and weather info added to it so it comes up when I pause a show...

3. Time Remaining - this should be standard - I always want timers to let me know how much is left of something, not how much has played (see #5 below for the updated xml file you need)

4.  Recently Added Items only shows unwatched added items, for Movies and TV

- Install Service -> XBMC Skin Widgets.  Configure the recent items tab to have all options selected - so only show unwatched, and update every time you go to home screen

Then, IncludeRecentlyAddedItems.xml needs some updating as well

5. Clearart/Clearlogo support - do this after number 4 above as you need the addon
- Install Program -> XBMC Artwork Downloader - configure this as you want (I tick the 'use local art' option to get it to save all the artwork on my media shares).  Then run it - can take a long while if you have a big collection :)

Then, VideoFullScreen.xml must be modded


In all cases if you want to implement same/similar, just diff my file against standard Confluence files to see the changes.



PVR Remote Programming

Long time no write.  But things have been quite stable for me in a post Frodo world.  My silent Streacom build (see below) runs an absolute treat...so I haven't been doing all that much.

But I did finally work out how to re-program my remote specifically for the PVR section - because obviously some normal streamed movies/tv stuff doesn't make sense with LiveTV.

In a nutshell, I have done this:

[code]
<!-- these overule FullScreenVideo but anything undefined drops back to there -->
  <FullscreenLiveTV>
    <keyboard>
      <i mod="ctrl">CodecInfo</i>    
      <w>ZoomIn</w>
      <y mod="ctrl">ZoomOut</y>             
      <l>XBMC.Action(reloadkeymaps)</l>
      <o>XBMC.ActivateWindowAndFocus(10610)</o>
      <pageup>ChannelUp</pageup>    
      <Pagedown>ChannelDown</Pagedown> 
      <left>PreviousChannelGroup</left>
      <right>NextChannelGroup</right>
      <up>ChannelUp</up>
      <down>ChannelDown</down>
      <q>PlayerControl(Record)</q>
    </keyboard>
  </FullscreenLiveTV>
  <!-- and basic handling for PVR windows -->
  <PVROSDChannels>
    <keyboard>
      <o>Close</o>
      <backspace>Close</backspace>
      <escape>Close</escape>
      <c>Close</c>
    </keyboard>
  </PVROSDChannels>
  <PVROSDGuide>
    <keyboard>
      <backspace>Close</backspace>
      <escape>Close</escape>
    </keyboard>
  </PVROSDGuide>
  <PVROSDDirector>
    <keyboard>
      <backspace>Close</backspace>
      <escape>Close</escape>
    </keyboard>
  </PVROSDDirector>
  <PVROSDCutter>
    <keyboard>
      <backspace>Close</backspace>
      <escape>Close</escape>
    </keyboard>
  </PVROSDCutter>
  <MyTVSettings>
    <keyboard>
      <backspace>PreviousMenu</backspace>
    </keyboard>
  </MyTVSettings>
</code>
[code]

Basically, get the channel keys to work properly, and bind the fast channel guide to the guide button for very easy scanning what's on and flicking to it.  The only tricky bit was digging up the windowid as it wouldn't work by name...

For reference, my standard video playback stuff looks like:

[code]
 <FullscreenVideo>
    <keyboard> 
      <f5 mod="ctrl,alt">Stop</f5>  <!--Added to support (GSB Home Jump) feature-->
      <w>AudioDelayPlus</w>
      <y mod="ctrl">AudioDelayMinus</y>     
      <s mod="ctrl">NextSubtitle</s>
      <m mod="ctrl">audionextlanguage</m>
      <i mod="ctrl">RunScript(script.xbmc.subtitles)</i>
      <f>FastForward</f>
      <r>Rewind</r>
      <period>StepForward</period>
      <comma>StepBack</comma>
      <backspace>SmallStepBack</backspace>
      <quote>SmallStepBack</quote>
      <opensquarebracket>BigStepForward</opensquarebracket>
      <closesquarebracket>BigStepBack</closesquarebracket>
      <return>Pause</return>
      <enter>Pause</enter>
      <m>OSD</m>
      <c>OSD</c>
      <i>Info</i>
      <o>CodecInfo</o>
      <z>AspectRatio</z>
      <t>ShowSubtitles</t>
      <t mod="ctrl">SubtitleAlign</t>
      <l>NextSubtitle</l>
      <left>StepBack</left>
      <right>StepForward</right>
      <up>BigStepForward</up>
      <down>BigStepBack</down>
      <a>AudioDelay</a>
      <escape>Fullscreen</escape>
      <v>XBMC.ActivateWindow(Teletext)</v>
      <up mod="ctrl">SubtitleShiftUp</up>
      <down mod="ctrl">SubtitleShiftDown</down>
      <zero>Number0</zero>
      <one>Number1</one>
      <two>Number2</two>
      <three>Number3</three>
      <four>Number4</four>
      <five>Number5</five>
      <six>Number6</six>
      <seven>Number7</seven>
      <eight>Number8</eight>
      <nine>Number9</nine>
    </keyboard>
  </FullscreenVideo>
[/code]

..and all this is used with a Harmony 650 set as an MCE Extender, and XBMCCustomRegis

All working very well with Frodo 12.2 on Windows 7 64 bit

Monday, June 4, 2012

Getting ForTheRecord plugin to work with Openelec

I have moved my streaming TV system over to ForTheRecord running on Windows.  Harder to set up that Openelec's inbuilt TvHeadEnd, but much more sophisticated scheduling, and runs on the server where it should, and is way less glitchy on playback.  Means I only have to leave one machine on too (its on 24/7 for other reasons).

Only issue is there's no ForTheRecord plugin for OE yet.

So - basically, follow these instructions.

I have zipped up a package with all the appropriate missing libs for Openelec (1.95.3 32 bit) here - might be handy for someone else as it's a boring exercise. Probably works for 64 bit too, if you just download the 64 bit FTR plugin - here.

Works very well (better than TvHeadEnd, actually).


Sunday, June 3, 2012

Silent, fanless, powerful XBMC build - Streacom FC8 with A6 APU build notes...

(This is an update to my xbmc forum post here)

The Goal

I have a Streacom FC8 and I have just finished a build into it.  The goal was to replace my Shuttle XS35GT fanless system that was showing it's age - bit slow in the UI areas even with more basic skins like Confluence, and the endless jitter issues with ION are tiresome.  I considered various fanless options but all seemed expensive or limited really.  So I decided to build my own but I expect shortly very similar systems will be available off the shelf.

The Streacom FC8 is a very attractive, AV style, moderately expensive (I paid about $165 AU) mini ITX case (with room for one half height PCIE card) - and is completely passively cooled case because I want real silence - not 'very quiet' like all those A6 pack builds with fans etc. - I mean really truly silent - as, with young kids, I often watch with the volume off using subtitles etc, and even so called 'very quiet' fans are audible in my lounge at night...so total silence was rule #1.  Maybe I just have sensitive ears but I am surrounded by powerful fan filled PCS all day, don't need it at night as well....I honestly don't see why cases like the Antec little ones are popular when something like this is available - this is beautiful and silent, vs. ugly and even with expensive aftermarket coolers, definitely audible.

Cost was not really an issue as I had a credit to work with.

I need PVR/Live TV support, and ideally want HD audio support as soon as I can get it too. Zero interest in the gimmick that is 3D video, though.

Parts

From Rylun Home Entertainment (Australia):

1 * Streacom FC8 HTPC Case
1 * Power Supply Wesena 150W Pico PSU + 10A Power Adapter
1 * Philips RC260 Remote + Receiver
1 * Slimline SATA Power Data Adapter Cable (needed for the molex to sata to hook up the bluray drive)

From eBay:

1 * Sony 5600S slot load bluray/dvd combo
(has button on left to match the FC8 case but you could use something else and jsut use software eject)

From AusPC market (http://www.auspcmarket.com.au/) - I had a big credit so went a bit 'gourmet' with some of this Smile

1 * Deepcool Z9 Thermal Paste (should have got two tubes)
1 * 60 GB Intel 520 Series SSD (should have gone with 120GB so as to have lots of room for 3 installs)
1 * ASRock A75M-ITX motherboard (see notes below on this)
2 * Corsair 1333MHz CL9 DDR3 RAM

Total cost - don't know, don't care Smile Honestly, I would guess about $1000 all done @ retail. But for me this was well down on the list as I don't spend much on myself and I use my htpc a lot...you could easily get it down to $600ish with less exotic parts in places I'd say.  A 500GB/s SSD is kinda overkill for an HTPC... :)

The Build:

Basically a very simple build as there aren't that many parts.

I had the following difficulties:
  • No documentation came with case, I downloaded some but it's very basic - Rylun say they will be supplying some in future
  • The cords (for USB ports, power etc) are not labelled with polarity so had to google USB wire colours
  • The Wesena IR Receiver started to literally smoke the first time it was plugged in - I am told it goes into a USB header (and can power on) - but again no documentation...I got a wroking replacement and while it works, it does not immediately do so in RC6 mode, which is annoying.  For the moment I am using my old faithful USB receiver but will re-visit this later.
  • Big Problem - I should have gone with a Streacom recommended motherboard - the ASRock is a fine mobo and I got it free, but the RAM slots are in the wrong spot and get in the way of the heatpipes (also the PSU 24 pin connector is a bit close as well). I see now that other mobos have the ram slots parallel to the rear ports, but these are perpendicular along the side where the heatpipes connect. I got it to work by manually and gently bending the heat pipes a little but this is definitely not ideal and it means the cooling block is sitting just slightly askew. When I later change mobos (to trinity + 1 is the plan) - I may need new heatpipes. Fortunately it appears it's transferring the APU heat very well though - solid use for a few weeks, zero issues, and it wasn't that hard to bend them so I am not bothered by this, but other might be.
  • I'd never actually done my own thermal paste before - should have got some more as you need to put it in a lot of spots when doing this sort of build.

Results (updated mid June 2012)

It's 100% silent and running stable across several weeks of continuous & heavy use.

IF I thrash it - i.e. Prime95 or similar - the case gets quite warm, almost hot (it's supposed to!) and I have seen the APU temps vary from about 40 right up to 75 depending on how hard I have thrashed it. Average is about 60 under full load I'd say. Under Windows it runs surprisingly cool most of the time - unless I deliberately thrash it with a CPU tester like Prime95.  I have not experienced any crashes due to temps or anything.

In normal running under Windows (i.e. just using XBMC/playing video) - it's actually only ever mildly warm to the touch and averages low thirties.  At boot from cold it's about 25 and the peak I have seen with XBMC usage is 43, but usually it's about 32 ish.  No problems at all from temps. therefore.


Software

I am trying both Windows (April nightly window build with AE) and Openelec (1.95.4 aka Beta4) on it. I set it up as a dual boot...

Both generally work ok.   Windows definitely better though.


Windows

Boot time with zero special tuning is about 30 secs from bios to operational XBMC. Very fast for Windows with no tuning...I am sure I will be able to get this down significantly once I start tuning.

Is was more work to set up initially and get working well with remotes - probably because I have always used XBMCLive and OE, so Linux, and am just less familiar with XBMC under Windows.  But it's running sweet once I worked out the basics.

SD video quality is shite (as always with XBMC, the only thing I miss about popcorn style machines is there awesome post processing in comparison to XBMC), but there is a pull request to improve this.   So improved quality will come.

HD quality (which is all I really care about) is silky smooth and just perfect.  Audio sync is good (I found this wavering all over the place with OE, see below). Colour range is correct with my set up, motion is wonderfully smooth @ 24p (well, as smooth as it should be) - no jitter issues like with ION systems.  I have turned off 'match video to display'  (i.e. XBMC's smooth video system) as it doesn't seem to help at all.  Of course I have 'adjust refresh rate' turned on to that 24p/50p and 60p are all used correctly.  Everything seems to play very well.

Also, testing a nightly, I have seen the HD light on my receiver for the first time in 3.5 years of owning it Smile - very cool.

System is extremely responsive in general.

I am now using ForTheRecord on my Windows server as a PVR and to serve TV to my clients.  This is working very well - channel changes are marginally slower than with TVHeadEnd but there are way less skips (I think running TVHeadEnd on the ION was not quite powerful enough maybe?) - indeed I haven't seen a skip of any type yet.  Records work very well, although I can't delete them from XBMC and have to use the WebUI - no biggie.  It's mcuh nicer having the TV running on the 24/7 server than placing a load on one of my clients, and more robust.  Installing FTR is a bit harder than TVHeadEnd, but worth it - the scheduling system is excellent.

 Open issues - all minor and infrequent: 

There are very very occasional minor glitches coming off pause and once I have seen a video start with massive judder.  In all cases a stop and restart fix them, and they are really quite rare.  Much rare than the ION jitters.

A few focus stealing issues etc, but I have got it going quite well and have bound a remote button to flip back to XBMC (or re-start it if it's crashed) - works beautifully.

I am using standby during the day between sessions - one in 5 times it won't seem to re-connect to my NFS shares and I need to reboot.  I shutdown fully at night anway, so no big drama at all.

There is an odd hang when addons are installing for a few seconds - I never experienced this with Linux systems.  Not a big deal.

Remote keys are a it weird under LiveTV video - not sure why the don't inherit the standard fullscreenvideo setup, but they don't, so that's annoying - I don't think that there's much attention on this yet, while youc an bind a few keys (EPG etc), you can't seem to fix the behaviour of some of the normal once easily.


Openelec

Boots from BIOS to XBMC in maybe 5 seconds. Insanely fast.

- Complete fail on all 'fusion' versions - apparently these are for older fusion chips and hang on startup with A6s etc.  This is not obviously documented and caused much time wasting.
- Video fail (extensive skipping) on versions below Beta 4.
- 'Generic' Beta4 (which contains the patches from FernetMenta for xvba that are not yet in mainline xbmc) - works quite well, although it too suffers from poor SD video quality and audio sync is not reliable - very annoying.  Quite a few gltiches overall in general.

System is somewhat less responsive than on Window but this is probably more to do with the remote timings than anything - OE seems to limit the max speed of the harmony as it use MCE remote mode. Bit overall it just seems a little slower.


I have given up on OE with AMD video for now.  Still use it on my ION machines though.


Conclusion



This build really needs Windows to shine.  But shine it does - complete silence, ample power even with Aeon Nox etc., silky smooth both with the UI and playback.  Shame about needing Windows for cost reasons and slow boot reasons, but I have to say it does work well.  And running multiple versions is easy using the -p portable switch, so testing new versions is much nicer than with OE.


In short, after a lot of work (isn't there always with XBMC to get it just right?...but that's kinda the point for me - I can tailor it to perfection) - it's a big, silent step up from the ION systems.  Definitely recommended.



Tuesday, May 1, 2012

Get AllMusic Guide scraping working again on Openelec XBMC


(copied from my forum post for easier finding!)

You must first copy the addons from the read-only system section:

/usr/share/xbmc/addons/metadata.albums.allmusic.com
/usr/share/xbmc/addons/metadata.artists.allmusic.com
/usr/share/xbmc/addons/metadata.common.allmusic.com

..to

/storage/.xbmc/addons

..and THEN copy the file in this xbmc forum post:

http://forum.xbmc.org/showthread.php?tid=116461&pid=995098#pid995098

to this folder:

/storage/.xbmc/addons/metadata.common.allmusic.com

(this will get xbmc to first use the local copies rather than the system level addons, and then you add the appropriate changed files).

I can confirm the above method works with Openelec nightlies and I am getting album reviews, artist info, pictures etc.