Thursday, December 18, 2008

XBMC on AppleTV - Is is worth it?

I Recently ordered an AppleTV for a friend. Our intentions were to use the AppleTV unit with XMBC. He currently has XMBC running the Xbox and we are both huge fans of the XMBC interface.

After unboxing the AppleTV, I immediately used atbusb-creator to create the boot loader that could install XMBC. There is a Windows version, but I could not get it to actually write the image to a USB drive on my Windows machine. Fortunately, I also have Leopard installed, so I was able to boot into OSX and run the Mac version, which ran fine. I also ended up using 2 different usb drives because during my first attempt the AppleTV unit did not recognize my usb drive. On my second attempt, using my Kingston Data Traveller, it worked fine. My first usb drive was just a cheap, unbranded, 1gig drive that bought a few years back.

Patching the AppleTV was a snap. I just followed the documentation. Once I rebooted the AppleTV I had an XBMC menu, which then allowed me to download and install the latest version quite easily.

This is where the fun stopped. First, the AppleTV unit does not have a power off (at least nothing that was obvious), so, for every reboot, I had to unplug the unit. While this wasn't a huge deal in my test environment, it's going to be annoying to anyone that has a unit in their home entertainment cabinet.

The AppleTV unit takes about 1 - 2 minutes to fully boot, and put you at the main menu. I was pleased, and yet surprised, but the simplicity and plainness of the AppleTV main menu. It's just a simple rectangular menu without a background image. For Apple, I was surprised that there wasn't more, but at the same time, I was happy that Apple decided to forgo gimicky, and stick with functional.

I didn't spend too much time in the AppleTV UI, since it's not really a useful piece of software, unless you have iTunes installed, or you are willing to buy or rent DRM movies. I did try out the YouTube videos. It worked. I went into the Movies section as well, and played a trailer. It worked. Since the AppleTV unit can't actually play anything over the network, without iTunes, I wasn't able to try out any streaming videos.

So, after a few minutes, I decided to launch XBMC. Having used XBMC on the XBOX for a couple of years, this was the real prize for me. After XBMC launched, I was actually stuck in a window (not fullscreen). I then used the Settings menu to make the application fullscreen. I Also calibrated the screen, so that the UI could fill the entire area. I wasn't disappointed with the UI. It was responsive and worked pretty much like the XBOX version.

I immediately configured XBMC to connect back to my media share. In a few minutes, I had complete access to all my movies and recorded shows. Playing an SD avi file played fine. Only having a 6 button remote proved to be challenging. You don't realize the extent to which you use other remote buttons, until you only have 6 to choose from. Let's just say, that in XMBC on the Xbox, having the extra buttons is really useful, and I'm sure they'd be useful on the AppleTV as well.

To my disappointment, the XBMC on the AppleTV could not play any 720p x264 content in a mkv container. I tried about 10 files, and all files were un watchable. Audio was fine, but the video was completely jittery. This was a huge disappointment for me. The core reason my friend had purchased this unit was because he wanted to watch 720p content in XBMC. That's not going to happen with this release. It's not the fault of XMBC, it's a great product, but there's only so much you can do when you have decode and render in software on such a limited device. Apparently the device will play 720p content if you convert it to mp4, but who wants to convert video?

We both should have done more research into XBMC on the AppleTV before buying the unit. But, we were such fans, we rushed in. Given that XBMC can't play 720p x64 content (without re-encoding it), then he could have purchased and Xbox and put XBMC on that for only $50. You can already play 720p content on an Xbox, if you are willing to convert it to mpeg2. So, right now, we have 1 brand new AppleTV unit for sale.

Is XBMC on the AppleTV worth it? Well, if you're an AppleTV fan, and you have already purchased an AppleTV for the purposes of renting and downloading movies, then I'd say that Yes, putting on XBMC is well worth it. XMBC will add functionality to the AppleTV unit, and you won't be disappointed, until you try to play your 720p content. But, if you are looking at buying an AppleTV just to run XBMC, then buy a Xbox. For much less, you will get the same features.

A couple of weeks ago, I test drove a Popcorn Hour unit. Even though I was unimpressed with the performance of the UI, I would certainly choose that unit over the AppleTV, solely based on the fact that it played my 720p mkv files without an issue.

Recently, SageTV released a stand alone HD Player, which I suspect would be the better than both the AppleTV or the Popcorn Hour. I haven't tried it myself, but you can check out more on the SageTV HD Theatre (HD200) on GeekTonic. I currently own the HD100 that SageTV released previous to the HD200, and it plays all my current media without issue.

