Thursday, March 29, 2012

XBMC and Plex Media Server revisited ...

    A little over a week ago I wrote about using Plex and XBMC on the same machine. After having a few days to play around with it I have decided that its time for a revisit to this subject.

    At first, I was elated to find out just how well it was working. This was quickly shot down as problems began to crop up. They always seem to do that just when you think your setup is nearly perfect. This case is no exception.

    Before I get on a rant, let me say that I truly do enjoy my Plex Media Server. Residing on Ubuntu 11.10 it has served me very well and has more than met my needs. It is the "want's" I am looking for at this point, not the "needs".

    You see, I just can't keep myself from tinkering with with just about everything until I find that X-Factor, that intangible combination of form and function that makes everything just ... right. I am a perfectionists when it comes to my network, everything must work as I need it to work. This is true even if hardware and software were never meant meant to accomplish what I think they area capable of. I tend to push even aging hardware as far I can without actually breaking it. Although that sometimes happens as well.

    The other day I was watching one of many 1080p videos via the XBMC front end, rather than using the Roku. Normally this is not an issue as it tends to work well. However, as the fates would have it, I had guests over to watch the video in question. I was eager to show off my newest edition to the network, so without much fanfare we all settled in to watch the show.

    About a minute in, it happened. The video seemed to pause for around two seconds, then race to catch up with the audio. Everyone saw it, but we all took it as a minor glitch and moved on. Then it happened again, and again. In total it happened six times in a 1 hour 45 minute show. While this did not make the show unwatchable it was a very big disappointment.

    Since then, I have re-watched the same video file via Roku without issue, and also at 720p.

    Looking for answers, I turned to the log files for both Plex and XBMC. Nothing. Not one error showed up in the log files. I was stumped. So, I replayed the video in XBMC. Nothing happened out of the ordinary. It played fine.

    Upon playing the same video a third time in XBMC, there it was again. That same "freeze then race to catch up" that had been witnessed days prior. Once again, the logs still showed no errors.

    Up to this point I had been using the PleXBMC plugin to watch the videos. Loading the videos in this manner allows me to view all of the metadata for each file that the Plex Media server has already downloaded. This makes for a vastly greater user experience than simply listing file names in a folder and had become my preferred method for viewing videos.

    I have since watched the video three more times without the PleXBMC plugin, using just XBMC to play the video files. So far, there has been no issue. I am left to conclude that it has something to do with the buffer size in the connection between the Plex server and the PleXBMC plugin.

    Seeing this kind of video issue in streaming video is common enough, but a little unexpected as both the client and server are on the same physical machine. Then again, that may be the source of the issue. At this point, my log files are just not telling me enough about what is going on. I think this will be my project for the weekend. Some ideas to consider include (but are not limited to):

    1) Rather than use the network IP of the Plex server, set the IP to the address of the router and allow port forwarding to do what it does.

    2) Load XBMC in a separate virtual machine to keep the client and server "virtually" separated. Seems like a waste of resources though.

    3) Forget all about PleXBMC and find a way to get the metadata into XBMC on its own, thus removing any kind of network buffering.

    At this point, however, all I can do is speculate. The weekend is fast approaching, so you won't have to wait long to find out my results.

    Until next time ... 

No comments:

Post a Comment