Search This Blog

Tuesday, January 25, 2011

Openelec Beta 0.90.5 Breakage

Latest Openelec beta breaks machines using netmount.conf to mount shares. Apparently beta 6 will fix this soon, but in the meantime it's not obvious how to revert. You can use this link to get the older version to manually extract the kernal/system files and bung them in .update

Well, that's what will try to do once the download finishes

Thursday, January 13, 2011

SMB Streaming issues in Dharma - Using NFS for better streaming

One thing I have noticed about Dharma (and I presume it's actually more to do with the underlying lucid lynx than Dharma per se, althought I don't know) - is MUCH greater flakiness with low quality networks, like wireless and Ethernet over Power.

My Camelot set up happily streamed all 720p and almost all 1080p without glitches using Ehtnet over Power (EoP). On the same hardware, same network, Dharma can barely manage 720p, with regular buffering issues. 1080p - fuggedaboutit!

There are quite a few reports of this, not a lot of solutions to date though. I suspect it's to do with default SMB mounting options and an overly small buffer or something, but in general SMB is not known to be a wonderfully efficient protocol. It also means tht you need to use Windows name resolving which can be painfully slow at times, so all in all, it's not perfect.

The solution seems to be to use NFS rather than SMB to share the files.

With this here I can reliably stream 720p and while 1080p may buffer a bit at the beginning it seems to settle down (I’ve only tried it for 10 mins or so, as the second machine is not really a machine I actually use much, it’s really more for my wife and kids to use during the day!). This is with my power net thingy showing an amber or red signal, not green – so medium to bad connection (40 to 80 mb). In all this is at least as good as with Camelot now I’d say. This was all tested while my wife was watching 720p stuff on the main machine too so the network was being kept busy with that as well.

I think this is the best option but the Openelec people are looking at SMB sharing issues as ewll.

So, to try it isn’t that hard:

Basically, you run a little utility on your Windows server called Hanewin NFS (http://www.hanewin.net/nfs-e.htm)

Install that and then you go into the start menu, run the little administrator proggy
(Hanewin->NFS->NFS Server (right click and choose run as administrator).

On the exports tab, set up your shares:

“Full path on your server” –name:WhateverWithoutSpaces –public

Like so:

"F:\Movie Library 01" -name:MovieLibrary01 -public
"G:\Movie Library 02" -name:MovieLibrary02 -public

"M:\Movie Library 03" -name:MovieLibrary03 -public

"H:\TV Library 03" -name:TVLibrary03 -public

"I:\TV Library 04" -name:TVLibrary04 -public

"J:\TV Library 05" -name:TVLibrary05 -public

K:\ -name:Store06 -public

K:\Thumbnails -name:Thumbnails -public

"K:\Music Library" -name:MusicLibrary –public


Save the file, and restart the server using the button on that tab, and you should see a list of your shares come up if you did it right (under the Directory column).

In the Start->Hanewin->NFS, choose ‘Start NFS Server’ and ‘Start SunRPC Port Daemon’. This gets it actually going. Turn off you Windows Firewall for you internal network. Leave it on for the external network, but there’s no real issue turning it of inside your own network really. You can probably bind some specific ports and open only those if you want, but let's keep this simple for now.

Now, mount them on your Openelec machine using netmount.conf.

nfs | serverIP:/ShareNameNoSpacesAsInHanewinExportsFile |/storage/mount/Whatever You Like

nfs | 192.168.1.51:/Thumbnails | /storage/.xbmc/userdata/Thumbnails
nfs | 192.168.1.51:/MovieLibrary01 | /storage/mount/Movie Library 01

nfs | 192.168.1.51:/MovieLibrary02 | /storage/mount/Movie Library 02

nfs | 192.168.1.51:/MovieLibrary03 | /storage/mount/Movie Library 03

nfs | 192.168.1.51:/TVLibrary03 | /storage/mount/TV Library 03

nfs | 192.168.1.51:/TVLibrary04 | /storage/mount/TV Library 04

nfs | 192.168.1.51:/TVLibrary05 | /storage/mount/TV Library 05

nfs | 192.168.1.51:/Store06 | /storage/mount/Store 06

nfs | 192.168.1.51:/MusicLibrary | /storage/mount/Music Library


Reboot your machine and the shares should come up. Everything should be much snappier and more reliable if my network here is any guide.

(Note I have got my .xbmc/userdata/Thumbnails folder on a network share now – so with the MySQL db, watched status/thumbnails etc, are all brought in from the server and will survive upgrades etc.)

The NFS shares seem to connect more quickly at start up too, so so far I haven’t found any issues at all.

I'm now using NFS on both our boxes and so far it's noticeably more responsive (particularly with things like looking at photos), and much reduced buffering with PoE to our second machine (our main machine is using ethernet so this wasn't an issue).

Final XBMC10 on Shuttle and ASRock systems

With the final release of Dharma, I experiemented with the three 'appliance-type' builds - XBMCLive 10, XBMCFreak, and OpenElec (which will become an official build inthe future).

To cut a very long story very short - OpenElec is the way to go. It gives you most of the flexibility of Live but it's a far less fiddly thing and a very very tidy little distribution.

I am running this on both my ASRock and Shuttle machines with very good results - install is very easy (make a USB key, boot from it, install, the whole thing takes maybe 5 minutes when you know what you're doing). This install supports sound over HDMI, latest NVidia graphics drivers and power management (suspend by remote) straight out of the box with my hardware. I have found suspend by remote on the Shuttle to be slightly inconsistent but to be honest I mostly leave the Shuttle on and hard power down the ASRock because of how we use them so that doesn't bother me.

All the system config stuff is done using a WinSCP connection (you must explicitly tell WinSCP to use SCP and not SFTP to get this to work). All the system type files are in a .config folder.

On the Shuttle, there is a sample asound.conf file you can use to get sounds for both the UI and over HDMI to work at the same time. See link here.

I use netmount.conf to mount my network shares from my server (now via NFS, see next post!).

This is simple, and means the shares are all mounted to the machines in the same local place (/storage/mount/share). This ties in nicely to using MySQL for the database, as the paths are all seen as local and the same on multiple machines.

My remotes and receivers (all MCE types or a Harmony emulating such) worked straight out of the box. I have further tweaked them using a kepmap.xml in the .xbmc directory.

And that's basically that - almost all the plugins seem to work just fine once installed (including ABC iview and other encrytped flash based video stream plugins). All local streaming works very well indeed (although see Dharma w. SMB proviso above). No video config was required - my TV was auto-detected, switches to 24p/50p/60p as required, and using 'sync playback to display' with Video Clock and 'resample' (I think, might be 'drop/dupe') - playback is buttery smooth with everything I have thrown at it, the little jumps and glitches seem to be gone, or so infrequent that I haven't noticed them.

It's all good - I thoroughly suggest if you have ION based hardware, that you check out openelec as it's easily the best/easiest out of the box XBMC experience if you're looking for an applicance like feel from your system.

Oh - and Openelec even has an automatic, easy to use update system - so no more whopping re-installs for upgrades - it's fan bloody tastic.

The Shuttle is now totally awesome - glitch free, and silent - totally silent. It's a great machine.