The Bad
  • Slow boot time
  • No cables (except for power)
  • Only 6 buttons on the remote
  • XBMC can't play HD files
  • No power off button
  • The unit runs very hot

The Good
  • Simple AppleTV interface
  • XBMC was easy to install
  • XBMC worked well (as long you don't need to play HD)
  • Slim and Sleek unit

More AppleTV Images
Movie Listings

The Mummy Movie Details

Sunday, December 14, 2008

Batch Metadata Tools gets Custom Content Proivder

As of version 1.12, the Batch Metadata Tools now has a "build your own content provider". This new feature, called a CompositeMetadataProvider, is basically a way to compose or build a new content provider from 2 other content providers, using only configuration.

For example, you can create a new content provider that uses the IMDB provider to search, but then uses themovidedb.com provider to fetch the details and thumbnail information. You can also configure which fields from the search provider that you want to use instead of those in the detail provider.

This new composite provider model may be a little tricky to understand at first, but it opens up some great potential to pull content from multiple sources when fetching metadata information.

Saturday, December 13, 2008

Batch Metadata Tools gets new Metadata Provider

Last week I applied for an api_key for themoviedb.com for the Batch Metadata Tools project, and it was granted. Then within a couple of hours, I had the full integration with themoviedb.com complete.

Their api is really simple. It mainly consists of two commands; Search and GetInfo. The search takes a single search argument and returns a list of matches, and the get info command will return back the complete movie information for a given match. Simple and easy.

Batch Metadata Tools is now at version 1.11, and you can red more about how to use this new provider in the project wiki.

About Batch Metadata Tools
The Batch Metadata Tools project is a small java project that provide movie information and cover art for movie files. Currently it's used within the SageTV community for fetching movie information when you import a large collection of movies. Although it is currently used for SageTV, it supports a pluggable output provider, so that it could be used to read/write other formats.

Currently the Batch Metadata Tools has search providers for IMDB, DVDProfiler, and themoviedb.com.

Thursday, December 4, 2008

Popcorn Hour A-110

This week, I had the pleasure of trying out a new Popcorn Hour A-110.

It would seem that this device is marketed at the regular consumer that just wants to watch HD content, without the hassle of configuring too much software/hardware.

If my brother-in-law is a measure of the common person, then I think the unit falls short. I have it now, because he could not get it working. When I got the unit, I plugged it in, and the networking was configured for a static IP. Because of that, pressing any option, other than Settings caused the unit to lock up.

After I changed the IP to use DHCP, it worked fine. I configured it to go against my media shares, and it played .mkv files, .ts files (HDPVR), and regular divx/xvid files. The responsiveness of the unit was very good for starting and stopping the playback of a file. Much faster than my SageTV HD-100. But the menus were much more sluggish, especially the online vidoes.

The online videos section is quite rich. There is lots of selection, but the UI feels slow to render.

A few months back, I showed my SageTV setup to my brother-in-law, and he wanted it. He didn't need/want the PVR functionality, just the distributed nature of the system, and the HD-100 for HD content. He is setup now with an Xbox running XBMC, which serves his needs quite well, except for HD content.

I'm a huge SageTV fan, but I could not bring myself to recommend SageTV to him, since I did not want to spend my days supporting his setup, and mine. So, I recommended that he get a popcorn hour; plug and play. Well, as it turns out, I still need to support him, which is disappointing, to say the least.

Of course, had I known that SageTV was going to be releasing a STB, and not just an extender, then I would have told him to wait for the SageTV STB. It's too bad they didn't run a pre press release stating their intentions.

Today, there are several options for HD STB Media Players.

I think that now that I have played with the Popcorn Hour, it is a nice device. UI is very spartan, but functional. But, I think that if I wanted just a HD media center, then I'd either get the Apple TV and run XBMC on it, or I'd get the SageTV HD Theatre. Given my setup I would lean towards the SageTV HD Theatre, since I already have SageTV installed. If I had nothing, and I knew my needs didn't include a PVR, then I'd probably get the Apple TV running XBMC.


Of course the lesson learned here, is that no matter how much you think a device is easy to use, leave it up the consumer to prove you wrong every time.

Wednesday, October 15, 2008

Rest APIs for SageTV

Last week I reported that I had created a Java RPC api for SageTV. This week I've released the Rest API addition.

Using the Rest APIs you can access any of the SageTV services using a simple Url syntax. It helps to know and understand the javadoc, since the Rest APIs follow that structure.

For example to tell SageTV to refresh its media file collection, you can use the following url:

http://server:8080/sagex/rpcXml/Global/RunLibraryImportScan/false

or if you wanted to find a list of clients connected to your server:

http://server:8080/sagex/rpcXml/Global/GetConnectedClients


All responses are returned as Xml and documented in the project's wiki.

Monday, October 6, 2008

Java 5 Features - Part 1 - Formatting

I've been using Java for a long time, and one of the first comments I made about Java, when I switched from C, was "Where's printf?". Most people will never need to use printf, and in the few cases that you need to format something, you can use Java's MessageFormat class, at least that's what Java enthusiasts would have you believe.

As you may know, Java 5 introduced the printf() function. Even though I knew it was there, I still resisted using it until recently. And now, I can't imagine not having it. I don't know why I resisted using it? I used Generics as soon as it was availble, but printf() just eluded me, even though I found it to a great function in C.

I may be one of the last people that still write command line applications. I like command line applications, and a well written command line application can support a gui, if needed. But, command line applications require a lot of printing to the console screen. In java, this resulted in a lot of ugly code like

System.out.println("Unable to open File: " + file.getAbsolutePath() + " for writing. Please check permissions.");


But using printf, you can clean that up a little....
System.out.printf("Unable to open File: %s for writing. Please check permissions.", file.getAbsolutePath());


I don't suggest that you abuse the printf function, but know it's there. Also know that the String function has a static method for using printf formatting. This can be handy at times when you need to log a lot of data in a single line, or if you need to simply format a String for some reason.

For example,
log.debug(String.format("The Process: %s took %sms to run.", process, time));


or

String msg = String.format("%-20s: %s", cmd, description);


The whole printf function can do a lot of pretty complex formatting, so check it out, and the next your are printing messages to the console, just maybe you'll use printf().

Java RPC for SageTV

I released a Java RPC library for SageTV. Sometimes, I find myself needing remote access to SageTV to do things that are just not convenient to do from the SageUI or the web server interface.

Initially the small project started out as a part of the GUI redesign of the Batch Metadata tools that I released earlier, but I thought it would be useful in other cases. (The GUI redesign is not released yet, but it's getting there)

The API is completely generated from the public SageTV javadoc, so it is complete. Also, the API enables you to write code and then choose to either embed it in SageTV or run it externally.

An example use of this api would include... Write a small Java utility to find all Watched TV Shows and then move them to an archival area. Or, on a nightly basis, find all HD recorded shows and transcode them into SD so that your SD MVP extenders can play them as well.

Both the client and the server are included in the same small jar (~70k), and the client will attempt to automatically find the running RPC server, so it should be zero configuration from the client side.

I hope the API may be of use to people that want to write java applications that interact with SageTV.

Thursday, September 18, 2008

Media Center / PVR Concept

Recently, I had an idea for an open concept Media Center and PVR. This concept includes a 3 tier system consisting of a Front End, Application Server, and Backend.

The First Tier
The Front End consists of an Html/Css/Javascript rendering engine combined with a media player. WebKit and Mplayer would be a good choices for this, since both can already be ported to different hardware, including PCs and low powered devices.

Using Html as the front end seems like a logical choice since there is a large pool of existing web developers that are familiar with technologies. The Front End engine will also require a robust media player engine such as mplayer or vlc. Html pages can embed video windows into their pages, as when displaying the Guide data, or play fullscreen, when watching regular TV or movies.

The Html UI itself would have several common branded UI elements, such as input boxes, tables, buttons, etc, and Application Designers would be encouraged to leverage those UI elements so that themes would would work with their custom applications.

The Second Tier
The second tier would be an Application Server. My choice for this, because I use java, would be to use Tomcat or Jetty as the server. The server's role would be to serve up resources to the Front End and to handle Rest services. The Server, since it is a standard Application Server, can host any number of custom, server side applications. The applications would be deployed to the Server and then accessible to any of the clients. There would be a well defined set of restful services that would define the core interactions between the Client and the Application Server.

Two standard applications that would be deployed on the the Server would be a Media Center application and a PVR Application. These 2 core applications would simply be pluggable proxy applications that proxy Front End requests to the Back End. For example, the Frond End may send to a request to the Server for a list of all movies in the Media Center. The Server would dispatch that request to one or more Backend plugins, and send the formatted results to the Front End. The Server, in this case, would accept plugins for different Back Ends, and the server could, in theory, utilize multiple backends or different types. Examples of backends, could include MythTV or SageTV.

When media is being streamed to the Client, it would either do so via a proxy service in the Application Server, or the Client would play the Url directly from the backend. Using this model, if a back end can support exporting a media streams over http, then it can elect to have its stream read directly by the client. In the case where the back end cannot export it's media stream over http, then the proxy application in the application server would provide an http stream to the client. But, even if a client is receiving a stream directly from the backend, it would still be required to send its commands via the application server. In order words, the backends are media exporters only, and should not be interacted with directly from a client.

The Third Tier
The third tier is the Back End. As mentioned above, a back end would probably consist of using MythTV, SageTV, or some other extensible PVR/MediaCenter that is already well established. By using an existing backend, as a plugin, the user is not locked into any technology, and they can move between different backend solutions. This may not be an attractive feature to backend providers, but it is an attractive feature to consumers.

Keep in mind, the concept here remains the same, no matter what the actual technology that is used. The concept is an open media center consisting of 3 tiers; Html Frontend, Application Web Server, and PVR Backend. I've chosen Java as the preferred Application Web Server, but in reality, it could be any open web server technology.

Pros and Cons
Pros
  • Web technologies are widely used and fairly easy to understand
  • Using a middle tier means that you don't have vendor lock in
  • Doesn't "reinvent the wheel" when it comes to PVR solutions, since you are reusing existing PVR Backends.
  • WebKit and MPlayer haven been ported to many embedded devices.
  • Rapid development and deployment of Media Center applications using Html
  • Middle Tier can proxy more than 1 back end, allowing you to add/remove backends for testing, etc.
Cons
  • Many systems are single tier, some are 2. Adding in a third tier (in this case ,the middle tier) adds some complexity.
  • Html won't allow from some of the eye candy that some Media Centers are using today.
  • Interaction between the Front-end and the Middle Tier needs to be well thought out.
Conclusion
I own a number of small embedded devices, such as the MVP and HD-100. At some point, I'd like to play around with seeing how well these devices could handle a WebKit rendering engine and see if this idea could actually come to life on these devices. I know some people have played with the MVP and have used it as a front-end to ReplayTV and MythTV. My challenge would be so see if WebKit could actually run on these devices and be usuable as a MediaCenter/PVR front end.

Wednesday, September 17, 2008

Metadata Tool Goes Visual

I originally wrote the Batch Metadata tool because I had a large collection of movies, and Sage didn't provide a way to import my existing collection with metadata. Nielm's IMDB tool was good, but it's a one at a time solution.

So, a tool was born, and it works quite well at what it's meant to do; fetch metadata and create output properites and thumbnails. Now, I'm looking at a bigger picture, that includes full media management. Obviously the Batch Metadata tool is a part of the solution, and I decided to use GWT (Google Widget Toolkit) as the UI. I was looking for an excuse to try out GWT and this project became my excuse.

I decided to make this a web application for one main reason; I like web applications. I read my email online, my photos are online, my calendar is online, and all this translates into convenient access to my information. I wanted my media to be accessed in the same way. I have 7 computers in my house. I don't use all of them, but I do use 4 of them. I wanted to be able to quickly access my media, make changes and import new movies from any of those computers. A web application made sense.

The features that I'm looking at putting into this application include
  • Media importing from local filesystem.
  • Metadata fetching (from multiple sources)
  • Batch metadata updating (from multiple sources)
  • Metadata editing
  • Cover art updating (from mulitple sources)
  • File management (moving and deleting)
  • UPnP Server
  • Media playback
  • SageTV integration
  • Handle TV media (recorded shows) as well as movies.
This project has started. I'm hoping to have a beta of it ready to go in a few weeks. Obviously the beta won't include all the features, but hopefully it will provide some of the core ones. I realize that there are a couple of web project from SageTV, but this isn't a SageTV application. It's a web application that may or may not integrate with SageTV. It will not run in the same java process as a SageTV server (but it could).

Stay in touch. I'll update my blog on the progress.

Monday, September 15, 2008

SageTV - PVR and Media Center

Several months ago I decided to take SageTV for a spin. I'm a long time XBMC fan, but with HD becoming ubiquitous, I needed to find a solution that could deliver HD content to my TV, and XBMC on the Xbox wasn't doing it.

My first experience with SageTV was a little disappointing. I only needed a HD Media Center, and Sage's Media Center functionality is severely lacking. But, despite that, I forged ahead with a complete SageTV install. The final selling point for me was the SageTV could use a thin client media extender as a front end. Shortly after installing SageTV, I purchased the HD100 Media Extender for SageTV. This extender product worked flawlessly on my divx, xvid, dvd, and HD content. Without the HD extender, SageTV is just like any other Media Center solution, except that it costs money.

One of the core features missing in the SageTV Media Center is the lack of an automated metadata import tool, that can import movie metadata from external sources, such as IMDB, or other locations. This is a standard feature in my XMBC configuration and not having it made the movie experience so much less enjoyable. Not having this feature bothered me so much that I decided to write an external tool that could scrape movie information from several sources and allow SageTV to import that information. This tool is the Batch MetaData Tool. Although the Batch MetaData Tool was written with SageTV in mind, it can be extended to output it's metadata information in different formats. I'll post more about the this tool later.

Since Installing SageTV and buying the HD100, I decided to give the PVR funtionality a try. I started out with SD content, then I purchased the HD-PVR and a Bell 6141 reciever and I started recording HD content. The quality and the performance was very good. SageTV has a very nice interface for recording TV shows, resolving conflicts, and managing recorded shows. I still can't use it to replace my Bell dual tuner HD PVR, but I do use it to supplement it. The great thing about having SageTV is that all of my recordings can be accessed via any computer, or extender, in the house, or even over the internet using the Placeshifter client. Record once, Watch anywhere; a dream come true.

Unfortunately, it's not all bliss. My SageTV setup has locked up from time to time. It seems that it is a combination of SageTV and the HD-PVR. If I disconnect the HD-PVR, then SageTV does not lock up at all. In fact, my SageTV was up for several months until I hooked up the HD-PVR. This may have nothing to do with SageTV and everything to do with the HD-PVR drivers. I'm still investigating.

Just for reference, I thought I'd make a Pros and Cons list of SageTV features.

SageTV Pros
  • Stable and reliable PVR and Media Center
  • Supports SD and HD extenders
  • Supports Plugins
  • User-friendly UI
  • Java based (not everyone would consider this a Pro, but I do)
  • Runs on Windows/Linux/Mac
  • Has built-in EPG data
  • Great at managing recordings
  • Placeshifter that turns SageTV into a Sling like appliance.
SageTV Cons
  • Linux version has no trial
  • Plugin model requires learning a new Xml scripting language
  • Media Center is very lacking in features (IMDB lookup, Stacking, Genres)
  • Cost. You license everything. Server, Client and Extenders.
  • No UPnP Media Server or Renderer support.
  • Can't play DVDs unless they have been decrypted.
  • Can't play iso files.
  • Placeshifter can't play DVDs at all.
Despite its shortcommings, SageTV is still a great buy, in my oppinion. Keep in mind that SageTV has a very active plugin community and many of it's shortcommings are addressed in user contributed plugins. For example, IMDB support and Web support are both available as plugins. Also, Microsoft Media Center converts are happy to find that there is a SageMC UI replacement that seems to appeal to their visual senses.

If you want a slick HD setup, without a computer in the living room, then SageTV is your answer. It may not be the most visually appealing software, but it will get the job done. If you plan on having a full blown computer in the livingroom, then perhaps something free and open source might be a better option. When I first bought SageTV, XMBC for Linux was not available. Given all that I really wanted was a HD Media Center with lots of functionality, then XMBC for Linux would be been a great choice. It would have required that I put a computer in the livingroom, but given what I've spent on SageTV licenses and hardware (HD-PVR and HD100), I could have put a computer in the livingroom.

So, I've jumped into SageTV with both feet. My next steps are to personalize it and make it better for my needs. To achieve this, I've compiled a list of projects that I'm either working on, or plan to work on, in order to make SageTV better suit my needs.

Proposed Personal Projects
  • GWT based media management tool (extending what I've already done with the Batch MetaData Tool) (in progress)
  • Add in UPnP Server support so that I can use my Xbox's as SD clients, and potentially a PS3 as a client. (researching)
  • Remote API for SageTV (Export the SageAPI as a set of restful services) (in progress)
  • GWT based plugin manager. Tool that will show plugins, and allow you install them from the web interface. (researching)


Stay in touch, and I'll keep you posted on how I make out with these ambitious projects.

Friday, September 12, 2008

First Contact

I play with a lot of technologies, mainly java enabled ones, but still, I do my share of testing the bleeding edge.

As I dabble in each of these new and old technologies, I find myself making notes about things I like and things I don't like. I thought it might prove useful to others if I shared my experiences as I investigate and use technologies.

Over the past year, I've played with, OSGI, UPnP, GWT, MythTV, SageTV, and extending my knowledge of the Java language. I have 13 years experience programming online commerce applications. 10 of those years were spent in Java. The first few years I spent in C, until I was forced to move to Java. I resisted the change, but now I am very much a Java technology evangelist.

Over the next few months, I'll post articles on my experiences with technology. Some of the upcoming ideas that I'm currently working on include....
  • Writing applications using GWT
  • MythTV as a SageTV network encoder
  • Embedding OSGI in existing applications
  • Building a UPnP Server
  • Java Lessons
  • SageTV experiences
Stay tuned, and feedback is appreciated.