Thursday, October 06, 2011

MDL: XBMC Issues Pausing With Remote SMB

I love my XBMC and have had great success sharing a single datasource and database across multiple clients.
With one exception – my linux box doesn’t like it when you pause TV and movies when the video file is on a remote SMB share – whenever you try the videos stop playing.  Manageable, but it annoys my wife.
I think I finally fixed it.  I created a symbolic link on both the Windows and Linux clients so that XMBC thinks that the file is a local path.  This is necessary because all of the clients need identical paths to the video files in order to share the common database.
So far so good, I can fast forward, rewind, pause and the videos seem to handle it fine. 

Update: Nope, never really fixed it.  I ended up switching to Drobo  and sharing content with both NFS and CIFS.  Ever since I made the changed everything has worked like a charm.

Technorati Tags: ,,

Sunday, August 14, 2011

MDL: Optimizing XBMC

There are a number of tweaks that I had to make on XBMC to make it work a little better with my setup.

First – since I am using MySQL I had to add some indexes and make a small change to the MySQL server.

By default it appears that MySQL wants to do a reverse DNS lookup to all client connections.  This makes the initial connection very slow, to disable this behavior add the following to my.ini in the [mysqld] section:

skip-name-resolve

The following indexes also improve performance:

use XBMC_video;
ALTER TABLE movie ADD INDEX idMovie(idMovie);
ALTER TABLE movie ADD INDEX idFile(idFile);

Another change that is essential because of the shared MySQL database is the sharing of the thumbnail directory – otherwise the thumbnails will only appear on the XBMC client that discovers the media.  To get around this I created a symbolic link on the Linux box to the shared Thumbnail directory on Windows.

Connecting to Windows shares from Linux has caused me all sorts of issues.  I initially tried mounting shares in fstab, but if the Windows box wasn’t available during Linux boot the shares were unavailable.  I switched to automounter which resolved the issue.

There are some other SAMBA tweaks to improve performance – in theory this was supposed to prevent video from stopping if it was paused or looking at info.  So far it is only partially successful.

socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192

Finally, ever time I upgrade something in XBMC or a supporting component the autostart fails to actually, you know, autostart XBMC.  To fix this edit the /etc/uxlaunch/uxlaunch file with the correct home directory.

Technorati Tags: ,,

Sunday, June 26, 2011

MDL: Backing Up to Flickr Part I

For better or worse I’ve decided that I would use flickr as my photo backup solution.  For one, it’s not terribly expensive – around $30 for unlimited storage – and it makes picture sharing pretty easy.  There are privacy concerns for some, but I’m simply not sure that I care.
The downside is that there aren’t really any tools out there that automate sending the pictures to flickr.  Foldr Monitr comes close, but its buggy, isn’t updated anymore and I just don’t like the choices that it has made. 
After about two years of complaining I guess I’ll just have to handle the problem myself.  Odds are that you won’t like the choices that I’ve made, but hopefully I’ve given you enough pieces that you can make the necessary modifications without having to start from scratch the way that I did.
You are going to need a database of some kind to keep track of everything – I have a copy of MySQL running already for XBMC so that’s what I’ll use.  I’m also going to use PowerShell since that is what I know which means that I’ll have to install the ODBC driver for MySQL.
Finally, I suck as a programmer.  Don’t use any of this code with the expectations that you’ll learn how to get better at scripting.  Also, don’t point out how if I changed some bit of code around it would be SOOO MUCH BETTER!   I don’t care – if my code functions for me, inefficient or not, I am quite content.
So be warned – this thing works for me and my needs 95% of the time.  And if I run across an anomaly where it doesn’t do what is expected if x & y are true – I stop doing  both x & y at the same time.  The chances that I’ll update the script to accommodate your special circumstances are pretty damn rare.  And adding any functionality at all is all but unthinkable.
All that being said, feel free to borrow the code and adapt it to your own purposes – you just can’t take this and put it into something that you are going to sell.  And if you update the scripts for public consumption – please give me my due by linking back here.  Obviously while noting how crappy the code is and how much work you had to put into it to make it semi-functional for a normal human being.
Part II will get into the script and perhaps the database – assuming that I actually finishing writing the god damned thing.

Update: I have completely abandoned this project.  Flickr is just too much of a pain in the ass.  I am almost completely migrated to CrashPlan for offsite backups of my pictures with the plus of being able to backup non-pictures as well.

Technorati Tags: ,,,

Sunday, May 22, 2011

How Microsoft Can Become More Interesting

Paul Thurrott asked the question “How Can Microsoft Fix Microsoft?” - here is my take.

I believe that one of the things that makes Microsoft less 'interesting' than other tech companies is the reliance on being predictable for businesses.  Large organizations simply can’t tolerate constant churn in its core technologies – they have a hard enough time simply keeping up with the plodding pace of change as it exists today.  I think that Microsoft can take a lesson from open source projects and offer frequent innovations while maintaining the predictability that large organizations need.

The key is to offer frequent updates, say every six months but only offer long term support on a subset of those releases - every four releases for example.  This would allow Microsoft to try more experimental features and observe how well they are received in a community that is more forgiving of constant churn while maintaining predictability for its largest customer base.

This approach would avoid forcing Microsoft into splitting its products into separate governance models for different product lines (one of the things that I think slow down development cycles on products like Live Essentials and Windows Phone) and hopefully speed up the rollout of interesting technology for those of us that are enthusiasts.

Technorati Tags: ,